Skip to main content

hierarchyCustomerOrders

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

Orders of one customer under one rep (chain-validated). Needs the sales order read or users read 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 HierarchyCustomerOrders($input: HierarchyOrdersInput!) {
hierarchyCustomerOrders(input: $input) {
hasNextPage
page
pageSize
totalCount
items {
id
orderNumber
status
itemCount
orderCurrency
orderDate
}
}
}

Variables:

{
"input": {
"customerId": "string",
"repId": "string"
}
}

Response:

{
"data": {
"hierarchyCustomerOrders": {
"hasNextPage": true,
"page": 0,
"pageSize": 0,
"totalCount": 0,
"items": [
{
"id": "id",
"orderNumber": "string",
"status": "string",
"itemCount": 0,
"orderCurrency": "string",
"orderDate": "2025-01-15T00:00:00Z"
}
]
}
}
}
hierarchyCustomerOrders(
input: HierarchyOrdersInput!
): HierarchyOrderPage!

Arguments​

hierarchyCustomerOrders.input ● HierarchyOrdersInput! non-null input​

The details of the hierarchy orders request.

Type​

HierarchyOrderPage object​

A page of orders.