Skip to main content

salesOrderAllocationPlan

Requires at least one of the permissions sales:sales_order:allocate or sales:sales_order:read.

Where Confirm would take each sales order line's stock from if the order were confirmed now, including stock it would take from a warehouse other than the one the line names. Nothing is reserved. Needs the sales order read or allocate permission.

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:

query SalesOrderAllocationPlan($input: SalesOrderAllocationPlanInput!) {
salesOrderAllocationPlan(input: $input) {
key
lineWarehouseId
source
switchedQuantity
lineWarehouse {
id
code
name
}
}
}

Variables:

{
"input": {
"lines": [
{
"key": "string",
"productId": "id",
"quantity": 0
}
]
}
}

Response:

{
"data": {
"salesOrderAllocationPlan": [
{
"key": "string",
"lineWarehouseId": "id",
"source": "AUTO",
"switchedQuantity": 0,
"lineWarehouse": {
"id": "id",
"code": "string",
"name": "string"
}
}
]
}
}
salesOrderAllocationPlan(
input: SalesOrderAllocationPlanInput!
): [SalesOrderLineAllocationPlan!]!

Arguments​

salesOrderAllocationPlan.input ● SalesOrderAllocationPlanInput! non-null input​

The order lines and the customer.

Type​

SalesOrderLineAllocationPlan object​

Where Confirm would take one sales order line's stock from, if the order were confirmed now. Nothing is reserved.