Sending ASN to WMS
The following page describes the logic for generating the ASN message from an inbound White Glove booking. Refer to the https://bigdigit.atlassian.net/wiki/spaces/SMH/pages/3274768397 for the source data from a booking
Also refer to the WMS API documentation page Load Receipts which is the API call required to send the ASN to the warehouse.
Load Receipts API call
The following fields show the top-level and Load Receipts Header for the API call to send an ASN to the WMS. This must only be fed from a White Glove Booking where Booking. Reason Code = ASN or GOODS TRANSFER.
WMS API field | From White Glove Booking Model |
|
---|---|---|
Receipt Reason Code | (do not provide) |
|
Update Receipt | “FALSE” |
|
Receipt Type | “Standard” |
|
ASN Number | Booking.External Booking Ref | WG-362: changed from Booking. Booking Ref |
GUID | (do not provide) |
|
HB Reference | Booking. Booking Ref | WG-362: Booking. Booking Ref added |
Is Return | “FALSE” |
|
Notes | Booking. Delivery. Additional Info |
|
Warehouse ETA | Booking. Delivery. Earliest By |
|
DC Code | Delivery. Location. Location Code |
|
Load Receipts Line Items
The following fields must be populated per Load Receipts Line Item. These must each correspond to the separate instances of Booking. Goods within the Inbound Booking.
WMS API field | From Model |
---|---|
GUID | (do not provide) |
Line No | n, where n is an incrementing integer starting from 1 |
Supplier Company Code | The code of the client “ROOM” as understood by the WMS |
Product Code | Booking. Goods(n). SKU |
Quantity | Booking. Goods(n). Quantity. Quantity |
Return Reason | (do not provide) |
Best Before Date | (do not provide) |
Lot Number | (do not provide) |
API Response
There is a synchronous success / failure API response as described in API Load Receipts. Examples are:
Example success Response Body | <Response> |
Example failure Response Body | <Response> |
The system must process this response as follows:
Success returned:
Set Booking. Is WMS Success to TRUE
Clear the value of Booking. WMS Error Message to null
Set Booking. Status to ASN SENT
Failure returned:
Set Booking. Is WMS Success to FALSE
Set the value of Booking. WMS Error Message to the error message returned from the WMS
Do not transition the Booking. Status (it remains in status CREATED)
This information must be handed to the front-end API for display on the user’s UI.