Docs
Dashboard

Fulfill an order

Last updated View as Markdown

Fulfill an order

Record the quantities included in one shipment and verify the result against the order. A fulfillment is separate from payment capture and the order’s overall business status.

Before you begin

Use an Admin credential, an existing order ID, and your warehouse’s shipment information. Check the order and payment state against your operational policy before shipping. Use a stable mapping from the warehouse shipment ID to the Thor fulfillment ID to prevent duplicate creation.

1. Read the current order

Code in graphql

Paginate order lines if needed. Calculate remaining quantities from current, relevant fulfillment records and their statuses. Use the order-line ID for each shipment line, not the variant ID. Do not rely on a snapshot captured before another operator shipped part of the order.

2. Create a fulfillment

Code in graphql

This input creates a ready fulfillment without shipment tracking. Add actual carrier, tracking, or shippedAt data only when the shipment should be recorded as shipped; those fields change the creation outcome. Use orderFulfillmentUpdate to progress an existing fulfillment instead of creating another copy.

3. Verify and reconcile

Read the order again and confirm the fulfillment ID, line quantity, and shipment state. Save the warehouse-to-Thor mapping before processing the next delivery of the same source event. If the creation response is lost, inspect existing fulfillments before retrying.

Reconcile stock and shipment quantities through your inventory workflow. A successful fulfillment response does not replace that operational check or capture a payment. See Fulfillments and Allocation and inventory lifecycle.