Skip to main content

assignCustomersToRep

Requires a tenant administrator.

Assigns the given customers to one sales rep and reports, for each, whether it succeeded. Each change is audited and leaves the same handoff trail as any other reassignment. 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:

mutation AssignCustomersToRep($input: AssignCustomersToRepInput!) {
assignCustomersToRep(input: $input) {
batchId
failed
succeeded
total
results {
id
code
name
message
success
}
}
}

Variables:

{
"input": {
"customerIds": [
"id"
],
"repId": "id"
}
}

Response:

{
"data": {
"assignCustomersToRep": {
"batchId": "string",
"failed": 0,
"succeeded": 0,
"total": 0,
"results": [
{
"id": "id",
"code": "string",
"name": "string",
"message": "string",
"success": true
}
]
}
}
}
assignCustomersToRep(
input: AssignCustomersToRepInput!
): BulkPendingActionResult!

Arguments​

assignCustomersToRep.input ● AssignCustomersToRepInput! non-null input​

The sales rep and the IDs of the customers to assign to them.

Type​

BulkPendingActionResult object​

The outcome of approving or rejecting several pending customers.