Skip to main content

hierarchyRepCustomers

Requires at least one of the permissions customers:customer:read or users:user:read.

Customers under one sales rep with per-customer order stats. Needs the customers 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 HierarchyRepCustomers($input: HierarchyCustomersInput!) {
hierarchyRepCustomers(input: $input) {
hasNextPage
page
pageSize
totalCount
items {
id
code
name
repName
status
createdAt
}
}
}

Variables:

{
"input": {
"repId": "string"
}
}

Response:

{
"data": {
"hierarchyRepCustomers": {
"hasNextPage": true,
"page": 0,
"pageSize": 0,
"totalCount": 0,
"items": [
{
"id": "id",
"code": "string",
"name": "string",
"repName": "string",
"status": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
]
}
}
}
hierarchyRepCustomers(
input: HierarchyCustomersInput!
): HierarchyCustomerPage!

Arguments​

hierarchyRepCustomers.input ● HierarchyCustomersInput! non-null input​

The details of the hierarchy customers request.

Type​

HierarchyCustomerPage object​

A page of customers.