Skip to main content

assignableCustomers

Requires a tenant administrator.

Lists customers that can be assigned to a given sales rep, one page at a time, never including customers that rep already owns. Backs the Assign customers picker on a user. Tenant admins only.

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 AssignableCustomers($input: AssignableCustomersInput!) {
assignableCustomers(input: $input) {
hasNextPage
page
pageSize
totalCount
items {
id
code
name
assignedSalesRepName
status
assignedSalesRepId
}
}
}

Variables:

{
"input": {
"repId": "id"
}
}

Response:

{
"data": {
"assignableCustomers": {
"hasNextPage": true,
"page": 0,
"pageSize": 0,
"totalCount": 0,
"items": [
{
"id": "id",
"code": "string",
"name": "string",
"assignedSalesRepName": "string",
"status": "string",
"assignedSalesRepId": "id"
}
]
}
}
}
assignableCustomers(
input: AssignableCustomersInput!
): AssignableCustomersPage!

Arguments​

assignableCustomers.input ● AssignableCustomersInput! non-null input​

The target sales rep and the search and paging options for the list.

Type​

AssignableCustomersPage object​

A page of customers that can be assigned.