Marketing automation for ecommerce: the data and triggers behind your email and SMS flows
Marketing automation for ecommerce runs on data. See which events trigger each flow, why flows misfire, how consent works and when custom events pay off.
By Rokibul Hasan8 min read
- E-commerce
- Marketing

An abandoned checkout email arrives two hours after the customer bought. A win-back offer goes to someone who ordered through another channel last week. An "on its way" message lands before the parcel has left the building. Marketing automation for ecommerce runs on events and consent records, and when those are late, missing or wrong, the flows misbehave however good the writing is.
This guide is for store owners and whoever looks after their Klaviyo, Shopify Messaging or HubSpot account. It covers the event behind each common flow, how consent has to be stored, why marketplace buyers sit outside your audience, how to debug a flow that did not fire, and when a custom event is worth building.
I do not run stores or do marketing; I build e-commerce automation and integrations. So there is nothing here on subject lines or discount strategy, only the data they depend on.
The event behind each common flow
Every flow is a trigger plus filters. This table uses Klaviyo's metric names because its Shopify data reference documents them well; other tools have equivalents.
| Flow | Trigger | Where it comes from | Check first |
|---|---|---|---|
| Browse abandonment | Viewed Product | Script on your storefront | Only visitors who are known and trackable |
| Abandoned cart | Added to Cart | Shopify pixel, with "Track behavioral events" on | As above, plus your privacy settings |
| Abandoned checkout | Checkout Started | Shopify, once it has a valid email or phone | Does the flow exit when an order lands? |
| Order follow-up | Placed Order or Fulfilled Order | Shopify | Fulfilled does not mean delivered |
| Review request | Delivered Shipment | Carrier data passed through Shopify | Only certain carriers provide it |
| Win-back | No order for a set period | A segment on order history | Which orders can it see? |
Three details in that reference explain a lot of odd behaviour:
- Events do not update. Klaviyo "does not re-sync metrics after the initial event takes place", so a tag added to an order later never reaches the flow.
- Refunded Order means a full refund. Partial refunds do not trigger it.
- Placed Order and Ordered Product arrive seconds apart. Pick one and use it throughout. A flow triggered by Placed Order that filters out people with an Ordered Product event can skip everyone.
If you use Shopify's own tools, the Customer abandons checkout trigger in Flow has a template that emails 10 hours after a customer reaches checkout without ordering, by default only to customers subscribed to marketing.
Consent is data, so store it like data
A marketing list is a record of who agreed to what, on which channel, and when. It deserves the care you give order data.
Keep channels separate. Shopify holds email and SMS consent separately and sends separate webhooks when they change: customers_email_marketing_consent/update for email and customers_marketing_consent/update for SMS. An integration that copies consent elsewhere has to listen to both.
Treat subscribing as its own action. In Klaviyo, adding a profile to a list does not change its subscription status. The Bulk Subscribe Profiles endpoint does, and it has a sharp edge: it removes existing unsubscribes, spam reports and manual suppressions from the profiles you submit. A careless import can re-subscribe people who opted out. Filter the file first, and when bringing over history, use historical_import with a real consented_at date.
Expect stricter rules for texts. US rules under the TCPA generally require prior express written consent for automated marketing texts, and UK rules treat texts much like email. Take advice before importing a phone list. WhatsApp has opt-in rules of its own, which the order notifications guide covers.
Expect cookie consent to shrink browsing flows. Klaviyo says it may not track onsite events for visitors in the EU, EEA, UK and Switzerland unless they have consented under your Shopify privacy settings. Browse and cart flows only ever see part of your traffic.
Marketplace buyers are not your audience
Selling on Amazon or Etsy gives you orders, not a mailing list, which puts a hard limit on marketing automation for ecommerce.
Amazon's Acceptable Use Policy for its APIs says "Do not target Amazon Customers for product marketing", and limits customer details to merchant-fulfilled shipping and legal or tax requirements. Etsy's Seller Policy bars adding a buyer to a mailing list without consent.
This shapes system design, because marketplace orders often land in Shopify through a connector, and anything in Shopify can travel on to your email tool. Three checks:
- See how those orders appear. Klaviyo syncs Shopify's
source_namewith Placed Order. Shopify's own values includewebandpos, and channel apps set their own, so inspect a recent marketplace order. - Filter flows on it. A trigger filter of Source Name equals
webkeeps a post-purchase flow to your own storefront. - Watch your contact count. Merchants on Shopify's community forum report placeholder addresses from marketplace orders inflating contact numbers in email apps, and Klaviyo prices on active profiles.
The cost is a blind spot. Your win-back flow will not know that a customer reordered on Amazon, and you cannot legitimately join the two records to find out.
Why a flow did not fire: a debugging order
Work through these in order.
- Did the event arrive? Open the person's activity feed. No event means a tracking or integration fault, and no flow setting will help.
- Is it attached to a person? Pixel events such as Added to Cart only attach once the visitor is identified, for example by a form, checkout details or a login.
- Can they be messaged? Check consent for that channel, not the customer record in general.
- Do the trigger and the filters disagree? Mixed metrics are the usual culprit, as with Placed Order and Ordered Product above.
- Is the timing what you think? Shopify treats a checkout as abandoned when it stays incomplete for more than ten minutes after the customer gives an email address, and your flow's delay comes on top of that.
- Are you branching on opens? Klaviyo's documentation says Apple Mail Privacy Protection loads tracking pixels whether or not anyone reads the email, and that it cannot tell those opens from human ones. Branch on clicks or orders instead.
A worked example: a reorder reminder from product data
Standard events say what happened. Some flows need facts only you hold. Take an invented store selling a supplement in 30-day and 90-day tubs, which wants to remind people a week before they run out.
- Store the fact on the product. Add a metafield such as
days_supply. - Listen for paid orders. On Shopify's
orders/paidwebhook, read each line item and its metafield. - Work out the date. Order date, plus days of supply multiplied by quantity, plus a fixed allowance for delivery.
- Send a custom event. Klaviyo's Create Event endpoint (
POST /api/events) takes an event called, say, Reorder Due, with the SKU and run-out date as properties. Setunique_idfrom the order and line number: Klaviyo records only the first event with that ID for a profile and metric, so a retried webhook cannot fire it twice. - Build the flow on that event, waiting until a week before the date, with a filter that stops if the person has ordered that SKU since.
- Handle reversals. Refunded Order only covers full refunds, so have your service send a second event when a line is cancelled or refunded, and filter on it.
Shopify Flow can carry a simple version with its Send HTTP request action, subject to the plan gates in the Shopify Flow guide.
Marketing automation for ecommerce: which tool fits your data
| Tool | How it gets store data | Published pricing, November 2026 | Fits |
|---|---|---|---|
| Shopify Messaging | Built in, so there is no sync to break | 10,000 free emails a month, then $1 per 1,000; abandoned checkout emails are free | Standard flows |
| Klaviyo | Real-time Shopify sync, plus an events API | Free to 250 active profiles and 500 emails a month, then priced on active profiles | Finer segments and custom events |
| HubSpot Marketing Hub | Data Sync: contacts and products both ways, orders and carts one way, no metafields | Professional starts at about $800 a month, plus a required $3,000 onboarding fee | Businesses with a sales team, such as wholesale |
HubSpot marketing automation makes most sense when a person, not a flow, closes the sale, and contact records matter as much as orders. The CRM automation guide covers keeping those records clean. For a store selling direct to consumers, its pricing is hard to justify on email alone.
When custom data is worth building
Get the standard flows running first. A custom build before those work only adds a second thing to debug.
After that, custom data earns its place when a flow depends on something outside your store platform: a subscription system, a warehouse or 3PL with real delivery dates, an ERP, or product logic like the example above.
A feed of custom events from your store or warehouse system into your email tool is the kind of single automation my Marketplace & e-commerce apps MVP plan covers, from $2,500. That is a starting price, and every project gets a fixed quote after a short brief.
FAQ
Can I add my Amazon customers to my email list?
No. Amazon's Acceptable Use Policy for its APIs says not to target Amazon customers for product marketing, and customer details may only be used for merchant-fulfilled shipping and legal or tax requirements. Etsy's Seller Policy similarly requires consent before adding a buyer to a mailing list. Build your list from your own store and sign-up forms, and check that marketplace orders imported into Shopify do not enter your marketing flows by accident.
Why do customers get abandoned checkout emails after they have already bought?
Usually the flow has no working exit. The wait runs, and nothing checks whether an order arrived in the meantime. Make sure a flow filter excludes anyone who has placed an order since the flow started, and that checkout and order events attach to the same profile. A customer who abandons with one email address and buys with another will still get the message, because to the system they are two people.
Is Shopify Messaging enough, or do I need Klaviyo?
For many stores Shopify Messaging is enough. It reads store data directly, includes 10,000 free emails a month and does not charge for abandoned checkout emails, and Shopify Flow can extend it. Look at Klaviyo when you need finer segments or custom events from other systems such as a warehouse or subscription tool. Klaviyo's pricing follows active profiles, so work out the cost at your real list size before moving.
If your flows need data your email tool cannot see, send me a short brief: your store platform, your email tool, which flow misbehaves and where the missing data lives. You can start from the marketplace MVP plan, read about custom e-commerce automation, or see what Shopify Flow can do before paying for anything.


