Shopify Flow: triggers and actions
Start a workflow when something happens on a Pass Studio pass, and run Pass Studio steps from any workflow: issue a pass, send a message to it, update its fields, add points, revoke it.
What it does
Pass Studio adds nine triggers to Shopify Flow. Each one fires for one holder and carries the Shopify customer, so the rest of the workflow can use every native customer step. Flow is included on every Shopify plan; there is nothing to buy and nothing to configure in Pass Studio.
Set up a workflow
- In Shopify admin open Apps → Flow and click Create workflow.
- Click Select a trigger, choose Pass Studio, then the trigger you want.
- Add conditions and actions as in any workflow, then Turn on workflow.
The trigger's fields appear in the editor as variables, for example {{ holderEmail }} or {{ balance }}. Every field is text; numbers such as the balance arrive as text and compare as numbers in a condition after a plus: 0 filter. Pass Studio sends an event to a store only while at least one workflow on that store uses a Pass Studio trigger; the Settings → Integrations → Shopify card shows how many are in use.
Start from a template
Pass Studio's ready-made workflows are in Flow's template library: in Flow click Browse templates and search for Pass Studio. Pick one, adjust it, then Turn on workflow. Each needs Pass Studio installed and this store connected, plus what is listed below.
- Save a customer's points balance to a metafield when their Pass Studio points change: Writes the new balance to the customer metafield custom.loyalty_points, so segments, Klaviyo and other apps can read it. Needs: Nothing more. Optionally define custom.loyalty_points as an integer customer metafield in Settings → Custom data.
- Save a customer's tier as a metafield and tag when their Pass Studio tier changes: Writes the tier name to custom.loyalty_tier and adds it as a customer tag. Needs: Tiers set up on the Loyalty / Membership card in Pass Studio.
- Message the Pass Studio card when a customer is tagged vip: Shows a notification on the customer's pass when the tag vip is added. Change the tag and the message to fit your program. Needs: The customer holds the store's auto-issue pass, or a pass id is entered in the action.
- Tag customers who add their Pass Studio card to a wallet: Adds the tag wallet when a customer adds the pass to Apple Wallet or Google Wallet, so segments and email flows can target card holders. Needs: Nothing more. Change the tag name in the action if you prefer another.
- Award Smile points when a visit is counted on a Pass Studio card: Adjusts the customer's Smile points balance when a staff scan counts a visit on a membership card. Change the points in the action. Needs: Smile on the Essential plan or above; visits are counted by the Pass Studio register app.
- Award Smile points when a customer adds their Pass Studio card to a wallet: Sends a Smile activity when the customer adds the pass to a wallet, so they earn points for it. Needs: Smile on the Essential plan or above. In Smile, create a Shopify Flow activity and paste its activity type into the action.
- Copy Yotpo points and tier to a Pass Studio wallet card when an order is paid: On every paid order, copies the customer's Yotpo points balance and VIP tier into custom.loyalty_points and custom.loyalty_tier, which the Loyalty / Membership card reads. Manual point adjustments reach the card on the customer's next order. Needs: Yotpo Loyalty & Referrals on Pro or above, and the card's Points and Tier slots mapped to custom.loyalty_points and custom.loyalty_tier.
Fields on every trigger
| customer | The Shopify customer linked to the holder, with every native customer action available. Empty when the holder has no Shopify customer yet. |
| holderEmail | The holder's email. |
| holderPhone | The holder's phone, as entered. |
| passstudioHolderId | Pass Studio's stable holder id. |
| passId, passName | The pass (card design) and its name in Studio. |
| instanceId | This holder's pass instance. |
| barcodeContent | The code rendered in the holder's barcode. |
| addToWalletUrl | The holder's own Add to Wallet link. |
| platform | apple, google or web. |
| utmSource, utmMedium, utmCampaign | First-touch acquisition UTM, when the pass came from a tagged link. |
The triggers
Pass issued
A pass is issued to a holder: by the API, Zapier, a sign-up form or Shopify auto-issue, before it is added to a wallet.
Pass added to wallet
A holder adds the pass to Apple Wallet or Google Wallet for the first time on that platform.
Pass removed from wallet
A holder deletes the pass from their wallet, or you revoke it.
Pass redeemed
A redemption is accepted: a Shopify checkout code, a Square or POS register scan, or an API scan.
| source | shopify, square, pos or api. |
| orderId | The order the code was used on. |
| discountCode | The Shopify discount code. |
| saleAmount | The sale amount reported with the redemption. |
| locationId | The POS location or register. |
| remainingUses | Uses left on a multi-use pass. |
Points changed
A loyalty member's balance changes: earned on an order, adjusted by staff or the API, or spent on a reward.
| delta | The change, negative when points were spent or removed. |
| balance | The balance after the change. |
| reason | The reason given, or order / reward. |
| orderId | The Shopify order that earned the points, when there is one. |
Tier changed
A loyalty member moves to another tier.
| tier, tierIndex | The new tier and its position, 0 for the base tier. |
| previousTier | The tier the member left. |
| direction | up or down. |
Reward unlocked
A member's balance reaches a reward threshold and the reward is placed on the card.
| rewardTitle, rewardCode | The reward as named on the card and its code. |
| balance | The balance when it unlocked. |
Visit counted
A staff scan at a register counts as a visit for a membership card.
| registerName | The register that scanned the card. |
| visitCount | Visits so far, including this one. |
Journey advanced
A pass moves to the next step of its journey after a redemption.
| fromPassId, fromPassName | The pass the holder came from. |
| toPassId, toPassName | The pass the holder now has. |
The actions
Five Pass Studio actions appear in Flow's action picker. Each takes the workflow's customer and runs on that customer's pass, under the same rules as the API: issue credits, push credits, pass status and error messages are the ones documented there. A customer who has no pass is not a failure: the action returns matched = false, and a condition on that value can branch the workflow (guests on Order paid are normal).
- Issue pass: issue the pass to the customer and email the Add to Wallet link. Returns
addToWalletUrl,instanceIdandcreated(false when the customer already held it) for later steps, so an email step can carry the link. - Send message to the customer's pass: a notification on the pass, up to 200 characters. One push credit.
- Update the customer's pass fields: field values as
KEY=valuelines, a photo URL, a barcode value, an optional message. One push credit per run. - Add or remove points: a whole number, negative to remove; rewards unlock as on any earn. Returns
balance,previousBalanceandrewardUnlocked. - Revoke the customer's pass: removes it from the wallet; the pass is archived, never deleted.
The Pass id field is optional on every action: empty means the store's auto-issue pass. For another pass, copy the id from Studio → your pass → Integrations; a wrong id is refused when the workflow is saved. The customer is matched to a holder by the Shopify customer stamped on the pass, else by the customer's email.
Good to know
- The customer is attached when the holder is linked to a Shopify customer: every order-driven holder, every holder enrolled from a Shopify invite, and any holder whose email matches a customer on the store. A holder with no match arrives with the email fields only.
- Order completed is not a Pass Studio trigger. Use Shopify's own Order paid trigger; the points it earned arrive through Points changed.
- Anything the actions do not cover, Shopify's Send HTTP request action can call on the Pass Studio API.
- Every event also reaches your webhooks and Zapier as before.