Skip to main content

bulkAssignPendingCustomers

Requires a tenant administrator.

Assigns many pending customers to one sales rep and reports, for each, whether it succeeded. 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 BulkAssignPendingCustomers($customerIds: [ID!]!, $newRepId: ID!) {
bulkAssignPendingCustomers(customerIds: $customerIds, newRepId: $newRepId) {
batchId
failed
succeeded
total
results {
id
code
name
message
success
}
}
}

Variables:

{
"customerIds": [
"id"
],
"newRepId": "id"
}

Response:

{
"data": {
"bulkAssignPendingCustomers": {
"batchId": "string",
"failed": 0,
"succeeded": 0,
"total": 0,
"results": [
{
"id": "id",
"code": "string",
"name": "string",
"message": "string",
"success": true
}
]
}
}
}
bulkAssignPendingCustomers(
customerIds: [ID!]!
newRepId: ID!
): BulkPendingActionResult!

Arguments​

bulkAssignPendingCustomers.customerIds ● [ID!]! non-null scalar​

The IDs of the customers to assign.

bulkAssignPendingCustomers.newRepId ● ID! non-null scalar​

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

Type​

BulkPendingActionResult object​

The outcome of approving or rejecting several pending customers.