Skip to main content

setBranchLimit

Requires a customer (portal or buyer app) session.

set/clear the branch order-value ceiling (CUSTOMER_ADMIN only). Null = unlimited; a non-positive value is rejected.

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 SetBranchLimit($addressId: ID!) {
setBranchLimit(addressId: $addressId) {
id
approverCount
isActive
isBranch
label
memberCount
approvers {
firstName
lastName
email
role
userId
}
}
}

Variables:

{
"addressId": "id"
}

Response:

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

Arguments​

setBranchLimit.addressId ● ID! non-null scalar​

The ID of the address.

setBranchLimit.orderLimit ● Float scalar​

The most a branch may order in one order. Send null for no limit.

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).