Skip to main content

bulkReassignCustomers

Requires a tenant administrator.

Moves every customer owned by one sales rep to another, for example when a rep leaves. Future orders go to the new rep; past orders and commissions stay with the old one. Returns how many customers were moved. 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 BulkReassignCustomers($fromRepId: ID!, $toRepId: ID!) {
bulkReassignCustomers(fromRepId: $fromRepId, toRepId: $toRepId) {
count
}
}

Variables:

{
"fromRepId": "id",
"toRepId": "id"
}

Response:

{
"data": {
"bulkReassignCustomers": {
"count": 0
}
}
}
bulkReassignCustomers(
fromRepId: ID!
toRepId: ID!
): BulkReassignResult!

Arguments​

bulkReassignCustomers.fromRepId ● ID! non-null scalar​

The ID of the sales rep who currently owns the customers.

bulkReassignCustomers.toRepId ● ID! non-null scalar​

The ID of the sales rep who will own the customers.

Type​

BulkReassignResult object​

The result of moving customers to another rep.