Skip to main content

reallocateSalesOrder

Requires permission sales:sales_order:allocate.

Release and re-run warehouse allocation for a confirmed order, honoring any manual splits. A shortage never rejects the call; it appears as BACKORDER rows.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ReallocateSalesOrder($id: ID!) {
reallocateSalesOrder(id: $id) {
id
batchNumber
serialNumber
createdAt
baseQuantity
quantity
warehouse {
id
code
name
}
}
}

Variables:

{
"id": "id"
}

Response:

{
"data": {
"reallocateSalesOrder": [
{
"id": "id",
"batchNumber": "string",
"serialNumber": "string",
"createdAt": "2025-01-15T00:00:00Z",
"baseQuantity": 0,
"quantity": 0,
"warehouse": {
"id": "id",
"code": "string",
"name": "string"
}
}
]
}
}
reallocateSalesOrder(
id: ID!
): [SalesOrderItemAllocation!]!

Arguments​

reallocateSalesOrder.id ● ID! non-null scalar​

The ID of the sales order.

Type​

SalesOrderItemAllocation object​

The part of a sales order line that is filled from one warehouse. The quantities of a line's allocations add up to the line.