Fluent Commerce Logo
Docs

Mixed Baskets Workflow Interface Contracts

Interface Contract

Changed on:

2 Oct 2024

Detailed Description

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

OrderCancel Event

This event is used to cancel the Order.Request Payload
PropertyDescriptionTypeRequired?
entityIdThe order idStringRequired
entityRefThe order referenceStringRequired
entitySubtypeThe order typeStringRequired
entityTypeThe type of the entity (Order)StringRequired
nameThe name of the ruleSetStringRequired
retailerIdThe retailer idStringRequired
attributesThe attributesObjectOptional
Event Request Example
1{
2  "name": "OrderCancel",
3  "entityType": "ORDER",
4  "entityId": "40606",
5  "entityRef": "GAP_50::FC_50::OI_981-976-8005",
6  "entitySubtype": "MULTI",
7  "rootEntityType": "ORDER",
8  "retailerId": "2025",
9  "attributes": {}
10}

WavePack Event

This event is used as an external (anything from outside this workflow) anytime finishing picking and starting packing of the order in the store is triggered.Request Payload
PropertyDescriptionTypeRequired?
pickedItemsThe list of picked items[pickedItem]Required
fulfilmentItemsThe list of fulfilment items[fulfilmentItem]Optional
pickedItem Definition
PropertyDescriptionTypeRequired?Notes
GTINThe Global Trade Item Number (GTIN) for this ProductStringOptional
availableQtyThe available quantity of order itemfloatRequiredavailableQty should be positive
catalogueRefThe catalogue reference of the order itemStringRequired
productRefThe product reference of the order itemStringRequired
fulfilmentItem Definition
PropertyDescriptionTypeRequired?Notes
skuRefThe sku reference of the fulfilment itemStringOptional
orderItemIdThe order item id of the fulfilment itemStringRequiredRequired if skuRef is not null
rejectedQtyThe rejected quantity of the fulfilment itemintRequiredRequired if skuRef is not null
availableQtyThe available quantity of the fulfilment itemintRequiredRequired if skuRef is not null
orderItemRefThe order item reference of the fulfilment itemStringRequiredRequired if skuRef is not null
requestedQtyThe requested quantity of the fulfilment itemintRequiredRequired if skuRef is not null
fulfilmentItemRefThe fulfilment item referenceStringRequiredRequired if skuRef is not null
Event Request Example
1{
2  "name":"WavePack",
3  "accountId":"<accountId>",
4  "entityType":"FULFILMENT",
5  "entityId":"<fulfilmentId>",
6  "entityRef":"<fulfilmentRef>",
7  "rootEntityType":"ORDER",
8  "rootEntityId": "<orderID>",
9  "rootEntityRef": "<orderRef>",
10  "retailerId":"<retailerId>",
11  "attributes": {
12    "pickedItems": [
13      {
14        "productRef": "<productRef>",
15        "catalogueRef": "<catalogueRef>",
16        "GTIN": "<gtin>",
17        "availableQty": 1
18      }
19    ],
20    "fulfilmentItems": [
21      {
22        "skuRef": "<skuRef>",
23        "orderItemId": "<orderItemId>",
24        "rejectedQty": 0,
25        "availableQty": 1,
26        "orderItemRef": "<orderItemRef>",
27        "requestedQty": 1,
28        "fulfilmentItemRef": "<fulfilmentItemRef>"
29      }
30    ]
31  }
32}
`
`

WaveDispatchInitiated Event

This event is used externally (anything from outside this workflow) anytime finishing packing and creating an article in the store is triggered.Request Payload
PropertyDescriptionTypeRequired?
fulfilmentArticlesThe list of fulfilment articles[fulfilmentArticle]Optional
fulfilmentArticle Definition
PropertyDescriptionTypeRequired?Notes
nameThe name of the articleStringOptional
depthThe depth of the articleStringOptional
widthThe width of the articleStringOptional
heightThe height of the articleStringOptional
weightThe weight of the articleStringOptional
maxWeightThe maxWeight of the articleStringOptional
Event Request Example
1{
2  "name":"WaveDispatchInitiated",
3  "accountId":"<accountId>",
4  "entityType":"FULFILMENT",
5  "entityId":"<fulfilmentId>",
6  "entityRef":"<fulfilmentRef>",
7  "rootEntityType":"ORDER",
8  "rootEntityId": "<orderID>",
9  "rootEntityRef": "<orderRef>",
10  "retailerId":"<retailerId>",
11  "attributes":{
12    "fulfilmentArticles":[
13      {
14      "name":"<name>",
15      "depth":"<depth>",
16      "width":"<width>",
17      "height":"<height>",
18      "weight":"<weight>",
19      "maxWeight":"<maxWeight>"
20      }
21    ]
22  }
23}

FulfilmentPack Event

