Use storefront data with custom Liquid to display loyalty information in your theme. You or your theme developer must build the display. Enabling publication does not install a popup, app block, or rewards page.
Enable publication
- Open NASP Rewards in Shopify Admin.
- Choose Settings, then Storefront data.
- Choose Enable.
Enabling requests current data for your customers and shop. Publication runs in the background, so the data may not appear immediately. If the page says updates will begin when storefront data is available, keep your theme’s missing-data fallback until publication begins.
While enabled, NASP Rewards publishes changes to points, birthdays, VIP details, and program settings. A daily refresh starts at 03:00 UTC and republishes the data, including values that have not changed.
To stop future updates, choose Disable on the same page. Published data stays in Shopify, and updates already in progress may still finish. Enabling again requests fresh data. This setting does not pause earning or redemption.
Read the metafields
Both metafields use namespace nasp_rewards, key data, and type json.
- Read
customer.metafields.nasp_rewards.data.valuefor the signed-in customer’s points balance, recorded birthday, and available VIP details. - Read
shop.metafields.nasp_rewards.data.valuefor program settings, the published VIP tier catalog, and active rewards with their prices and terms.
Each value contains a versions object. Select the same version for customer
and shop data, such as versions['2026-10']. A missing version is unavailable.
Do not automatically substitute a different version.
Treat these metafields as read-only copies. NASP Rewards overwrites edits during publication and recreates deleted values while publication is enabled. Editing the metafields does not change a customer’s points or your program configuration.
Reward and tier entries can include content.type and content.handle for
shared Shopify metaobjects containing translated wording. Use those references
when displaying names and descriptions. See Translations
for managing customer-facing content.
Display a signed-in customer’s points
Add this Liquid to the relevant theme template or section. It uses the
2026-10 version and shows a fallback when the customer or balance is unavailable.
{% if customer %}
{% assign loyalty = customer.metafields.nasp_rewards.data.value.versions['2026-10'] %}
{% if loyalty.points_balance != nil %}
<p>{{ loyalty.points_balance | escape }} points</p>
{% if loyalty.refreshed_at %}
<p>Last refresh: {{ loyalty.refreshed_at | date: '%Y-%m-%d %H:%M UTC' | escape }}</p>
{% endif %}
{% else %}
<p>Your points balance is currently unavailable.</p>
{% endif %}
{% else %}
<p><a href="{{ routes.account_login_url }}">Sign in to view your points</a></p>
{% endif %}
For the shop catalog, use the same version:
{% assign loyalty_catalog = shop.metafields.nasp_rewards.data.value.versions['2026-10'] %}
Test your display with a signed-in customer, a signed-out visitor, a zero balance, and an unavailable metafield. Keep birthday and VIP details optional. Their absence does not make the points balance unavailable.
Show the last refresh
Use refreshed_at from the selected version to show when the published data was
captured. Updates are asynchronous, so a storefront balance can lag behind the
customer’s latest activity. A daily refresh can also briefly show an older value
before a later update replaces it.
Keep the timestamp visible when showing cached data. Do not turn a missing balance into zero or discard a balance solely because its timestamp is old. Disabling publication leaves the last published value and timestamp in place.
Use metafields for display. A reward’s presence in the catalog does not prove that a customer can redeem it. Direct customers to the Customer Rewards page to check current eligibility and redeem points.