How it works
Mage writes two JSON metafields under themage.loyalty namespace:
| Owner | Liquid access | Description |
|---|---|---|
| Shop | shop.metafields.mage.loyalty | Your full loyalty program configuration — earning rules, rewards, VIP tiers, and referral settings |
| Customer | customer.metafields.mage.loyalty | Individual customer data — points balance, lifetime points, VIP tier, and status |
Enabling metafields
Enable the integration
Toggle the integration on. This creates the metafield definitions on your Shopify store with storefront access enabled, which allows Liquid templates to read the data.
Use in your theme
Access the metafields in any Liquid template. See the Examples section for common patterns.
Namespace and key
All Mage metafields use the same namespace and key:| Property | Value |
|---|---|
| Namespace | mage |
| Key | loyalty |
| Type | json |
When metafields update
| Event | What updates |
|---|---|
| Customer earns points (purchase, signup, review, etc.) | Customer metafield |
| Customer redeems a reward | Customer metafield |
| Customer VIP tier changes | Customer metafield |
| Points expire | Customer metafield |
| You edit earning rules, rewards, or tiers in the dashboard | Shop metafield |
| You enable/disable a program | Shop metafield |
Metafield syncs are fire-and-forget — they never block or slow down the primary loyalty operation. If a sync fails (e.g. due to a temporary Shopify API issue), the data will be corrected on the next qualifying event.