Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.mageloyalty.com/llms.txt

Use this file to discover all available pages before exploring further.

Mage Loyalty automatically syncs loyalty data into Shopify metafields, making it available in your Liquid templates, theme editor, and Storefront API — no custom code or API calls required.

How it works

Mage writes two JSON metafields under the mage.loyalty namespace:
OwnerLiquid accessDescription
Shopshop.metafields.mage.loyaltyYour full loyalty program configuration — earning rules, rewards, VIP tiers, and referral settings
Customercustomer.metafields.mage.loyaltyIndividual customer data — points balance, lifetime points, VIP tier, and status
Both metafields are kept in sync automatically. Shop metafields update whenever you change your program settings in the dashboard. Customer metafields update whenever a customer earns points, redeems a reward, or changes VIP tier.

Namespace and key

All Mage metafields use the same namespace and key:
PropertyValue
Namespacemage
Keyloyalty
Typejson

When metafields update

EventWhat updates
Customer earns points (purchase, signup, review, etc.)Customer metafield
Customer redeems a rewardCustomer metafield
Customer VIP tier changesCustomer metafield
Points expireCustomer metafield
You edit earning rules, rewards, or tiers in the dashboardShop metafield
You enable/disable a programShop metafield