How it works

Follow these 3 simple steps to start syncing Yotpo loyalty points to Shopify customer metafields automatically

yotpo logo icon

Points Changed

App connector: Yotpo Loyalty • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger captures every Yotpo loyalty points transaction in real-time, ensuring Shopify customer data stays synchronized with your loyalty program without requiring batch updates or manual syncing.

When a customer's Yotpo loyalty points balance changes (from earning points on purchases, claiming rewards, redeeming points, or manual adjustments), this trigger activates the workflow and captures loyalty data including {{yotpoloyalty.customer.email}} (the customer's email address) and {{yotpoloyalty.current_balance}} (their new total point balance). The workflow runs for every points change across all customers in your Yotpo loyalty program.

Search Customer

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: Locates the matching Shopify customer record using the email address from Yotpo, ensuring points are synced to the correct customer profile even if customer IDs differ between systems.

This step searches your Shopify customer database using the email address from {{yotpoloyalty.customer.email}}, limiting results to 1 customer. The search returns the Shopify customer ID as {{shopify.0.id}} which is needed to update the metafield. Using email as the matching key ensures the workflow works even if Yotpo and Shopify use different internal customer IDs, as email is typically the common identifier between systems.

Shopify logo icon

Set Customer Metafield

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: Stores the current loyalty points balance directly on the Shopify customer profile as a metafield, making points data accessible to themes, email templates, flows, and other Shopify automations without API calls to Yotpo.

This step creates or updates a metafield on the Shopify customer profile using {{shopify.0.id}} as the customer identifier. The metafield is configured with namespace "custom", key "yotpo_loyalty_points", type "number_integer", and value {{yotpoloyalty.current_balance}}. This creates a metafield accessible as customer.metafields.custom.yotpo_loyalty_points in Shopify Liquid themes and APIs. The metafield updates with each points change, so it always reflects the customer's current balance.

Important note: The first time this workflow runs for a customer, Shopify will automatically create the metafield definition if it doesn't exist. Once created, you can customize the metafield settings in Shopify admin under Settings > Custom Data > Customers.

Make it your own

Customize this workflow even further:

Add additional Yotpo data to metafields
Expand the workflow to store other Yotpo information like VIP tier, redemption history, or points pending from unpaid orders by adding more "Set Customer Metafield" steps with different keys and values from the Yotpo payload.
Display points in customer account pages
Use the metafield in your Shopify theme's customer account template to show loyalty points balance, adding custom Liquid code that reads {{ customer.metafields.custom.yotpo_loyalty_points }} to display the value.
Trigger emails when points thresholds are reached
Add a filter after the metafield update that checks if points exceed certain milestones (like 500 or 1000 points) and sends congratulatory emails or reward notifications when customers reach significant balances.
Segment customers by points balance
Use the metafield to create customer segments in Shopify that group customers by points ranges, enabling targeted marketing campaigns to high-point customers or re-engagement campaigns for low-point customers.

Frequently asked questions

What happens if a customer doesn't exist in Shopify?
The search step will return empty results and the workflow will fail at the metafield update step because there's no customer ID to use. This typically happens if a customer has a Yotpo loyalty account but hasn't placed a Shopify order yet. Consider adding error handling or a filter to skip metafield updates when no customer is found.
Can I customize the metafield name or namespace?
Yes, edit the "Set Customer Metafield" step and change the namespace and key fields to match your preferred naming convention. For example, you could use namespace "loyalty" and key "points_balance" which would make it accessible as customer.metafields.loyalty.points_balance in Liquid.
Will this workflow create duplicate metafields?
No, Shopify's metafield system uses namespace + key as a unique identifier. Each time the workflow runs, it updates the existing metafield value rather than creating duplicates. The customer will always have only one "custom.yotpo_loyalty_points" metafield with the most recent balance.
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to start syncing Yotpo loyalty points to Shopify customer metafields automatically?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Use this template — It's free
7-day free trial • 3 min setup • Cancel anytime