Fluent Commerce Logo
Docs

Inventory Catalogue Workflow Interface Contracts

Interface Contract

Changed on:

23 Aug 2023

Detailed Description

The below Interface Contracts document the interaction points with the Inventory Catalogue workflow. These allow you to ensure that any integration made into the workflow will enable the workflow to work correctly.

UpdateInventoryQty Event

This event is used anytime an external (anything from outside this workflow) creation of inventory quantities is triggered.

Request Payload

PropertyDescriptionTypeRequired?
itemsThe list of items whose inventory positions to be updatedListRequired
Item Definition
PropertyDescriptionTypeRequired?Notes
fulfilmentIdThe fulfilment ID against which the inventory quantities are to be created/updatedStringRequired
skuRefThe SKU reference of the inventory positionStringRequired
locationRefThe SKU reference of the inventory positionStringRequired
reservedQtyThe count of RESERVED quantitiesIntRequiredOnly required when reserve stock
correctionQtyThe count of CORRECTED quantitiesIntRequiredOnly required when confirm a fulfilment
saleQtyThe count of SALE quantitiesIntRequiredOnly required when confirm a fulfilment
cancelQtyThe count of CANCELLED quantitiesIntRequiredOnly required when cancel a fulfilment

Event Request Example

1{
2    "name": "UpdateInventoryQty",
3    "retailerId": "<retailerId>",
4    "entityRef": "<IC_ref>",
5    "entityType": "INVENTORY_CATALOGUE",
6    "entitySubtype": "<IC_type>",
7    "rootEntityType": "INVENTORY_CATALOGUE",
8    "rootEntityRef": "<IC_ref>",
9    "attributes": {
10        "items": [
11            {
12                "skuRef": "<skuRef>",
13                "locationRef": "<locationRef>",
14                "fulfilmentId": "100",
15                "quantity": 0,
16                "reserveQty": "-5",
17                "correctionQty": 0,
18                "saleQty": 0
19            }
20        ]
21    }
22}
`
`

InventoryChanged Event

This event is generated by the Inventory Batch API.WarningAny need to trigger an InventoryChanged update should only be done via the Batch API.

Request Payload

PropertyDescriptionTypeRequired?
inventoryPositionThe inventory position that has changedObjectRequired
inventoryPosition Definition
PropertyDescriptionTypeRequired?Notes
refThe inventory position that has changedStringRequiredThe format is `locationRef:productRef`
locationRefThe location reference associated to the inventory positionStringRequired
productRefThe product reference associated to the inventory positionStringRequired
qtyThe quantity associated to the inventory positionIntRequiredOnly required when reserve stock
correctionQtyThe corrected quantity associated to the inventory positionIntOptionalNot used by the inventory catalogue workflow
reservedQtyThe reserved quantity associated to the inventory positionIntOptionalSame as above

Event Request Example

1{
2  "name": "InventoryChanged",
3  "accountId": "<accountId>",
4  "retailerId": "<retailerId>",
5  "entityRef": "<IC_ref>",
6  "entityType": "INVENTORY_CATALOGUE",
7  "entitySubtype": "<IC_type>",
8  "rootEntityType": "INVENTORY_CATALOGUE",
9  "rootEntityRef": "<IC_ref>",
10  "attributes": {
11    "inventoryPosition": {
12      "productRef": "<productRef>",
13      "locationRef": "<locationRef>",
14      "ref": "<inventoryPositionRef>",
15      "qty": 0
16    }
17  }
18}