Inventory Event Webhooks
Retail Cloud created Inventory Events webhooks that allow merchants to integrate and interact with inventory management systems programmatically. They can enable real-time data exchange for inventory-related events. These events include transfer, adjustment, cycle count, purchase order, and inventory movements (sales, returns) data.
For a comprehensive list of Retail Cloud's API and SPIs, please refer to Retail Cloud API, SPI, and Webhook Specs.
1. Inventory Transfer - This API sends inventory transfer-related data to an external system. The types of transfers are Advanced Shipping Notice (ASN), Corporate Transfer (CTS), Store to Store (STS), Blind Receivings (BLD), and Return to Vendor (RTV).
2. Inventory Adjustment - This API sends inventory adjustment-related data to an external system (e.g., quantity count, reason for adjustment, reason text, etc.).
3. Cycle Count - This API sends cycle count-related data to an external system (e.g., product information, inventory/counted quantity, variances, etc.).
4. Purchase Order - This API sends purchase order-related data to an external system (e.g., product information, order quantity, costs, etc.).
5. Inventory Movement - This API sends inventory movement-related data to an external system (e.g., sales, returns).
6. Create ASN - This API creates an ASN in the inventory management system.
Below, you'll find examples of both the request payload and the response for the Inventory Transfer API.
To set up inventory event webhooks in Retail Cloud, you'll need to configure custom connectors in CMS for each type of inventory event you want to monitor. This involves creating endpoints, specifying API keys, and configuring the appropriate event subscriptions. The setup process allows you to establish real-time data exchange between Retail Cloud and your external inventory management systems.
To configure APIs, the endpoints need to be implemented and provided by the merchant's system. Then they need to be configured in the PredictSpring CMS.
In CMS, go to Store Management > Integrations > Custom Connectors.
Create a new connector by referring to the table below:
| Inventory Events | Used for sending inventory data to external system |
|---|---|
| Send inventory Transfer data | API Key: This should be one of the following values: • INVENTORY_EXPORT_ASN • INVENTORY_EXPORT_STS • INVENTORY_EXPORT_RTV • INVENTORY_EXPORT_CTS • INVENTORY_EXPORT_BLD Events: Only the subscribed event's data will be sent out, available events: • ASN_RECEIVED_EVENT • ASN_PARTIALLY_RECEIVED_EVENT • ASN_RECEIVE_COMPLETED_EVENT API Endpoint: Provide the external endpoint to send the inventory transfer data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventory/inventoryTransferIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"}For a full list of events, please refer to PredictSpring's SwaggerHub documentation which can be found in this article. |
| Send inventory adjustment data | API Key: This should be one of following values: • INVENTORY_EXPORT_INA Events: Only the subscribed event's data will be sent out, available events: • INVENTORY_ADJUSTMENT • INVENTORY_BUCKET_ADJUSTMENT API Endpoint: Provide the external endpoint to send the inventory transfer data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventory/inventoryAdjustmentIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"} |
| Send inventory bucket adjustment data | API Key: This should be one of following values: • INVENTORY_EXPORT_INBA Events: Only the subscribed event's data will be sent out, available events: • INVENTORY_BUCKET_ADJUSTMENT API Endpoint: Provide the external endpoint to send the inventory transfer data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventory/inventoryBucketAdjustmentIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"} |
| Send cycle count data | API Key: This should be one of following values: • INVENTORY_EXPORT_CYC Events: Only the subscribed event's data will be sent out, available events: • CYC_COUNT_CREATED_EVENT • CYC_COUNT_STARTED_EVENT • CYC_COUNT_COMPLETED_EVENT • CYC_COUNT_CANCELED_EVENT API Endpoint: Provide the external endpoint to send the inventory transfer data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventory/cycleCountIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"} |
| Send purchase order data | API Key: This should be one of following values: • INVENTORY_EXPORT_PO Events: Only the subscribed event's data will be sent out, available events: • PO_TRANSFER_STARTED_EVENT • PO_TRANSFER_COMPLETED_EVENT • PO_TRANSFER_ERRORED_EVENT API Endpoint: Provide the external endpoint to send the inventory transfer data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventory/purchaseOrderIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"} |
| Send sales data | This event indicates that an item (or items) has been sold. When this event is triggered, the expectation is that the inventory for the specified item(s) should decrease. API Key: This should be SALE_INVENTORY. API Endpoint: Provide the external endpoint to send inventory-related sales data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventoryIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"} |
| Send return data | This event indicates that an item (or items) has been returned or exchanged. When this event is triggered, the inventory for the specific item(s) should increase or adjust in some manner if it's an exchange. API Key: This should be RETURN_INVENTORY. API Endpoint: Provide the external endpoint to send inventory-related returns data out. E.g., https://sample/external/endpoint/merchant/spi/sample/endpoint/sa/customer/inventoryIntegration Type: It should be HTTP_POST. JSON Headers: Provide the header for the API. Headers can be Content-Type or Authorization attributes i.e., clientId/password. {"Content-Type":"application/json","client_id":"myClientId", "client_secret":"myClientSecret"} |
Retail Cloud offers the ability to manually repost failed webhook events.
- In CMS, go to Store Management > Reporting and Analytics > Repost Failed Webhook Events.
- Search for the failed webhook event by configuring the search query parameters.
- Click View Details to view the details of the payload inside the selected webhook event.
- Click Repost to manually trigger a webhook event repost.