This event is triggered by the Wave entity and starts the packing process for the items in the fulfillment.Request Payload
PropertyDescriptionTypeRequired?
pickedItemsThe list of picked items[pickedItem]Required
fulfilmentItemsThe list of fulfilment items[fulfilmentItem]Optional
pickedItem Definition
PropertyDescriptionTypeRequired?Notes
GTINThe Global Trade Item Number (GTIN) for this ProductStringOptional
availableQtyThe available quantity of order itemfloatRequiredavailableQty should be positive
catalogueRefThe catalogue reference of the order itemStringRequired
productRefThe product reference of the order itemStringRequired
fulfilmentItem Definition
PropertyDescriptionTypeRequired?Notes
skuRefThe sku reference of the fulfilment itemStringOptional
orderItemIdThe order item id of the fulfilment itemStringRequiredRequired if skuRef is not null
rejectedQtyThe rejected quantity of the fulfilment itemintRequiredRequired if skuRef is not null
availableQtyThe available quantity of the fulfilment itemintRequiredRequired if skuRef is not null
orderItemRefThe order item reference of the fulfilment itemStringRequiredRequired if skuRef is not null
requestedQtyThe requested quantity of the fulfilment itemintRequiredRequired if skuRef is not null
fulfilmentItemRefThe fulfilment item referenceStringRequiredRequired if skuRef is not null
Event Request Example
1{
2  "name":"FulfilmentPack",
3  "accountId":"<accountId>",
4  "entityType":"FULFILMENT",
5  "entityId":"<fulfilmentId>",
6  "entityRef":"<fulfilmentRef>",
7  "rootEntityType":"ORDER",
8  "rootEntityId": "<orderID>",
9  "rootEntityRef": "<orderRef>",
10  "retailerId":"<retailerId>",
11  "attributes": {
12    "pickedItems": [
13      {
14        "productRef": "<productRef>",
15        "catalogueRef": "<catalogueRef>",
16        "GTIN": "<gtin>",
17        "availableQty": 1
18      }
19    ],
20    "fulfilmentItems": [
21      {
22        "skuRef": "<skuRef>",
23        "orderItemId": "<orderItemId>",
24        "rejectedQty": 0,
25        "availableQty": 1,
26        "orderItemRef": "<orderItemRef>",
27        "requestedQty": 1,
28        "fulfilmentItemRef": "<fulfilmentItemRef>"
29      }
30    ]
31  }
32}


ConfirmParcels Event

This event is used to send the details of each article packed for a single Fulfilment.Request Payload
PropertyDescriptionTypeRequired?
packedItemsContains the list of all articles and rejections of a Fulfilment processed at the packing stepPackedItemRequired
packedItem Definition
PropertyDescriptionTypeRequired?
articlesThe list of all articles of a Fulfilment processed at the packing step[FulfilmentArticle]Required, but array can be empty
rejectionsThe list of all rejections of a Fulfilment processed at the packing step[FulfilmentItemRejection]Required, but array can be empty
fulfilmentArticle Definition
PropertyDescriptionTypeRequired?Notes
barcodeThe barcode of the packed productStringOptional 
packaging_nameThe package type that the items were packed intoStringRequiredFor Example: Small, Medium, Large, Custom
lengthThe length of the article in cmStringRequired 
widthThe width of the article in cmStringRequired 
heightThe height of the article in cmStringRequired 
weightThe weight of the article in kgStringRequired 
maxWeightThe maxWeight of the articleStringOptional 
minWeightThe minWeight of the articleStringOptional 
itemsThe list of the packed fulfilment items[Item]Optional 
item Definition
PropertyDescriptionTypeRequired?
fulfilmentItemIdThe id of fulfilment itemStringRequired
quantityThe number of the packed fulfilment item in the articleIntegerRequired
 fulfilmentItemRejection Definition 
PropertyDescriptionTypeRequired?
fulfilmentItemIdThe id of fulfilment itemStringRequired
rejectedQtyThe number of the rejected fulfilment itemIntegerRequired
rejectReasonThe reason of the rejectionSettingValueTypeRequired
 SettingValueType Definition
PropertyDescriptionTypeRequired?Notes
labelThe label of the reject reasonStringRequiredIn case of rejections at the picking stage, the default value `fc.sf.rejection Reason.outsideOfPacking` will be used.
valueThe value of the reject reasonStringRequiredIn case of rejections at the picking stage, the default value "Rejected outside of packing" will be used.
 Event Request Example
1{
2  "name": "ConfirmParcels",
3  "entityType": "FULFILMENT",
4  "entityId": "89",
5  "entityRef": "94a175b8-182d-4ba5-bf9b-f41c26b473cf",
6  "entitySubtype": "HD_PFS",
7  "rootEntityType": "ORDER",
8  "rootEntityId": "79",
9  "rootEntityRef": "HD_123_314-929-5663",
10  "retailerId": "7",
11  "attributes": {
12    "packedItems": {
13      "articles": [
14        {
15          "barcode": "4567",
16          "height": "30",
17          "length": "30",
18          "maxWeight": "9.9",
19          "minWeight": "5",
20          "packaging_name": "Medium",
21          "weight": "8",
22          "width": "30",
23          "items": [
24            {
25              "fulfilmentItemId": "140",
26              "quantity": 2
27            },
28            {
29              "fulfilmentItemId": "139",
30              "quantity": 1
31            }
32          ]
33        }
34      ],
35      "rejections": [
36        {
37          "fulfilmentItemId": "139",
38          "rejectedQty": 2,
39          "rejectReason": {
40            "label": "fc.sf.rejectionReason.damagedItem",
41            "value": "damagedItem"
42          }
43        }
44      ]
45    }
46  }
47}

`
`