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:
- GraphQL
- cURL
mutation BulkAssignPendingCustomers($customerIds: [ID!]!, $newRepId: ID!) {
bulkAssignPendingCustomers(customerIds: $customerIds, newRepId: $newRepId) {
batchId
failed
succeeded
total
results {
id
code
name
message
success
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation BulkAssignPendingCustomers($customerIds: [ID!]!, $newRepId: ID!) {\n bulkAssignPendingCustomers(customerIds: $customerIds, newRepId: $newRepId) {\n batchId\n failed\n succeeded\n total\n results {\n id\n code\n name\n message\n success\n }\n }\n}",
"variables": {
"customerIds": [
"id"
],
"newRepId": "id"
}
}
EOF
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.