Skip to main content

setCustomerTiersModuleEnabled

Requires at least one of the permissions settings:customer_tiers:update or settings:tenant:update.

Switches the customer tiers module on or off. Only the switch changes: the saved tiers and every customer's tier are kept, so switching back on restores them. Requires permission to update customer tier or tenant settings.

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 SetCustomerTiersModuleEnabled($enabled: Boolean!) {
setCustomerTiersModuleEnabled(enabled: $enabled) {
enabled
moduleEnabled
tiers {
name
discountSchemeId
isDefault
key
rank
threshold
}
}
}

Variables:

{
"enabled": true
}

Response:

{
"data": {
"setCustomerTiersModuleEnabled": {
"enabled": true,
"moduleEnabled": true,
"tiers": [
{
"name": "string",
"discountSchemeId": "string",
"isDefault": true,
"key": "string",
"rank": 0,
"threshold": 0
}
]
}
}
}
setCustomerTiersModuleEnabled(
enabled: Boolean!
): CustomerTierConfig!

Arguments​

setCustomerTiersModuleEnabled.enabled ● Boolean! non-null scalar​

True to switch the module on, false to switch it off.

Type​

CustomerTierConfig object​

The customer discount tier setup.