amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
573 stars 730 forks source link

Fulfillment Inbound API 2024-03-20. Inbound plan is not marked as SHIPPED even once the shipment is delivered. #4128

Closed emakunin closed 6 days ago

emakunin commented 3 weeks ago

Hello,

I'm using Fulfillment Inbound API 2024-03-20 to create inbound plan. The plans I've created generated shipments that are DELIVERED to Amazon FCs. However the plan status is still ACTIVE.

As per documentation: Current status of the inbound plan. Can be: ACTIVE, VOIDED, SHIPPED, 'ERRORED'. It is not clear what the SHIPPED status means. Especially when I have many shipments.

In the api schema there are some additional details though that indicate that the current behaviuor is a bug.

             {
            "description": "The status of an inbound plan.",
            "enum": [
              "ACTIVE",
              "VOIDED",
              "SHIPPED"
            ],
            "in": "query",
            "name": "status",
            "type": "string",
            "x-docgen-enum-table-extension": [
              {
                "value": "ACTIVE",
                "description": "An inbound plan that is being worked on."
              },
              {
                "value": "VOIDED",
                "description": "An inbound plan with all shipment cancelled and can no longer be modified."
              },
              {
                "value": "SHIPPED",
                "description": "A completed inbound plan. Only minor modifications can be made at this time."
              }
            ]
          },

What does the "completed" inbound plan mean? What is a source of truth I can rely on for my automation workflows?

Customer problem

It is not clear how to process the data from the API

  1. When inbound plan will be marked as SHIPPED?
  2. Is it a bug on Amazon side that the plan is active ?
  3. Can I assume that the inbound plan is "SHIPPED" once I have shipment confirmation ids for every shipment and tracking details are provided?
  4. What if I have many shipments and one of them stucks or fails? What should be the status of the plan? Example: shipment1 is amazon partner carrier handled one and shipment2 is the 'other' carrier type that has invalid tracking details.
    1. Should the plan still be ACTIVE or SHIPPED?
    2. Should I check on the shipment level?

Attachments

Plan example:

{
  "createdAt": "2024-08-23T07:28:24Z",
  "marketplaceIds": [
    "A1PA6795UKMFR9"
  ],
  "packingOptions": [
    {
      "packingOptionId": "po00000000-0000-0000-0000-000000000000",
      "status": "ACCEPTED"
    }
  ],
  "sourceAddress": {
    ....
  },
  "lastUpdatedAt": "2024-08-26T07:55:44Z",
  "name": "O7Q-CGZ",
  "inboundPlanId": "wfaa8ccd06-6b1c-4850-93a4-cec3780e603e",
  "placementOptions": [
    {
      "placementOptionId": "plc221f015-e39c-41f7-9c5d-94489fd2eb2d",
      "status": "ACCEPTED"
    }
  ],
  "shipments": [
    {
      "shipmentId": "sh63e22ed2-ab32-4072-be18-24002dbd29e2",
      "status": "DELIVERED"
    }
  ],
  "status": "ACTIVE"
}
puppsupr commented 6 days ago

Tracking via https://github.com/amzn/selling-partner-api-models/issues/4114 Closing this.