Order fulfillment process - Main flow

A common order fulfillment flow is for ERP system to pack the items for an order, hand it over to the delivery company, and then capture the money for it. This section describes this main flow.

Fullfilling an order

When the ERP system has handed over a delivery package to the shipping provider company, call the following endpoint first to register the shipment and capture money for it.

/Litium/api/connect/erp/orders/{orderId}/shipment

When a shipment is created, following steps are taken in Litium.

  1. Create the appropriate delivery with delivery rows (if a partial shipment Litium automatically calculates the shipment value)
  2. Litium captures the amount due from customer. (If the funds are already reserved).

In this flow, the ERP system is not waiting to know whether capture has succeeded or not. Therefore, after the abvoe call to create the shipment, call the following endpoint, to notify Litium that the order is handedover to the delivery company.

/Litium/api/connect/erp/orders/{orderId}/deliveries/{deliveryId}/notify/delivered

Litium will set the delivery status to "Delivered" when the above end-point is called.

Process diagram

The sequence diagrams visualize the flow for a confirmed order from the time a customer places the order, to ERP and when the customer receives a delivery confirmation e-mail.

Prerequisites: A webhook registration to OrderConfirmed event is required for this flow (Step 1 and 1.1)

More details on webhook registration

Sequence of events:

  • The customer places the order (Step 2).
  • Litium Connect sends the order to ERP (Step 2.1 and 3).
    • Connect APP listens to the Order confirmed event.
    • When the order is delivered to ERP, Connect APP notifies back (acknowledgement, OrderExportedToErp)(Step 4, 4.1, 4.2)
      OrderFullfilment.PNG
  • ERP
    • Picks items from the warehouse (Picked state)
    • Packs items and hands over to the delivery company. (Delivered state)
    • ERP notifies Litium through Litium Connect App (CreateShipment) - (Step 3 - Diagram 2)
      • Litium creates shipment, capture money, and notifies ERP system back. The ERP system has already delivered it. (Steps 3.1.1.1 through 3.1.1.3)
    • Litium Connect APP notifies Litium NotifyOrderDelivered. Without waiting for the ReadyToShip notification from Litium. (Steps 5 through 5.1.1)
  • PaymentCaptureFailed is a webhook event that ERP Apps can hook in to for taking necessary action.

OrderFullfilment2.PNG

More details on Connect API documentation.