The customer metafield contains the individual loyalty data for a single customer. Access it in Liquid at:
{{ customer.metafields.mage.loyalty.value }}
Since the metafield type is json, you access nested properties through .value in Liquid. This metafield is only available on pages where the customer object exists (i.e. the customer is logged in).
Full object shape
{
"points_balance": 1250,
"lifetime_points": 3400,
"redeemed_points": 2150,
"vip_tier": "Gold",
"status": "member"
}
Field reference
| Field | Type | Description |
|---|
points_balance | number | Current available points the customer can spend |
lifetime_points | number | Total points earned since joining the program |
redeemed_points | number | Total points spent on rewards |
vip_tier | string | Name of the customer’s current VIP tier |
status | string | "member" or "excluded" |
Status values
| Value | Description |
|---|
member | Active loyalty program member |
excluded | Customer has been excluded from the loyalty program by the merchant |