For comprehensive guides and code examples, see our Liquid API documentation.
Available Customer Metafields
All metafields use thelantern.customer namespace unless noted otherwise and are automatically updated by Lantern:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Learn how to access Lantern data through metafields and metaobjects
lantern.customer namespace unless noted otherwise and are automatically updated by Lantern:
| Field | Description | Example |
|---|---|---|
activity_feed | Recent customer activity events | Loyalty actions, purchases, referrals |
birth_date | Customer’s birthday. On facts instead of lantern | "1989-12-13" |
is_tester | Test account flag | Hide from analytics, enable debug features |
properties | Custom customer properties | {"favorite_category": "electronics"} |
wallet | All available rewards & credits | Active discounts, gift cards, product rewards, store credit balances |
wishlist | Customer’s wishlist items | Array of product variant GIDs |
| Field | Description | Example Value |
|---|---|---|
loyalty_tier | Current tier name | "Gold" |
loyalty_points | Available points balance | 1250 |
loyalty_spend | Current period spend | 249.99 |
is_eligible | Can participate in loyalty | true |
is_blocked | Blocked from rewards | false |
| Field | Description | Example Value |
|---|---|---|
referral_code | Unique referral code | "6b577dd5288" |
is_advocate | Has referred others | true |
is_referred | Joined through referral | true |
{% assign points = customer.metafields.lantern.loyalty_points %}
{% assign tier = customer.metafields.lantern.loyalty_tier %}
{% if points and tier %}
<div class="loyalty-status">
<h3>Welcome {{ tier }} Member!</h3>
<p>You have <strong>{{ points }} points</strong> available</p>
</div>
{% endif %}
{% assign ref_code = customer.metafields.lantern.referral_code %}
{% if ref_code %}
<div class="referral-share">
<p>Share your code: <code>{{ ref_code }}</code></p>
<p>Friends get rewards, you get rewards!</p>
</div>
{% endif %}
{% assign wallet = customer.metafields.lantern.wallet | parse_json %}
{% if wallet.items.size > 0 %}
<div class="rewards-available">
<p>You have <strong>{{ wallet.items.size }} rewards</strong> ready to use!</p>
<a href="/account/rewards">View My Rewards</a>
</div>
{% endif %}
{% assign wallet = customer.metafields.lantern.wallet | parse_json %}
{% if wallet.storeCreditAccounts.size > 0 %}
{% assign total_credit = 0 %}
{% for account in wallet.storeCreditAccounts %}
{% assign credit = account.balance.amount | plus: 0 %}
{% assign total_credit = total_credit | plus: credit %}
{% endfor %}
<div class="store-credit">
<p>Store Credit: <strong>${{ total_credit }}</strong></p>
</div>
{% endif %}
{% assign wishlist = customer.metafields.lantern.wishlist | parse_json %}
{% if wishlist.size > 0 %}
<div class="wishlist-status">
<p>You have <strong>{{ wishlist.size }} items</strong> in your wishlist</p>
<a href="/pages/wishlist">View Wishlist</a>
</div>
{% endif %}
{% assign properties = customer.metafields.lantern.properties | parse_json %}
{% if properties.favorite_category %}
<div class="personalized-content">
<p>Based on your interest in <strong>{{ properties.favorite_category }}</strong>:</p>
<!-- Show personalized content -->
</div>
{% endif %}
{% assign activity = customer.metafields.lantern.activity_feed | parse_json %}
{% if activity.events.size > 0 %}
<div class="recent-activity">
<h4>Recent Activity</h4>
{% for event in activity.events limit: 3 %}
<p>{{ event.metric.name }} - {{ event.timestamp | date: '%B %d' }}</p>
{% endfor %}
</div>
{% endif %}
Was this page helpful?