Split By Seller Logic
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 |
---|---|---|---|
1.0 | 07.05.2025 | Bogomil Pavlov | First publish |
We are introducing a new and complex requirement that involves enhancing our current logic to support order splitting by seller during the export process to Amazon MCF. In this use case, multiple MCF connectors may exist, with each connector potentially associated with one or more sellers and linked to different channels.
The whole split by seller logic is explained into different sections depends on how it is affecting each flow and what changes are required.
1 . Create Order
On top of what we already have as a logic for Create Fulfillment Order we want to extend the logic as follows. The major change here will be we will need to add Connector ID on Product In Order level because one order with two items from two different sellers will need to be exported to two different connectors. We want to use the Product In Order > Connector ID in order to track the connector unique identifiers and we want to keep Orders > Connector Order ID empty. Every Product In Order will have Seller as per our standards and we need to map the Product In Order > Seller with the Amazon MCF Connector Seller > Seller and pick only Product In Orders with the matching sellers.
After successful order creation we want to add Product In Order > Connector ID and mark them as Product In Order > Connector Exported = Yes and keep empty Orders > Connector Order ID. Also we want to update Product In Order Connector > Connector field with the name of the connector which pick the order item for export.
If we do not have Product In Order > Seller we wont export the order and skip it. If not all Product In Order > Seller are populated across the order items we want to still export the ones with populated seller and skip the ones with missing Order > Seller Id
Also additional validation will be if we have MCF Connector without added seller but active Export Orders Per Seller! In terms of mapping there are not changes required in Create Fulfillment Order apart from selecting the correct products.
2. Get Fulfilment Orders
Not really much changes for Get Fulfillment Orders but we need to be careful with the mapping when we are obtaining all sellerFulfillmentOrderId
and use as extra mapping layer the Product In Order Connector > Connector
3. Get Fulfilment Order
The most significant changes will be here.
When we obtained all sellerFulfillmentOrderId
from each connector there will be duplicates because sellerFulfillmentOrderId
= Order > Id thus we will use Product In Order Connector > Connector to map the correct order items for each connector.
When we know which items are exported from this connector for this sellerFulfillmentOrderId
we are ready to update the order info. There will be some changes in the mapping which are highlighted in green.
Response Mapping:
Amazon MCF Field | Hemi Field | Comment | ||||
---|---|---|---|---|---|---|
payload |
||||||
fulfillmentOrder |
||||||
sellerFulfillmentOrderId |
Used to map the order in Hemi | |||||
sellerFulfillmentOrderId = Order > Marketplace Order Id |
||||||
marketplaceId |
||||||
displayableOrderId |
N/A | |||||
displayableOrderDate |
N/A | |||||
displayableOrderComment |
N/A | |||||
shippingSpeedCategory |
N/A | |||||
destinationAddress |
||||||
name |
N/A | |||||
addressLine1 |
N/A | |||||
addressLine2 |
||||||
addressLine3 |
||||||
city |
N/A | |||||
stateOrRegion |
N/A | |||||
countryCode |
N/A | |||||
postalCode |
N/A | |||||
fulfillmentAction |
N/A | |||||
fulfillmentPolicy |
||||||
receivedDate |
N/A | |||||
fulfillmentOrderStatus |
Product In Order Connector > Status |
AND
Product In Order Connector > Connector Status | Product In Order Connector > Connector Status is populated based on the internal mapping |
| | | statusUpdatedDate
| | | N/A | |
| | | notificationEmails
| | | N/A | |
| | fulfillmentOrderItems
| | | | N/A | |
| | | cancelledQuantity
| | | | If we have Amazon MCF Connector > Get Cancellations
= True we want to obtain the cancellations.
If there is a return we will receive all the details in returnItems node however if the order is cancelled we can rely on the cancelledQuantity
field.
Based on this field we want to track and store the refunds in Hemi. We want to store every Order Payment with Order Payment > Status = Pending and Order Payment > Type = Refund. All rows and row line are stored as per abstraction Refund Row Lines
Please note apart from the product line status we will have to track if we have any refunds on “Pending” or “Sent” status because if the refund is already created we have to wait to be processed first and we do not want to store any additional refunds. |
| | | quantity
| | | | Used to track the quantities however if we have cancelledQuantity
we will still receive the total quantities in quantity
so based on these field we will track the the item and line statuses |
| | | fulfillmentNetworkSku
| | | N/A | |
| | | orderItemDisposition
| | | N/A | |
| | | estimatedShipDate
| | | N/A | |
| | | estimatedArrivalDate
| | | N/A | |
| | | perUnitDeclaredValue
| | | | |
| | | | currencyCode
| | N/A | |
| | | | value
| | N/A | |
| | | sellerFulfillmentOrderItemId
| | | N/A | This is our Product In Order > Id |
| | | sellerSku
| | | | Used to track the item.
sellerSku
= Product in Order > SKU |
| | | unfulfillableQuantity
| | | N/A | |
| | fulfillmentShipments
| | | | | If we have Amazon MCF Connector > Get Shipments
= True we want to obtain the shipment.
|
| | | amazonShipmentId
| | | N/A | |
| | | fulfillmentCenterId
| | | Order Shipment > Ship From | The same for all packages |
| | | fulfillmentShipmentStatus
| | | | We want to store only fulfillmentShipments with status SHIPPED |
| | | shippingDate
| | | Order Shipment > Shipment Time | The same for all packages |
| | | estimatedArrivalDate
| | | N/A | |
| | | fulfillmentShipmentPackage
| | | | For each fulfillmentShipmentPackage
node we want to store separate Order Shipment.
Every shipment we store in Hemi we want to have Order Shipment > Status = Pending.
All rows and rows lines should be stored as per abstraction Order Shipment Functional Details |
| | | | packageNumber
| | Order Shipment > Package Id | Used to track the items in the package.
We will have to map the fulfillmentShipmentPackage
> packageNumber
against fulfillmentShipmentItem
> packageNumber
in order to know which items are part of the package |
| | | | carrierCode
| | Order Shipment > Courier | |
| | | | trackingNumber
| | Order Shipment > Tracking Number | |
| | | | amazonShipmentId
| | N/A | |
| | | | fulfillmentCenterId
| | N/A | |
| | | | fulfillmentShipmentStatus
| | N/A | |
| | | fulfillmentShipmentItem
| | | | |
| | | | sellerSku
| | | Used to track the product in order in order to obtain the Order Shipment Rows > Order Item Id |
| | | | sellerFulfillmentOrderItemId
| | N/A | |
| | | | packageNumber
| | | We will have to map the fulfillmentShipmentPackage
> packageNumber
against fulfillmentShipmentItem
> packageNumber
in order to know which items are part of the package |
| | | | quantity
| | Order Shipment Row > Quantity | |
| | | | serialNumber
| | N/A | |
| | returnItems
| | | | | If we have Amazon MCF Connector > Get Returns
= True we want to obtain the returns.
Every returnItems
node is a separate Order Payment in Hemi.
We want to store every Order Payment with Order Payment > Status = Pending and Order Payment > Type = Refund.
All rows and row line are stored as per abstraction Refund Row Lines |
| | | sellerReturnItemId
| | | N/A | |
| | | sellerFulfillmentOrderItemId
| | | | Used to map the item which is part of the return
sellerFulfillmentOrderItemId
= Product In Order > Id |
| | | amazonShipmentId
| | | N/A | |
| | | sellerReturnReasonCode
| | | N/A | |
| | | returnComment
| | | N/A | |
| | | amazonReturnReasonCode
| | | Order Payment Details > Refund Note | |
| | | status
| | | N/A | |
| | | statusChangedDate
| | | N/A | |
| | | returnAuthorizationId
| | | N/A | |
| | | returnReceivedCondition
| | | N/A | |
| | | fulfillmentCenterId
| | | N/A | |
| | returnAuthorizations
| | | | N/A | |
| | paymentInformation
| | | | | |
| | | paymentMode
| | | N/A | |
| | | paymentTransactionId
| | | N/A | |
| | | paymentDate
| | | N/A | |
4. Get Inventory Summaries
No changes needed and required everything works in the same way.