Shopify Flow integration

CXS Loyalty adds its own triggers and actions to Shopify Flow, Shopify’s automation app. Use them to tag customers, alert your team, or give points when something happens in your store. There’s nothing to connect.

In short

  • A Flow workflow is a rule: “when this happens, check this, then do that”.
  • The app adds 9 loyalty triggers (things that start a workflow) and 5 loyalty actions (steps a workflow can take).
  • You build workflows in the Shopify Flow app, not in the loyalty app.

Set up a workflow#

  1. Install the loyalty app and Shopify Flow on your store. The loyalty triggers and actions are available in Flow straight away.
  2. In Shopify Flow, create a workflow.
  3. Choose a trigger and search for Loyalty to see the loyalty triggers, or pick any other trigger.
  4. Add conditions (checks such as “Change is upgrade”) and actions. Search for loyalty to find the loyalty actions.
  5. Turn on the workflow.

The app only sends a trigger to Flow while you have a workflow turned on that uses it.

Triggers#

A trigger is the event that starts a workflow. Every trigger includes the customer. So you can use Shopify’s customer data in conditions and actions, as well as the fields below.

Trigger Runs when Fields
Loyalty points earned A customer earns spendable points: from an order, a signup or birthday, a challenge, or a manual credit. Points, Points balance, Reason, Channel (online or pos), Earn type
Loyalty points redeemed A customer spends points on a reward and the discount code or store credit has been issued. Points, Points balance, Reward name, Discount code (empty for store credit), Channel
Loyalty VIP tier changed A customer moves up or down a VIP tier because of what they earned, spent or ordered. Previous tier, New tier, Change (upgrade or downgrade)
Loyalty referral completed A referral reward is paid. The referrer and the friend each get their own run. Referral role (referrer or referred), Points, Points balance
Loyalty points expiring soon A customer’s points will expire soon, at the same time as the expiry warning email. Points expiring, Expiry date (YYYY-MM-DD), Points balance
Loyalty reward unlocked Earned points take a customer’s balance past the price of a reward they couldn’t afford before. Reward name (the most expensive one, if several), Points needed, Points balance
Loyalty customer birthday On a customer’s birthday and 7 days before it, for customers who saved a birthday in the loyalty program. Days until birthday (0 or 7), Birthday (MM-DD)
Loyalty churn risk changed The churn risk score moves a customer to another risk level. Risk level (low, medium or high), Previous risk level, Risk score (0 to 100), Reasons
Loyalty customer blocked for fraud You block a customer from a fraud alert on the app’s Customers page. Reason (the fraud signals), Risk score (0 to 100)

The Earn type field on Loyalty points earned says how the points were earned. It is one of: order, account_creation, visit_store, birthday, newsletter_signup, anniversary, receipt_upload, social, review, streak, challenge, badge, win_back, campaign, bulk or manual. To react to one kind of earning only, add a condition on it.

The birthday trigger runs twice per customer: a week before and on the day. Add a condition on Days until birthday to pick one.

Actions#

An action is a step the workflow takes. The loyalty actions change a customer’s points, tier or membership.

Action What it does Fields
Add loyalty points Gives a customer loyalty points. Customer, Points (whole number), Reason (optional)
Remove loyalty points Takes loyalty points away from a customer. Never takes more than their balance. Customer, Points (whole number), Reason (optional)
Set loyalty VIP tier Puts a customer in a VIP tier and keeps them there whatever they earn or spend. Customer, Tier name
Exclude customer from loyalty program Stops a customer from earning, redeeming and referring. Their balance is kept. Customer
Include customer in loyalty program Lets an excluded customer earn, redeem and refer again, with the balance they had. Customer

Good to know about actions#

  • The Reason shows in the customer’s points history.
  • For Tier name, enter the tier’s name as it appears in the loyalty app.
  • To hand the customer back to automatic tier assignment, enter automatic as the tier name.
  • One action can add or remove at most 1,000,000 points. A typo such as an extra zero then fails instead of giving away a fortune.
  • Loyalty actions never start loyalty triggers. For example, Add loyalty points doesn’t run Loyalty points earned. So a workflow can’t loop.
  • If an action can’t run, the workflow run fails. Flow’s run log shows the reason, for example that the tier name doesn’t match.

Example workflows#

  • VIP welcome: Loyalty VIP tier changed → condition Change is upgrade → tag the customer or notify your team.
  • Win-back: Loyalty churn risk changed → condition Risk level is high → Add loyalty points.
  • Fraud follow-up: Loyalty customer blocked for fraud → send an internal email with the Reason.

Example: give a birthday-week bonus. Create a workflow with the trigger Loyalty customer birthday. Add the condition Days until birthday is 7, so it runs only once, a week before. Then add the action Add loyalty points with the points you choose, such as 100, and the reason “Birthday week bonus”. The reason shows in the customer’s points history.

Related: churn risk in the glossary, VIP tiers, AI insights, Fraud protection.