Skip to main content

Fulfillment orders

Use fulfillment orders when an integration needs to know, per location, what is still to be shipped for an order and what has already been shipped — for example a logistics provider, a warehouse control system, or a storefront showing the order status.

An order has one or more fulfillment orders, each assigned to the location it is fulfilled from. One location can have several fulfillment orders of the same order. A fulfillment order is either fulfilled in Pickware (type: WarehouseLocationToOrder) or is to be fulfilled externally, from a location Pickware does not manage (type: ExternalToOrder). A fulfillment order fulfilled in Pickware names its location in sourceWarehouseLocation; an external one has none. Every executed shipment is recorded as a fulfillment.

Available operations​

Example: fulfillment orders of an order​

query FulfillmentOrders($orderId: ID!) {
fulfillmentOrders(filter: { destinationOrderId: { equals: $orderId } }) {
edges {
node {
number
state
type
isPartiallyFulfilled
sourceWarehouseLocation {
code
name
}
lineItems {
edges {
node {
quantity
product {
productNumber
}
}
}
}
shippingLabels {
edges {
node {
carrier
cancelled
trackingCodes
}
}
}
fulfillments {
edges {
node {
number
state
lineItems {
edges {
node {
quantity
fulfillmentOrderLineItem {
id
}
}
}
}
}
}
}
}
}
}
}

Example: move a fulfillment order to another location​

mutation MoveFulfillmentOrderToLocation($fulfillmentOrderId: ID!, $locationId: ID!) {
moveFulfillmentOrderToLocation(fulfillmentOrderId: $fulfillmentOrderId, locationId: $locationId) {
id
number
state
sourceWarehouseLocation {
code
}
}
}

Only a fulfillment order in the state Open that is fulfilled in Pickware (type: WarehouseLocationToOrder) and is not being picked can be moved; any other one fails with BAD_REQUEST and one error per reason it cannot be moved. Moving a fulfillment order to the location it is already assigned to changes nothing. When nothing of the fulfillment order is shipped yet, the fulfillment order itself moves. When it is partially shipped, it keeps the shipped quantities and is closed, and the mutation returns a new fulfillment order at the new location that takes over the open quantities. A fulfillment order of an order that Shopify manages is moved in Shopify: only locations connected to the Shopify shop can be chosen, and line items Shopify does not stock at the new location stay at the old one.

Notes​

Reading the fulfillment orders of an order through Order.fulfillmentOrders, or the sourceWarehouseLocation and shippingLabels of a fulfillment order, also needs the read scopes of those types, see Token scopes. A fulfillment order's line item quantity is the quantity assigned to it; the quantity already shipped is the sum of the line items that reference it across its fulfillments in the state Fulfilled.