The problem: “after 30 days” doesn’t suit everyone
A classic replenishment email goes out at a fixed time: 30, 45 or 60 days after the purchase. That’s right on average, but wrong for almost every individual customer.
For someone who orders every two weeks, day 30 is too late – they have already bought elsewhere. For someone who orders every two months, day 30 is too early, and they learn that our emails aren’t about them.
In this store, a large share of customers order from the same product family at a regular, predictable pace. We wanted to use that rhythm: every customer gets a reminder based on their own ordering cycle.
How does n8n do the calculation?
Klaviyo on its own can’t calculate a personal date from the gaps between a customer’s past orders. So an n8n workflow does the calculation and writes the result back to the Klaviyo profile.
- TriggerA webhook arrives with the customer’s email addressA Klaviyo flow starts it after an order, for customers with more than three orders.
- LookupFind the Klaviyo profileBy email address, to get the profile ID.
- LookupFetch the last 10 orders from WooCommerceOnly completed and processing orders count.
- n8nCalculate the ordering cycleThe median number of days between orders, using gaps between 3 and 120 days.
- n8nWhich product variants haven’t they tried yet?The entry product (trial pack) doesn’t count. Up to 3 suggestions.
- ActionUpdate profile properties in KlaviyoExpected next order date, messaging start date, suggested products.
Why the median and not the average?
If someone once didn’t order for three months (holiday, stocking up), the average shifts, the median doesn’t. Gaps shorter than 3 days (duplicate orders) and longer than 120 days (lapses) are left out. Without enough data, the system uses a 30-day default.
What does it write back to Klaviyo?
- The expected date of the next order: last order + the customer’s own cycle.
- The messaging start date: 7 days earlier, so the email arrives while there’s still time to order.
- Suggested product variants: the ones they haven’t bought in their last 10 orders.
- The estimated cycle in days and the number of orders analysed – these are used for segmentation.
How the Klaviyo flow is built
The flow isn’t triggered by an event but by a date: the messaging start date written to the profile. Customers enter at 9 a.m., and only those with at least 3 previous orders – for them the cycle is reliable.
- TriggerDate-based triggerOn the messaging start date, at 9 a.m. Condition: at least 3 orders.
- EmailEmail 1 – advice, at noonNot a promotion: why it’s worth varying what you buy. A/B-tested subject line.
- Wait4 daysTimed for 4 p.m.
- SplitWhich variant haven’t they tried yet?A separate branch per variant, based on the suggestion in the profile.
- EmailEmail 2 – “You haven’t tried this yet”One specific variant, no discount.
- Wait2 days
- ActionGenerate a unique 15% coupon, valid for 3 daysVia webhook, directly in the store – every customer gets their own code.
- EmailEmail 3 – the new variant with a discount
- Wait1 day
- SMSSMS with the coupon codeOnly for SMS subscribers.
- Wait1 day
- EmailEmail 4 – “Only 24 hours left”
- ExitExit on order – at any stepCustomers can re-enter after 30 days at the earliest.
Two things stand out. First: the first two emails have no discount. Customers who would order anyway order without one, so we don’t give away margin. Second: the coupon isn’t a shared code but a unique, expiring code per customer that can’t end up on a coupon site.
The results
The flow went live in June 2026. The figures below cover roughly four months, from launch to early October.
| Channel | Recipients | Orders | Revenue | Placed-order rate |
|---|---|---|---|---|
| 24,353 | 1,197 | $92.4K | 4.92% | |
| SMS | 3,663 | 236 | $18.9K | 6.44% |
| Total | 28,016 | 1,433 | $111.3K | 5.11% |
- $3.79 revenue per email recipient – roughly two and a half times the browse abandonment flow in the same store.
- 56.9% open rate and 5.4% click rate.
- 0.07% unsubscribe rate – a sign that the email arrives at the right time and isn’t a nuisance.
What can you take from this?
- Don’t time it to a fixed day – time it to the customer’s own rhythm. You don’t need an expensive tool for this: an n8n workflow and a few profile properties are enough.
- Lead with advice, not a discount. The coupon belongs at the end of the sequence, for those who haven’t ordered by then.
- Use what they haven’t bought yet. The “try this too” email is replenishment and cross-sell in one.
- Unique, expiring coupons. Measurable, they don’t leak, and they create real urgency.
- Only build on reliable data. Below three orders there is no meaningful cycle – a simpler second-purchase flow takes care of those customers.
This works in any store where customers come back regularly for the same thing: cosmetics, supplements, coffee, cleaning products, printer ink. The logic is the same; only the length of the cycle changes.
Frequently asked questions
Do I need a developer?
Not necessarily. The n8n workflow uses the standard WooCommerce API and writes the result to Klaviyo as profile properties. The store’s code doesn’t need to be touched.
Does it work with Shopify or other platforms?
Yes. Orders can be fetched from any ecommerce platform, and the calculation is the same. Instead of Klaviyo, another email platform can receive the data if it can start a date-based automation.
What about customers who have only bought once?
This flow doesn’t reach them, because they don’t have a cycle yet. They get a second-purchase sequence that uses the product’s typical usage time.
The figures in this article come from a real client account, without naming the company or its products. Hungarian forint amounts are converted at 335 HUF = 1 USD.