Skip to main content
GUIDE · KLAVIYO FLOWS9 min read

Powering Klaviyo flows with TrackLayer server-side events

A practical implementation guide for teams that want Klaviyo to orchestrate lifecycle messaging while TrackLayer supplies the trustworthy trigger events behind the scenes.

Context

Why server-side flow triggers

The biggest reason to move Klaviyo flow triggers server-side is reliability. Browser pixels are useful, but they sit in the most failure-prone part of the stack. Ad blockers suppress requests, privacy settings shorten attribution windows, checkout redirects break session continuity, and mobile browsers routinely drop the exact moments marketers care about most. That means a customer can start a cart, reach checkout, or complete a purchase without Klaviyo seeing the full sequence clearly enough to enter or exit a flow at the right time.

TrackLayer changes that by sending the event from the system that actually knows what happened. A cart service can confirm the cart exists, the checkout layer can confirm the user advanced, and the order service can confirm payment settled. That makes abandoned cart logic more dependable, improves cross-device continuity when identity is already resolved upstream, and prevents customers from getting stale reminders after they already purchased on another device or through a returning session.

Priorities

6 high-value flows to wire

Not every Klaviyo flow needs a custom event model on day one. The highest-value motion is to start with the flows where timing, identity, and dedup matter most, then expand once the metric map is stable.

FlowTrigger eventConversion eventTypical uplift
Welcome seriessign_uppurchase+10% to +20% email-attributed first order rate
Abandoned cartcart_startedpurchase+8% to +15% recovered checkout revenue
Browse abandonmentproduct_viewedcheckout_started+4% to +9% return-to-site rate
Post-purchase upsellpurchaserepeat_purchase+6% to +12% second-order rate
Winbackbecame_at_riskpurchase+5% to +11% reactivation rate
Back-in-stockinventory_restockedpurchase+12% to +25% waitlist conversion rate
Setup

Configuring Klaviyo

Step 1

Create a dedicated metric map

In Klaviyo, open Metrics and confirm the names you want lifecycle marketing to use. Keep them readable for the marketing team, then map them from TrackLayer canonical names in your destination config instead of hard-coding Klaviyo-specific labels into upstream collection.

Screenshot placeholder

Screenshot placeholder — Metrics view with TrackLayer-owned flow metrics highlighted

Step 2

Draft each flow off the server-side metric

Build the flow trigger in Flow Builder using the mapped Klaviyo metric, not a pageview or legacy onsite tracker event. Add filters for source = tracklayer or destination_version when you need to separate new server-side traffic from older browser-based behavior during rollout.

Screenshot placeholder

Screenshot placeholder — Flow Builder trigger panel set to the mapped metric

Step 3

Attach profile and catalog properties

Make sure each metric includes the fields the flow will branch on: cart value, product IDs, category, subscription state, locale, order count, or predicted lifecycle stage. This keeps splits and personalization deterministic instead of relying on fuzzy downstream inference.

Screenshot placeholder

Screenshot placeholder — Metric activity detail showing event properties used in splits

Step 4

Validate the trigger path end to end

Send one controlled test event through TrackLayer, confirm the metric lands on the right profile, then run a draft flow with delay blocks and conditional splits enabled. Validate suppression rules, list membership, consent, and exit conditions before turning the flow live.

Screenshot placeholder

Screenshot placeholder — Test profile timeline with trigger, delay, split, and exit condition

Deep Dive

Flow deep-dive: Abandoned cart

A clean abandoned cart flow starts with TrackLayer recording `cart_started` when the cart becomes meaningful enough to recover. That usually means the customer is identified, the cart has a stable `cart_id`, and the payload includes line items, value, currency, and a recoverable checkout URL. When the customer moves forward, TrackLayer emits `checkout_started` with the same cart or checkout linkage so Klaviyo can branch the journey or tighten the reminder copy. If the customer buys, TrackLayer sends `purchase`, which should immediately qualify them for a flow exit filter or a “skip if Placed Order since starting this flow” guard. If no purchase lands, the abandonment timer runs out and the flow fires after one hour with a message tailored to cart value, SKU mix, or first-time versus repeat-buyer status.

