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:
- GraphQL
- cURL
mutation SetCustomerTiersModuleEnabled($enabled: Boolean!) {
setCustomerTiersModuleEnabled(enabled: $enabled) {
enabled
moduleEnabled
tiers {
name
discountSchemeId
isDefault
key
rank
threshold
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetCustomerTiersModuleEnabled($enabled: Boolean!) {\n setCustomerTiersModuleEnabled(enabled: $enabled) {\n enabled\n moduleEnabled\n tiers {\n name\n discountSchemeId\n isDefault\n key\n rank\n threshold\n }\n }\n}",
"variables": {
"enabled": true
}
}
EOF
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.