How to Use JSON_LISTINGS_FEED for Amazon in Celigo (Replacing POST_INVENTORY_AVAILABILITY_DATA)

Amazon is deprecating the POST_INVENTORY_AVAILABILITY_DATA feed, requiring users to transition to the new JSON_LISTINGS_FEED. If you're managing inventory updates in Amazon through Celigo, this guide will walk you through setting up the new feed using Async Helper to track processing and retrieve results (additionally, see docs here).

How JSON_LISTINGS_FEED Works in Celigo

The process involves three main steps:

  1. Submit the feed to Amazon – This sends the inventory update request.
  2. Check the feed processing status – The Async Helper tracks when Amazon has completed processing.
  3. Retrieve results – After Amazon processes the feed, results are fetched to determine success or errors.

Step 1: Submit JSON_LISTINGS_FEED to Amazon

You'll need to make a POST request to:

/feeds/2021-06-30/documents

with the following JSON payload in Celigo (or similar):

{
  "header": {
    "sellerId": "{{connection.http.unencrypted.sellerId}}",
    "version": "2.0"
  },
  "messages": [
  {{#each data}}
    {
      "messageId": {{{add @index 1}}},
      "sku": "{{sku}}",
      "productType": "PRODUCT",
      "operationType": "PATCH",
      "patches": [
        {
          "op": "replace",
          "path": "/attributes/fulfillment_availability",
          "value": [
            {
              "fulfillment_channel_code": "DEFAULT",
              "quantity": {{ats}}
            }
          ]
        }
      ]
    }{{#if @last}}{{else}},{{/if}}
  {{/each}}
  ]
}

Step 2: Configure Async Helper to Track Status

After submitting the feed, you need to track its status asynchronously. To do this:

  1. Go to the Advanced section in Celigo.
  2. Enable Configure Async Helper.
  3. Click the Add icon to create a new helper.
  4. Set up a status export to check feed processing status.
    • Perform a GET request to:
    /feeds/2021-06-30/feeds/{{data.feedId}}
    
    • The data.feedId is the reference from the initial API response.
    • Set up processing statuses as follows:
      • In Progress Values: IN_QUEUE, IN_PROGRESS
      • Done Values: DONE
      • Done Without Data Values: CANCELLED
      • Error Values: FATAL

Step 3: Retrieve Processing Results

Once the status shows as DONE, you need to fetch the processing results:

  1. Add a results export in the Async Helper.
  2. Perform a GET request to:
    /feeds/2021-06-30/documents/{{data.statusRes.resultFeedDocumentId}}
    
    • Here, statusRes is a reference to the status export.
  3. Set Path to records in HTTP response body to issues.

Watch the Tutorial Video :movie_camera:

3 Likes

If you need to map any response fields back from Amazon, here’s what’s available:

  • id: The line number in the generated CSV file (e.g., 1, 2, 3, etc.).
  • statusCode: The response status code from Amazon (e.g., 200 for success, 422 for validation errors, etc.).
  • errors: A list of any errors returned by Amazon for that SKU.

Example response:

{
  "id": 1,
  "statusCode": 422,
  "errors": [
    {
      "source": "amazonmws",
      "code": "90114",
      "message": "Value for 'Quantity' is lesser than the required minimum '0'."
    }
  ]
}