updateCustomerTierConfig
Requires at least one of the permissions settings:customer_tiers:update or settings:tenant:update.
Saves the customer tier ladder and whether automatic tiering is on. At least one tier is required, and every tier needs a unique name and a distinct, non-negative threshold. 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 UpdateCustomerTierConfig($input: UpdateCustomerTierConfigInput!) {
updateCustomerTierConfig(input: $input) {
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 UpdateCustomerTierConfig($input: UpdateCustomerTierConfigInput!) {\n updateCustomerTierConfig(input: $input) {\n enabled\n moduleEnabled\n tiers {\n name\n discountSchemeId\n isDefault\n key\n rank\n threshold\n }\n }\n}",
"variables": {
"input": {
"enabled": true,
"tiers": [
{
"isDefault": true,
"name": "string",
"threshold": 0
}
]
}
}
}
EOF
Variables:
{
"input": {
"enabled": true,
"tiers": [
{
"isDefault": true,
"name": "string",
"threshold": 0
}
]
}
}
Response:
{
"data": {
"updateCustomerTierConfig": {
"enabled": true,
"moduleEnabled": true,
"tiers": [
{
"name": "string",
"discountSchemeId": "string",
"isDefault": true,
"key": "string",
"rank": 0,
"threshold": 0
}
]
}
}
}
updateCustomerTierConfig(
input: UpdateCustomerTierConfigInput!
): CustomerTierConfig!
Arguments
updateCustomerTierConfig.input ● UpdateCustomerTierConfigInput! non-null input
Whether automatic tiering is on, and the list of tiers.
Type
CustomerTierConfig object
The customer discount tier setup.