Fulfillment Processes
There are two main fulfillment process flows in the Order Management System (OMS):
The following sections show flow diagrams that illustrate the fulfillment flows, and detail the messages used in the processes for each one, including specifications for the fields and formats used by messages that are system-supported.
The modules and commands marked as (Not preferred) are still operational but not recommended. For optimal usage, use the specifications listed first (the new fulfillment API) for each step.
See Specifications for information about the API (modules, events, and commands).
Constraints
There are a few constraints for fulfillment messages and processes in the OMS:
- Messages cannot contain shipping lines. If a message contains a shipping line it will be rejected with a
Request item with line number X of the request Y is a shipping line
or similar error. - With the
ship_lines
command, you must ship all lines included in a package together. - New fulfillment API messages, as well as
lines_declined
andlines_shipped
, with duplicate lines will be rejected. You can send items in either theaggregated_items
,items
, oritems_collection
fields, but not in multiple fields. - If items are sent via the
aggregated_items
field, we validate that the receivedaggregated_items
line exists and has enough lines to fulfill the requested quantity. If the first item in the message is invalid, the message will be rejected and no other items in that message will be processed. - Status validations only apply to the new fulfillment API.
These constraints are standard processes for the OMS. Your setup may have a different configuration. Contact Magento Support for assistance and questions.
Home delivery
During the home delivery process, the item(s) are sent directly to the customer’s home (or other shipping address) in one of two ways:
-
Ship from Warehouse (WH)—During the WH process, the client receives a shipment request from their Logistics Service Provider (LSP) to the Warehouse Management System (WMS). Then, they fulfill the request and send a message with those results back to the LSP. Magento does not usually have visibility to this part of the fulfillment process as the WMS only sends a response message communicating the shipment status (whether the order has been shipped or declined).
-
Ship from Store (SFS)—During the SFS process, the store assistant uses the fulfillment process to ship the item(s) directly to the customer from the store.
Ship from warehouse
This flow diagram details the process of shipping an order from a distribution center (DC) or warehouse (WH).
The flow represents the recommended “happy path” for shipping from a DC or WH. You can also DECLINE
or CANCEL
(steps 5 and 6) during the flow using the applicable commands.
Ship from WH or DC flow
The specifications used for each step are:
-
Shipment request:
- Module—
magento.logistics.warehouse_management
- Command—
request_shipment
- Module—
-
Receive lines:
- Module—
magento.logistics.fulfillment_management
- Command—
receive_lines
- (Not preferred) Module—
magento.logistics.shipment_request_management
* - (Not preferred) Command—
lines_change_status
with the statusRECEIVEDBYLOGISTICS
- Module—
-
Pack:
- Module—
magento.logistics.fulfillment_management
- Command—
pack_lines
- Module—
-
Ship:
- Module—
magento.logistics.fulfillment_management
- Command—
ship_lines
- (Not preferred) Module—
magento.logistics.warehouse_management
- (Not preferred) Event—
lines_shipped
- Module—
-
Decline lines:
- Module—
magento.logistics.fulfillment_management
- Command—
decline_lines
- (Not preferred) Module—
magento.logistics.warehouse_management
* - (Not preferred) Event—
lines_declined
*
- Module—
-
Cancel lines:
- Module—
magento.logistics.fulfillment_management
- Command—
cancel_lines
- Module—
-
Shipment complete:
- Module—
magento.logistics.fulfillment_management
- Event—
customer_shipment_done
- Module—
-
Complete order:
- Module—
magento.sales.order_management
- Event—
updated
- Module—
Ship from store
This flow diagram details the process of shipping an order directly from a store (SFS).
It represents the recommended workflow for shipping from a store. You can also DECLINE
or CANCEL
(steps 5 and 6) during the flow using the applicable commands.
See the SFS topic for more information about how SFS orders are displayed in the Order Management System (OMS) Admin.
Ship from store
The specifications used for each step are:
-
Shipment request:
- Module—
magento.logistics.warehouse_management
- Command—
request_shipment
- Module—
-
Pick:
- Module—
magento.logistics.fulfillment_management
- Command—
pick_lines
- Module—
-
Pack:
- Module—
magento.logistics.fulfillment_management
- Command—
pack_lines
- (Not preferred) Module—
magento.logistics.carrier_management
* - (Not preferred) Query—
request_shipping_details
; See Carrier Integration for SFS for more info.*
- Module—
-
Ship:
- Module—
magento.logistics.fulfillment_management
- Command—
ship_lines
- Module—
-
Decline lines:
- Module—
magento.logistics.fulfillment_management
- Command—
decline_lines
- (Not preferred) Module—
magento.logistics.warehouse_management
* - (Not preferred) Event—
lines_declined
*
- Module—
-
Cancel lines:
- Module—
magento.logistics.fulfillment_management
- Command—
cancel_lines
- Module—
-
Shipment complete:
- (Not preferred) Module—
magento.logistics.fulfillment_management
- (Not preferred) Event—
customer_shipment_done
*
- (Not preferred) Module—
-
Complete order:
- (Not preferred) Module—
magento.sales.order_management
* - (Not preferred) Event—
updated
*
- (Not preferred) Module—
In-store pickup
During the ISPU process, the customer picks up their item(s) from the store in one of two ways: * Standard ISPU—During the standard ISPU process, the store has current stock for the specified item(s) and the store assistant uses the fulfillment process to prepare the item(s) for customer pickup. * Ship to Store (STS)—During the STS process, the store does not have current stock for the specified item(s), so the LSP generates a request for the item(s) to be shipped over from another store for customer pickup.
This flow diagram details the process of preparing an order for in-store pickup.
The flow represents the recommended “happy path” for in-store pickups. You can also DECLINE
or CANCEL
(steps 5 and 6) during the flow using the applicable commands.
See the ISPU topic for more information about how ISPU orders are displayed in the Order Management System (OMS) Admin.
The specifications used for each step are:
-
Pick (confirm collection):
- Module—
magento.logistics.fulfillment_management
- Command—
pick_lines
- Module—
-
Ship:
- Module—
magento.logistics.fulfillment_management
- Command—
ship_lines
- Module—
-
Decline lines (decline picking):
- Module—
magento.logistics.fulfillment_management
- Command—
decline_lines
- Module—
-
Cancel lines (decline collection):
- Module—
magento.logistics.fulfillment_management
- Command—
cancel_lines
- Module—
-
Shipment complete:
- Module—
magento.logistics.fulfillment_management
- Event—
customer_shipment_done
- Module—
-
Complete order:
- Module—
magento.sales.order_management
- Event—
updated
- Module—
See the Order flow topic for an overview of an OMS order flow.
Status validations
We validate the the transitions between statuses within the fulfillment flow. Each status can potentially transition to a specified set of other statuses.
The potential status transitions for each command are:
Status | Potential transitions |
---|---|
NEW |
RECEIVE PICK PACK SHIP DECLINE CANCEL |
RECEIVE |
PICK PACK SHIP DECLINE CANCEL |
PICK |
PACK SHIP DECLINE CANCEL |
PACK |
SHIP DECLINE CANCEL |
SHIP |
Final fulfillment status |
DECLINE |
CANCEL Resource |
CANCEL |
Final fulfillment status |
These validations only apply to the new fulfillment API.
Error handling
If you send a fulfillment message to the OMS with multiple lines, and one of those lines fails (due to one of a variety of reasons), the message will proceed with processing. An exception will occur, and an error message indicating the line(s) that failed will appear. The rest of the remaining successful lines will process, but the failed line will not.
Messages affected by this error handling include:
magento.logistics.fulfillment_management.receive_lines
magento.logistics.fulfillment_management.pick_lines
magento.logistics.fulfillment_management.decline_lines
magento.logistics.fulfillment_management.cancel_lines