myCustomerTier
Requires a customer (portal or buyer app) session.
The buyer's current customer-tier status: effective tier, its discount %, this month's spend, and progress to the next tier. Tier resolution matches the charged price. Null when the organization has the customer-tiers module turned off.
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
query MyCustomerTier {
myCustomerTier {
nextTierName
tierName
autoTieringEnabled
locked
monthlySpend
nextTierDiscountPercentage
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query MyCustomerTier {\n myCustomerTier {\n nextTierName\n tierName\n autoTieringEnabled\n locked\n monthlySpend\n nextTierDiscountPercentage\n }\n}"
}
EOF
Response:
{
"data": {
"myCustomerTier": {
"nextTierName": "string",
"tierName": "string",
"autoTieringEnabled": true,
"locked": true,
"monthlySpend": 0,
"nextTierDiscountPercentage": 0
}
}
}
myCustomerTier: MyCustomerTier
Type
MyCustomerTier object
The buyer's current customer-tier status for the active outlet: effective tier, its discount %, this month's spend, and progress to the next tier. Drives the loyalty TierCard. Tier resolution matches the price the buyer is actually charged.