The main implementation risk is racing Klaviyo's native cart tracker. If Klaviyo's onsite script is also sending Added to Cart or Started Checkout from the browser, one shopper action can enter the flow twice. The safest pattern is to let TrackLayer own authoritative cart and checkout triggers, then either disable the overlapping Klaviyo browser event or filter the flow to only admit events where `source = tracklayer`. Keep one shared dedup key across retries so a delayed webhook cannot create a second recovery path for the same cart.

Schema

Metric name mapping

TrackLayer should stay destination-neutral upstream. The mapping into marketer-friendly Klaviyo metric names belongs at the destination layer so analytics, warehouse exports, and ad destinations can still consume the same canonical event stream.

TrackLayer canonicalKlaviyo metric
sign_upSubscribed to List
cart_startedStarted Cart
checkout_startedStarted Checkout
purchasePlaced Order
repeat_purchasePlaced Repeat Order
product_viewedViewed Product
inventory_restockedBack in Stock
became_at_riskEntered Winback Window
Audiences

Segment sync

TrackLayer does not need Klaviyo to be the system that computes every audience. If your segmentation logic already lives in TrackLayer, the `/segments` layer can act as the control plane for who should be eligible for a given lifecycle motion. A segment such as high-intent browsers, VIP customers, first-order buyers, at-risk subscribers, or churned subscription customers can be materialized upstream, then synced into a matching Klaviyo list or profile property for message orchestration.

This becomes especially useful when the same audience needs to exist in several tools at once. TrackLayer can compute the segment once, sync it to Klaviyo for flows, send it to ad platforms for suppression or retargeting, and export it to the warehouse for analysis. Klaviyo still handles list-triggered flows and channel suppression, but audience eligibility stays consistent because the segment definition is not being reimplemented by hand inside each destination.

Experimentation

A/B testing flows

TrackLayer experiments and Klaviyo conditional splits solve different problems and should not compete. TrackLayer should own experiment assignment when you need one variant definition shared across the site, ads, analytics, and lifecycle messaging. In that model, the event arrives with `experiment_id`, `variant`, or treatment metadata already attached, and Klaviyo reads those properties to branch copy, timing, incentives, or channel mix.

Klaviyo conditional splits are still useful, but treat them as execution logic inside the flow rather than the source of truth for experiment assignment. That keeps analysis much cleaner. You can answer whether Variant B lifted recovered revenue or repeat order rate using the same assignment data everywhere, while Klaviyo continues to handle message sequencing, holdouts, and audience-safe delivery rules.

FAQ

Common questions

Can Recharge subscription events trigger Klaviyo flows through TrackLayer?

Yes. Treat subscription lifecycle actions such as subscription_started, renewal_charged, skipped_order, and subscription_cancelled as first-class TrackLayer events, then map them into Klaviyo metrics for lifecycle automation. The key is to keep the subscription ID, order value, cadence, and next charge date on the event so flows can segment accurately.

Can back-in-stock flows work for stores that are not on Shopify?

Yes. The flow does not depend on Shopify as long as TrackLayer can emit inventory_restocked with product identifiers, variant identifiers, and enough profile context to match the waitlisted user. Any commerce stack that can produce a reliable stock event can feed the same Klaviyo flow pattern.

How should transactional and marketing flows be separated?

Use TrackLayer to classify the event purpose upstream, then route transactional confirmations, payment notices, or service alerts into the right Klaviyo path with consent-safe handling. Marketing flows should respect promotional consent and suppression logic, while transactional flows should stay narrow, operational, and independently auditable.

How does double opt-in affect flow entry?

If double opt-in is enabled, let TrackLayer record the original sign_up event for analytics, but only subscribe the profile to the marketing list once the confirmation state is complete. That prevents a welcome series from firing before the profile has actually completed the opt-in journey.

Should unsubscribe events be sent back through TrackLayer?

Yes, when you want suppression state to be visible across destinations. Klaviyo is still the authority for list-level unsubscribe enforcement, but TrackLayer can ingest unsubscribe or consent_revoked events so segments, warehouse exports, ad audiences, and experimentation logic all react to the same consent state.

Next reads

Related implementation guides

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.