Dispatch Shipment
Sequence diagram:
Step 1: On shipment picked, WMS publishes a message to Pub/Sub Shipment Picked topic.
Eshopbox Service Listener API is subscribed to the Pub/Sub Shipment Picked topic and receives the Shipment Picked event (or WMS event) message.
WMS Dispatch event body:
{
"resource": "shipment",
"eventType": "PUT",
"eventSubType": "dispatched",
"accountSlug": "winspiring",
"accountId": null,
"actor": "SYSTEM",
"version": "v1",
"request_data": [],
"response_data": {
"customerOrderNumber": "4405473214658",
"vendorOrderNumber": "3229789520066",
"externalShipmentID": "4405473214658-846-20",
"externalWarehouseID": "ESBMUM_112",
"externalChannelID": "CH0846",
"integrationType": "7",
"vendorPartyID": null,
"partner_as2_id": null,
"defaultWarehouseCode": "ESBMUM_112",
"orderDate": "2021-02-03 18:58:51",
"portal_id": 27,
"paymentType": "Cash on Delivery (COD)",
"expectedShipDate": null,
"dispatchAfterDate": null,
"externalManifestNumber": null,
"channelManifestNumber": null,
"order_id": 5331324,
"channel_id": 846,
"warehouse_id": 72,
"channel_account_id": 158,
"account_id": 149,
"connectionId": 5,
"locationId": "59469168834",
"region": "",
"picklistCode": null,
"invoiceNumber": "12345678",
"boxType": "UNKNOWN",
"isPriorityShipment": "0",
"isGift": "0",
"invoice_url": "",
"invoiceDate": null,
"label_url": "",
"labels": "",
"shippingInfo": [],
"boxAdditionalRecommendation": [],
"dimension_length": "0",
"dimension_width": "0",
"dimension_height": "0",
"weight": "0",
"trackingID": "12345678",
"packageID": "",
"barcode": "",
"taxAmount": 0,
"shipChargeAmount": 30,
"courierName": "EK",
"created_at": "2021-02-03 18:59:07",
"updated_at": "2021-02-03 18:59:07",
"status": "dispatched",
"remarks": "",
"customerName": "Joe",
"customerContactNumber": "0123466666",
"email": "prateek.kaushik@eshopbox.com",
"channelSlug": "meraki",
"status_updated_at": "2021-02-03 18:59:07",
"status_log": {
"created": "2021-02-03 18:59:07"
},
"orderExternalCreatedAt": "2021-02-03 18:59:03",
"shippingAddress": {
"customerName": "Joe",
"addressLine1": "Pune",
"addressLine2": "Pune",
"city": "Pune",
"state": "Haryana",
"postalCode": "122001",
"countryCode": "IN",
"countryName": "INDIA",
"contactPhone": "0123466666",
"email": "prateek.kaushik@eshopbox.com"
},
"id": 5252341,
"isCOD": "1",
"track_payload": [],
"items": [
{
"lineItemSequenceNumber": 9136087335106,
"orderItemID": "4405473214658-13893324",
"itemID": "40125724983490",
"sku": "",
"asin": "",
"productName": "X",
"quantity": 1,
"customerPrice": 200,
"lineItemTotal": 236,
"invoiceTotal": 246,
"discount": 0,
"taxRate": 0,
"taxAmount": 0,
"giftMessage": "",
"giftLabelContent": "",
"lineItemOrderStatus": "",
"orderItemIDs": [
"4405473214658-13893324"
],
"productImageUrl": null,
"productAdditionalInfo": {
"transportMode": "SUR",
"deliveryMode": "HD"
},
"expectedDeliveryDate": null,
"shippingCharges": 10,
"productUrl": null,
"originalOrderItemId": null
}
]
},
"previous_data": [],
"resource_type": "shipment.update",
"account_slug": "winspiring",
"custom": []
}
Step 2: In this Shipment Picked event message, check that the integrationType
is TataCliq and the resource
is shipment. If these conditions are met, and the eventSubType
is either “dispatched”, push the shipment picked event message into the TaskQueue.
Step 3: The Eshopbox shipment service will pull the next message from TaskQueue and form the request body of AWB endpoint.
TataCLiq Dispatched Event Keys | WMS Dispatched Event Keys |
---|---|
ManifestID |
|
SellerName |
|
P1LogisticsID |
|
DeliveryMode |
|
AWBNUM |
|
ShipmentID |
|
TransportMode |
|
InvoiceNo |
|
Request body:
{
"sellermanifest": {
"ManifestID": "220708-007-819449-EX-123",
"SellerName": "124219",
"P1LogisticsID": "DL",
"Shipment": [
{
"AWBNUM": "5208210044380",
"ShipmentID": "1613795640274TD26AA",
"InvoiceNo": "A8801922CA000090",
"TransportMode": "SUR"
}
],
"DeliveryMode": "HD"
}
}
Step 4: After mapping, push the request body into TataCliq Manifest API.
Sample Response body:
{
"sellermanifest": {
"ManifestID": "220708-007-819449-EX-123",
"ManifestPDF": "http://sppreprod2.tataunistore.com/faces/filedownload/?pr=QYa26X%2FMzWSaojOQ%2FhiRc1JmG%2BWIF78lmfrmHW%2B73RNzYCLLuBdAedu3VpYOxvMHyIYht8hyAo19g%2FFby9mqFOYkGk7jiJPPL5dqL6EFtdBNzhJqWSvFNgYCRChkSdjSXiztl0b0LmkK%2BROhFoEFI2fkpWoZ1QZMksB88snmP2HuUKhKeE%2Fvw32RsPhwdYOY31%2B1WVareXGWHGjnSLKDnOyGweQj2dH5",
"SellerName": "124219",
"P1LogisticsID": "EK",
"DeliveryMode": "HD",
"Shipment": [
{
"AWBNUM": "EK0001016",
"ShipmentID": "780025219TD11AA",
"Status": "SUCCESS",
"Remark": "Shipment has been created successfully",
"TransportMode": "AIR",
"InvoiceNo": "A8800722CA000350"
}
]
}
}
Exception Handling:
Error | Response Code |
---|---|
Mandatory field is missing | 404 - Resource not found |
Invalid input format of data | 400 - Bad request |
Some internal error occurs during TataCliq Manifest API call | 500 - Internal server error |