Skip to main content

setCustomerCommissionRate

Requires permission commissions:commission:update.

Sets the commission rate for one customer and whether it is active. The customer must belong to the organization. Requires permission to update commissions.

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 SetCustomerCommissionRate($input: SetCustomerCommissionRateInput!) {
setCustomerCommissionRate(input: $input) {
id
customerName
isActive
partnerId
rate
}
}

Variables:

{
"input": {
"partnerId": "string",
"rate": 0
}
}

Response:

{
"data": {
"setCustomerCommissionRate": {
"id": "id",
"customerName": "string",
"isActive": true,
"partnerId": "string",
"rate": 0
}
}
}
setCustomerCommissionRate(
input: SetCustomerCommissionRateInput!
): CustomerCommissionRate!

Arguments​

setCustomerCommissionRate.input ● SetCustomerCommissionRateInput! non-null input​

The customer, the rate and whether it is active.

Type​

CustomerCommissionRate object​

A commission rate set for one customer.