Fulfillments
A fulfillment records which order-line quantities are being prepared or shipped together. One order can have multiple fulfillments, allowing split quantities, parcels, carriers, or supply channels.
Lines and partial fulfillment
Each fulfillment line references an order line and a positive quantity. Thor rejects an empty fulfillment and validates the requested quantities against the order. Read existing fulfillments before creating the next one so the operation uses outstanding quantities rather than the original order quantity.
For an order line with quantity three, a first fulfillment can ship one unit and a later fulfillment can ship the remaining two. Do not create both from the same stale snapshot.
Status and tracking
A fulfillment starts in READY. If create input includes carrier, tracking number, tracking URL, or shippedAt, creation marks it SHIPPED. Updates can add tracking details and supported status changes. The lifecycle enum contains READY, SHIPPED, DELIVERED, and CANCELLED.
The order’s aggregate shipmentState summarizes its fulfillments, but payment state and order state remain independent.
Inventory relationship
For managed catalog lines, fulfillment requests consumption of allocated TRACK_AND_ALLOCATE inventory. Custom lines are skipped. The current integration logs catalog inventory failures without rejecting the fulfillment record, so warehouse reconciliation must compare fulfillments with stock outcomes. This is not an atomic coupling.