Storefront triggers: run Flow on what shoppers do
Every trigger in this app so far started from something that happened in your admin: an order was paid, a product was updated. This release adds triggers that start from what a shopper does on your storefront.
Shopify does not send webhooks for browsing behaviour, so these are collected by a web pixel the app installs for you - no theme edit, no code to paste.
Storefront triggers
Setup, permissions and what each trigger sends: Storefront triggers.
- Storefront Product Viewed and Storefront Collection Viewed
- Storefront Product Added to Cart and Removed from Cart
- Storefront Cart Viewed
- Storefront Checkout Started
- Storefront Search and Storefront Search Returned No Results - the second is a live list of things shoppers expected you to sell. A single search fires exactly one of the two, so you can enable both without double counting. How the two search triggers split.
- Out-of-Stock Variant Viewed - a real shopper looked at something you cannot sell them. A restock demand signal, per variant rather than per product. What counts as out of stock.
- Signed-In Customer Visited and B2B Buyer Visited - a returning customer is on your store. Repeat page views collapse into a visit window you choose, per customer or per company. Visit windows explained.
Checkout triggers
Details: Checkout triggers.
- Checkout Error Shown - find out checkout is failing without waiting for a support ticket.
- Checkout Discount Code Rejected - a shopper typed a code and checkout refused it. Usually an expired campaign or a code from an email that was never activated.
- First-Time Customer Order - an order from a customer who has never ordered before, with the customer and the order as native Flow references. It comes from Shopify's order webhook, so unlike the two above it is as reliable as any admin trigger. Listed in the trigger reference.
Custom Storefront Triggers
For anything Shopify does not report at all. Publish your own event from your theme with one line of JavaScript and it becomes a Flow trigger. Step by step, with the snippet to copy: Custom Storefront Triggers.
The clearest case is the cart drawer: Shopify's cart view event only fires on the /cart page, and most modern themes slide a drawer open instead and never navigate there. Publishing your own event when the drawer opens closes that gap. Wishlist adds, size-guide opens and variant switches work the same way.
Only event names you have registered are forwarded, so other scripts on your page cannot spend your allowance. Naming the event and using it in Shopify Flow.
Before you switch these on
- They need the new Storefront Behaviour permission, granted from the Permissions page like any other. What the permission covers.
- Shopper consent is respected. If a shopper has not given analytics consent the event is dropped in their browser and never reaches us - it costs you nothing and starts no workflow. How consent is handled.
- They are much higher volume than admin triggers. A busy store produces more product views in a day than order updates in a year, and every event counts towards your plan. Switch on only what a workflow uses. Plans and usage.
- They are best effort, not guaranteed. A closed tab, a dropped connection or an ad blocker means the event never arrives. Use them for signals and reactions, not for anything where a missed event would be a correctness problem.
Full detail, including how Out-of-Stock Variant Viewed decides what counts as out of stock, is in the Storefront triggers guide.
Generate trigger code with AI
Describe what a custom trigger should do in plain English and let AI write the code. On Developer -> Connections, add your own Anthropic or OpenAI API key; generation runs on your account, and the key is encrypted, never shown again and never run inside your trigger code. Full guide: Generate trigger code with AI. Need a key first? Get an Anthropic (Claude) API key or get an OpenAI API key.
- Grounded in what the trigger actually receives. The generator is told this app's runtime contract, the Shopify Admin API and - once you have captured one - the real event payload, so it writes
payload.total_pricebecause it can see the field rather than guessing at a name. What it knows. - Builds on what you have. If there is already code it edits that rather than starting over, so "now also do X" works.
- Never saves on its own. Generated code lands in the editor as an unsaved change: test it against your captured payload, read what it would fire, then save. Generate a custom trigger.
- Writes the theme snippet for Custom Storefront Triggers, which is the part people get stuck on because every theme names its elements differently. Generate a storefront snippet.
Also fixed
- The Add Trigger list on Metafield Triggers could stay empty for up to an hour after granting a permission, saying no definitions existed although they did. The empty result was being cached; it no longer is, so the list fills the next time you open it. The same applied to the metaobject list. See Metafield triggers and Metaobject triggers.
- Product Published to Channel and Unpublished from Channel missed the first change on a newly created product. The app stores a baseline the first time it sees a record and only fires on a difference from it, and for publications that baseline was never written at creation - so the first publish after creating a product was silently swallowed and only the second fired. Both now work from the first change. Product triggers in the reference.

