Skip to main content

assignBranchManagers

Requires a customer (portal or buyer app) session.

assign managers to a branch (CUSTOMER_ADMIN only). Targets must be same-partner CUSTOMER users; CUSTOMER_VIEWER is allowed (EDGE).

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 AssignBranchManagers($addressId: ID!, $userIds: [ID!]!) {
assignBranchManagers(addressId: $addressId, userIds: $userIds) {
id
approverCount
isActive
isBranch
label
memberCount
approvers {
firstName
lastName
email
role
userId
}
}
}

Variables:

{
"addressId": "id",
"userIds": [
"id"
]
}

Response:

{
"data": {
"assignBranchManagers": {
"id": "id",
"approverCount": 0,
"isActive": true,
"isBranch": true,
"label": "string",
"memberCount": 0,
"approvers": [
{
"firstName": "string",
"lastName": "string",
"email": "string",
"role": "string",
"userId": "id"
}
]
}
}
}
assignBranchManagers(
addressId: ID!
userIds: [ID!]!
): CustomerBranch!

Arguments​

assignBranchManagers.addressId ● ID! non-null scalar​

The ID of the address.

assignBranchManagers.userIds ● [ID!]! non-null scalar​

The IDs of the users.

Type​

CustomerBranch object​

a partner sales branch — an Address with isBranch = true. The label is the branch name; pendingApprovalCount feeds the deactivation warning (EDGE #4).