Bol Ship Orders
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Version | Date | Created / Updated | Notes |
---|---|---|---|
v1.0 | 10/05/2023 | Bogomil Pavlov | First publish |
v1.1 | 04/08/2023 | Bogomil Pavlov | Add Claim Status when shipping an order |
v1.2 | 15/08/2023 | Bogomil Pavlov | Response mapping changes |
The purpose of this document is to describe how we ship orders on Bol marketplace
There is a predefined carriers which we can use and we have to introduce carrier mapping. However they are not available for download via API and we need to prepare the enumerations in the database manually.
Carrier Codes | Carrier Names |
---|---|
BRIEFPOST |
Brief Post |
UPS |
USP |
TNT |
TNT |
TNT-EXTRA |
TNT Extra |
TNT_BRIEF |
TNT Brief |
TNT-EXPRESS |
TNT Express |
DYL |
DYL |
DPD-NL |
DPD NL |
DPD-BE |
DPD BE |
BPOST_BE |
BPost Be |
BPOST_BRIEF |
BPost Brief |
DHLFORYOU |
DHL For You |
GLS |
GLS |
FEDEX_NL |
FedEx NL |
FEDEX_BE |
FedEx Be |
OTHER |
Other |
DHL |
DHL |
DHL_DE |
DHL DE |
DHL-GLOBAL-MAIL |
DHL Global Mail |
TSN |
TSN |
FIEGE |
Fiege |
TRANSMISSION |
Transmission |
PARCEL-NL |
Parcel NL |
LOGOIX |
LogoIX |
PACKS |
Packs |
COURIER |
Courier |
PES |
PES |
BUDBEE |
Budbee |
TRUNKRS |
Trunkrs |
CYCLOON |
Cycloon |
Please note we want to send the code and display the name in the UI
All this should be introduced in a new table called “Bol Couriers Mapping“ which we want to be a slave table of Courier. In “Bol Couriers Mapping“ we want to have all the available enumerations in a dropdown field. We are following the same pattern as standard and the mapping will be first we map the Order Shipment > Courier against Carrier > Name and get the Bol Couriers Mapping > Bol Courier. If no mapping is provided we want to introduce a default option in Account Bol. If there is no mapping or no default option set we want to set an error in Order Error table.
Order Ship API is asynchronous process and we need to store the feeds in Marketplace Feed table after each successful request. Then we will have a response reader which will check if the order is successfully shipped.Bol do support partial shipping updates so we want to implement the partial shipping logic. Please note we want to ship orders only with Account Bol > Fulfilment Method = FBR. We want all triggers, status, error handling, etc. to be as per the standard shipping abstraction
API Call: PUT https://api.bol.com/retailer/orders/shipment
Docs: https://api.bol.com/retailer/public/redoc/v9/retailer.html#operation/ship-order-item
Sample Request Body:
{
"orderItems": [
{
"orderItemId": "2012345678",
"orderItemId": "2012345679"
}
],
"shipmentReference": "B321SR",
"shippingLabelId": "d4c50077-0c19-435f-9bee-1b30b9f4ba1a",
"transport": {
"transporterCode": "TNT",
"trackAndTrace": "3SBOL0987654321"
}
}
Mapping:
Bol Fields | Hemi Fields | Comment | |
---|---|---|---|
orderItems |
|||
orderItemId |
Product In Order > Item Order Line ID | This is an array and we can specify more than one orderItemId |
|
shipmentReference |
N/A | ||
shippingLabelId |
N/A | ||
transport |
|||
transporterCode |
Order Shipment > Courier | Please note we want to send the mapped courier | |
trackAndTrace |
Order Shipment > Tracking Number |
Sample Response:
{
"processStatusId": "1234567",
"entityId": "987654321",
"eventType": "CONFIRM_SHIPMENT",
"description": "Example process status description for processing 987654321.",
"status": "SUCCESS",
"errorMessage": "Example process status error message.",
"createTimestamp": "2018-11-14T09:34:41+01:00",
"links": [
{
"rel": "self",
"href": "https://api.bol.com/shared/process-status/1234567",
"method": "GET"
}
]
}
After each successfully send feed for order ship we will receive the entityId
from the response and need to store it in Marketplace Feeds table with the rest of the details as follows.
Bol Field | Hemi Field | Comment |
---|---|---|
<v1.2>processStatusId</v1.2> |
Marketplace Feed > External ID | |
Marketplace Feed > Account | For which account is the feed generated. | |
eventType |
Marketplace Feed > External Type | |
Marketplace Feed > Type | Hardcoded as “Order Fulfillment“ | |
createTimestamp |
Marketplace Feed > Submitted Date | When the feed is submitted |
Marketplace Feed > Sent Objects Count | How many products we have pushed in the feed | |
Marketplace Feed > Status | If the external status is “PENDING“ we want to set the status as “Processing“. | |
If the external status is “SUCCESS“ or “FAILURE” or “TIMEOUT” we want to set the status as “Completed“. | ||
status |
Marketplace Feed > External Status |
Based on the response reader afterwards we need to mark the order as “Shipped“ or “Partially Shipped“.Also if we have downloaded a claim with type “Cancelled“ we want once the order get “Shipped“ to mark all claims with type “Cancelled“ and Order Claim > Status = “Pending” or Order Claim > Status = ““ as Order Claim > Action = “Rejected” and Order Claim > Status = “Completed” and <v1.1> Order Claim > Claim Status = “Rejected“ </v1.1> If we have a claim with different status from “Penidng“ or empty we do not want to update the claim. If any errors are returned we want to store them in Order Errors table after the response Bol Order Response Reader
Please note we will also add the feed objects which after processing need to be removed.