By Andrew B. · May 4, 2026 · 8 min read
How to personalize Klaviyo flows with AI in 2026
AI personalization in Klaviyo is the practice of generating a unique paragraph of email body copy per recipient, grounded in that specific customer's purchase history and your real product catalog, then writing that paragraph to a profile property the email template reads. It's distinct from Klaviyo's native AI features (subject lines, send-time, generic body copy via Composer), all of which produce one output for the whole campaign rather than one per customer.
If you've tried to write a Klaviyo email that says something more specific than Hey {{ first_name }}, you left something behind you've hit Klaviyo's wall. Native personalization stops at profile properties and the most-recent-product-viewed merge tag. There's no way to write "Sarah, the Cast Iron Skillet you almost checked out last night pairs with the Always Pan you bought in March — finishing the set?" in a templating language alone. The AI has to reach into the cart, the order history, and the catalog at the same time.
The fix is a four-step pattern — call it The Four-Step Pattern for shorthand, since you'll set it up the same way for every flow you build — that takes about 30 minutes to wire up the first time and lets the AI write that line for you, per customer, every time the flow fires.
What Klaviyo can and can't do natively
Klaviyo has shipped a lot of AI in the last 18 months: subject-line generation, personalized send-time optimization, and as of 2025, Composer — a tool that drafts entire campaigns from a brief. So it's no longer accurate to say Klaviyo "can't write email copy." It can. The gap is what kind of email copy:
| Capability | Klaviyo native | The Four-Step Pattern |
|---|---|---|
| Generate a subject line | ✅ Yes (AI subject lines) | N/A |
| Optimize send time per customer | ✅ Yes (Smart Send Time) | N/A |
| Generate body copy for the campaign | ✅ Yes (Composer) | ✅ Yes |
| Generate a unique paragraph per recipient | ❌ No | ✅ Yes |
| Reference this customer's actual purchase history | ❌ No | ✅ Yes |
| Reference this customer's specific products from your catalog | ❌ No | ✅ Yes |
| Match brand voice from your real emails | Partial (with prompting) | ✅ Yes |
What Klaviyo does support — and what makes the rest of this work — is profile properties as merge tags. If you can get a string of text onto a customer's profile before the email sends, you can render it in the body. That's the wedge.
The four-step pattern
The pattern is identical for every flow type — replenishment, abandoned cart, post-purchase, winback. Only the trigger and the prompt change.
1. Build the Klaviyo flow with a webhook step
In Klaviyo, set up your flow as you normally would (segment trigger, metric trigger, or date property). Right after the trigger, add a Webhook action pointing at your personalization service. The webhook body should include the customer's identifier so the service knows who to personalize for:
{"profile_id": "{{ person|lookup:'KlaviyoID' }}"}
Note the use of {{ person|lookup:'KlaviyoID' }} rather than the more obvious {{ person.id }} — Klaviyo's person.id template variable returns external_id, which is unset on most profiles and renders as the literal string "None". The lookup form returns the canonical internal Klaviyo profile ID.
2. Add a Time Delay before the email step
Right after the webhook, add a 2-minute Time Delay. This is non-negotiable. Klaviyo's webhook step has a 5-second timeout — your AI service has to respond that fast with a 2xx status to avoid being marked as failed. But generating a personalized paragraph with a model like Claude Haiku takes 5 to 30 seconds depending on prompt size. The fix: your service returns 200 immediately, then runs the AI generation in the background. The 2-minute delay gives the worker time to finish writing the property before the email step reads it.
3. Write the result to a profile property
The AI service generates a personalized paragraph and writes it to a custom property on the Klaviyo profile — for example, personalized_replenishment_pitch. Klaviyo's API supports this via PATCH /api/profiles/{id}/. Once the property is set, it's available to every subsequent step in the flow.
4. Read the property in your email template
In your Klaviyo email template, drop the property in wherever you want the personalized paragraph to appear:
{{ person|lookup:'personalized_replenishment_pitch' }}
That's the whole pattern. Trigger → webhook → 2-minute delay → property read in the email.
What goes in the AI prompt
The AI's job is constrained, not creative. A good prompt has four sections:
- Brand voice and tone — the style the email should sound like, sourced from a sample email or brand guidelines.
- Customer data — the specific customer's purchase history, recent activity, location, anything relevant. Pulled from Klaviyo's API at run time.
- Product catalog — the brand's actual products, so the AI can only reference real items. Pulled from Shopify or wherever the catalog lives.
- Task description — what the AI should write ("a one-paragraph nudge to reorder a consumable they bought 30+ days ago, referencing the specific product and a complementary upsell").
The single biggest failure mode is letting the AI invent products. Always include the catalog as a constraint and explicitly tell the model not to reference anything outside it.
When this is worth doing
The pattern earns its keep anywhere the customer's context varies meaningfully from person to person — which is almost every flow, if you've got the data.
The obvious wins:
- Replenishment for consumable categories. Every customer's reorder pitch is different. The AI references the specific product they bought and when.
- Post-purchase cross-sells. The next-best product depends on what they just bought.
- Abandoned cart. Cart contents are usually diverse enough to write a unique nudge.
The less-obvious — but bigger — wins, if you're collecting pop-up data:
- Welcome series. A pop-up that collects one or two pieces of intent at the moment of opt-in ("What brought you here?", "What's your goal?", "What problem are you trying to solve?") gives the AI everything it needs to flip a welcome email from "here's our product, here's the founder story" to "you said you want to cut back on alcohol — here's why our THC seltzer works for the exact ritual you described." The pop-up is the wedge. The AI is what makes it scale.
- Sale announcements. Generic: "50% off everything." Personalized: "Your favorite hickory rub — the one you bought 3 times last year — is 50% off, plus the matching mustard sauce you've been browsing." The product name, the historical context, the why-this-fits-you framing — all written per recipient.
- Win-back / lapsed customer. Same engine, but the angle is "you told us at signup you wanted to build a meditation habit; you bought our journal three months ago and stopped — here's the next step." Tying the original stated motivation to the current behavior is something a templated email cannot do.
The only flows where this is overkill are pure transactional emails — order confirmation, shipping updates — where the customer wants the data, not a paragraph. Even there, a one-line personalized aside ("we noticed you also browsed X — we'll keep an eye on it for you") can outperform a static footer.
The unifying principle: AI personalization is worth it anywhere you have customer-specific context (purchase history, browse data, opt-in pop-up answers, profile properties). The data is the bottleneck — not the AI. Most brands already have more data than they're using.
What it looks like in different verticals
The Four-Step Pattern is identical regardless of industry — only the prompt and the trigger change. A few hypothetical examples grounded in real brand catalogs:
- Olipop (prebiotic soda). Replenishment flow triggered 30 days after a Variety Pack purchase. AI output references the customer's specific flavor preferences from their order history: "You've been on the Cherry Cola wave — and the Strawberry Vanilla case in March suggests you're a Variety Pack person at heart. Restock?"
- Our Place (cookware). Post-purchase cross-sell triggered after an Always Pan purchase. AI output suggests the natural next-step product: "The Always Pan handles 80% of what you'll cook in the next month. The Cast Iron Pan picks up the other 20% — sears, dutch-oven moves, anything that needs heat retention. Bundle's $80 off this week."
- Starface (skincare). Variant nudge triggered for repeat patch purchasers. AI output references their actual color history: "u've bought Big Yellow twice this year — wild guess but want to try Cherry Tomato (just dropped) for a lil change up? we'll throw in free shipping."
Three different brands, three different voices, one pattern.
What you need to build it
You need three things:
- A way to receive a webhook from Klaviyo (any HTTP server)
- An LLM API account (Anthropic, OpenAI, or AWS Bedrock)
- A way to write back to Klaviyo's profile API
You can stitch these together yourself with a Lambda or Cloud Function, or you can use a service that handles all three plus the prompt-engineering layer:
| DIY (Lambda + LLM API + Klaviyo) | Send Personal | |
|---|---|---|
| Setup time, first flow | 20–40 hours of engineering | ~5 minutes once Klaviyo is connected |
| Setup time, each additional flow | 4–10 hours | ~5 minutes |
| Prompt engineering | You build and tune it | Built in; voice tuned to your sample emails |
| Brand-voice fidelity | Depends on prompt skill | Pre-tuned per brand |
| Catalog grounding (no hallucinated products) | You build the constraint | Built in via Shopify connection |
| Hosting / infra | Your AWS account | Fully managed |
| Cost | LLM API + your engineering time | $39.99/month + $0.005 per personalization. First 1,000 personalizations free. |
If you have an engineering team and one flow to ship, DIY is fine. If you have many flows, multiple brands, or no internal engineering, a managed service pays for itself quickly — most accounts hit the $39.99 break-even within the first few hundred personalizations a month.
Frequently asked questions
Does Klaviyo have native AI personalization?
Klaviyo has AI subject-line generation, personalized send time optimization, and (via Composer) campaign-level body copy generation. What it does NOT have is per-customer body copy grounded in that specific customer's purchase history. Klaviyo's AI writes one email for everyone; you still need an external service to write a unique paragraph per recipient that references their actual orders.
Will this slow down my flow?
Yes — by 30 to 60 seconds, which is why you add a 2-minute Time Delay between the webhook and the email step. The webhook itself returns instantly; the AI generation runs in the background and writes the property before the email step reads it.
Can the AI hallucinate products that don't exist?
Only if the prompt is set up wrong. A correctly-built personalization service grounds the AI in two specific data sources: the customer's actual purchase events from Klaviyo, and your real product catalog. The model is constrained to only reference products that appear in those inputs.
What's the best Klaviyo flow to personalize first?
Replenishment for consumable categories. The trigger audience is narrowly defined ('bought a consumable 30+ days ago'), the customer's product context is obvious, and the AI's job is the most concrete — recommend a reorder. We've consistently seen click rates and conversions come up versus the generic winback equivalent, though exact lift varies by brand.