Skip to main content

Sync Loyalty Data to Shopify Metafields

Overview

TrustWILL can sync customer loyalty data to Shopify Customer Metafields. After syncing, merchants can use loyalty data inside Shopify Admin, Customer Segments, Shopify Flow, theme Liquid, cart drawer, product pages, and supported third-party apps.

What This Feature Does

When enabled, TrustWILL will write each customer’s loyalty data into Shopify customer metafields.

This allows Shopify and the storefront theme to read loyalty information such as:

  • Whether the customer is a loyalty member

  • The customer’s points balance

  • The customer’s current tier name

Plan Availability

This feature is available for merchants on the Growth plan and above.

The data can then be used to personalize storefront content, build Shopify customer segments, trigger Shopify Flow automations, or show rewards information in the cart and account pages.

Metafield Naming

TrustWILLloyalty metafields are app-owned and read-only. Because these metafields are managed by the TrustWILLShopify app, Shopify will show the technical namespace with an app prefix.

The full metafield names are:

Metafield

Meaning

Example

app--5843795--trustwill.loyalty_state

Customer loyalty status

member, guest, excluded

app--5843795--trustwill.points_balance

Customer’s available points balance

320

app--5843795--trustwill.tier_name

Customer’s current tier name

Gold, VIP, Silver

app--181831499777--trustwill is the Shopify app-owned namespace for Trustwill. Merchants do not need to edit this namespace manually.

In Liquid, these fields can be accessed like this:

{% assign loyalty_state = customer.metafields["app--5843795--trustwill"].loyalty_state.value | downcase %}
{% assign points_balance = customer.metafields["app--5843795--trustwill"].points_balance.value | default: 0 | plus: 0 %}
{% assign tier_name = customer.metafields["app--5843795--trustwill"].tier_name.value %}

Example:

{% if customer and loyalty_state == 'member' %}
<p>You have {{ points_balance }} points.</p>
{% else %}
<p>Join rewards to earn points and unlock member benefits.</p>
{% endif %}

How to Enable

  1. Go to TrustWILL Loyalty Admin.

  2. Open Preference.

  3. Go to Shopify Sync.

  4. Find Sync loyalty data to Shopify metafield.

  5. Turn on the sync.

  6. TrustWILL will create or update the customer metafields in Shopify.

  7. After sync, loyalty data will be updated automatically when a customer’s loyalty status, points balance, or tier changes.

Metafield Access and Permissions

TrustWILL loyalty metafields are read-only from the merchant’s perspective.

This means merchants can view and use these metafields in Shopify, but the values should be managed by TrustWILL. When a customer’s loyalty status, points balance, or tier changes, TrustWILL will automatically update the corresponding Shopify customer metafields.

To make the data easier to use across Shopify, TrustWILL enables the following access by default:

  • Storefront access

  • Analytics access

  • Third-party app access, where supported by Shopify permissions

This allows loyalty metafields to be used in storefront Liquid, customer segmentation, analytics, Shopify Flow, and supported third-party apps.

Common Use Cases

Once loyalty data is synced to Shopify metafields, merchants can use it across Shopify for member pricing, storefront personalization, segmentation, and customer analysis.

1. Member Pricing and VIP Promotions

Use loyalty status or tier data to show member-only pricing messages or run member/VIP promotions.

Examples:

  • Member price messaging on Product Page

  • VIP-only campaign offers

  • Discounts for member customer segments

飞书文档 - 图片

2. Shopify Customer Segments

Create Shopify customer segments based on loyalty status, points balance, or tier.

Examples:

  • Loyalty members

  • VIP customers

  • Customers with enough points to redeem

  • Excluded customers

3. Cart Display

Show loyalty information in the cart drawer or cart page before checkout.

Examples:

  • Display points balance

  • Remind customers to redeem rewards

  • Encourage customers to earn more points with the current order

4. Product Page Display

Add a small loyalty module to product pages to introduce rewards and encourage sign-up.

Examples:

  • Show “Earn points with this order”

  • Show member benefits

  • Display points balance for logged-in members

5. Members-Only Access

Use loyalty status or tier data to control access to exclusive content or member-only shopping experiences.

Examples:

  • Members-only product page

  • VIP-only collection

  • Hidden content for non-members

6. Customer Data Analysis

Use synced loyalty data in Shopify customer profiles, reports, analytics, or supported third-party apps.

Examples:

  • Analyze members vs. non-members

  • Review VIP customer behavior

  • Use points balance or tier data in marketing and CRM tools

Did this answer your question?