Klaviyo + Shopify
Klaviyo + Shopify Integration: Turn Customer Data Into Revenue
Sync your Shopify store data with Klaviyo in real time and run personalized email and SMS campaigns that actually convert.

Why integrate Klaviyo and Shopify?
Klaviyo and Shopify do different jobs well. Shopify runs your store — products, orders, checkout. Klaviyo takes all that behavioral and transactional data and turns it into targeted marketing. Together, they're the foundation of a serious ecommerce marketing stack. When you integrate them, every customer action in your store — a purchase, a browse, an abandoned cart — automatically triggers the right message at the right time.
Automate & integrate Klaviyo & Shopify
Use case
Abandoned Cart Recovery
When a Shopify customer adds items to their cart but doesn't check out, tray.ai instantly passes that event and cart contents to Klaviyo to trigger a personalized abandoned cart flow. The sequence includes the exact product images, prices, and a tailored incentive to bring the shopper back. This automation is one of the highest-ROI workflows any ecommerce brand can run.
Use case
Post-Purchase Thank You and Upsell Flows
Every completed Shopify order can trigger a Klaviyo post-purchase flow that thanks the customer, sets delivery expectations, and introduces complementary products. tray.ai passes full order details — SKUs, categories, order value — so Klaviyo can personalize recommendations based on what was actually purchased. This drives second purchases while the brand is still fresh in the customer's mind.
Use case
Customer Winback Campaigns
tray.ai monitors Shopify order history and automatically enrolls customers in a Klaviyo winback segment when they haven't purchased within a defined window. The integration keeps this segment continuously updated as new orders come in or lapsed customers re-engage — so your winback campaigns always hit the right audience without manual list management.
Use case
VIP and Loyalty Tier Segmentation
By syncing cumulative order value and purchase frequency from Shopify into Klaviyo custom properties, tray.ai lets you run dynamic VIP segmentation that updates as customers hit spending thresholds. Klaviyo can then deliver exclusive early-access emails, member rewards, or personalized thank-you notes to your highest-value customers — giving them a reason to stay in that tier.
Use case
New Product Launch Announcements to Targeted Segments
When a new product is published in Shopify, tray.ai pushes product details — title, images, price, category — to Klaviyo and triggers a campaign to the segments most likely to buy based on past purchase behavior. Instead of blasting your entire list, you reach customers who previously bought from a related category first, driving stronger launch-day conversion.
Use case
Refund and Return Experience Management
When Shopify processes a refund, tray.ai notifies Klaviyo to suppress the customer from promotional flows and enroll them in a dedicated post-refund sequence focused on resolving their concern and rebuilding trust. This stops tone-deaf promotional emails from going to unhappy customers and creates a real chance to salvage the relationship. A well-handled return can flip a frustrated customer into a loyal one.
Use case
Real-Time Customer Profile Enrichment
Every customer interaction in Shopify — new accounts, address updates, purchase milestones — is synced to Klaviyo as profile properties via tray.ai, so your marketing platform always has a complete, current view of each subscriber. Richer profiles mean better segmentation, more accurate predictive analytics, and more relevant personalization across every Klaviyo flow and campaign. No more stale data from manual CSV imports.
Get started with Klaviyo & Shopify integration today
Klaviyo & Shopify Challenges
What challenges are there when working with Klaviyo & Shopify and how will using Tray.ai help?
Challenge
Keeping Customer Profiles Consistent Across Both Platforms
Shopify and Klaviyo each maintain their own customer records, and without a real-time sync, discrepancies build up fast — especially when customers update email addresses, shipping details, or marketing preferences in one system but not the other.
How Tray.ai Can Help:
tray.ai listens to webhook events from both Shopify and Klaviyo and immediately propagates updates in either direction, keeping customer profiles consistent across both platforms without manual reconciliation or batch CSV imports.
Challenge
Handling High-Volume Order Events Without Data Loss
During peak periods like Black Friday and Cyber Monday, order volumes can spike dramatically, overwhelming point-to-point integrations that weren't built for burst traffic. Dropped events mean missed post-purchase flows and lost revenue.
How Tray.ai Can Help:
tray.ai's infrastructure handles high-throughput event streams reliably, queuing and processing Shopify order events without data loss even during traffic spikes — so every order triggers the correct Klaviyo flow regardless of volume.
Challenge
Mapping Complex Shopify Order Data to Klaviyo Event Properties
Shopify order payloads are rich and nested — line items, variants, discount codes, shipping details, and more — while Klaviyo expects specific event property structures to power its flows and segmentation. Transforming this data correctly requires custom logic that's painful to maintain by hand.
How Tray.ai Can Help:
tray.ai's workflow builder has a visual data mapping interface and built-in transformation tools that let teams extract, reshape, and correctly format Shopify payload data before sending it to Klaviyo. No custom code required, and updates are straightforward when data structures change.
Challenge
Bidirectional Suppression and Compliance Sync
GDPR, CAN-SPAM, and other privacy regulations require that unsubscribe and data deletion requests are honored across every system holding customer data. An unsubscribe in Klaviyo needs to show up in Shopify — and vice versa — but the two platforms have no native way to communicate these events to each other.
How Tray.ai Can Help:
tray.ai automates bidirectional suppression workflows that listen for unsubscribe or data deletion events in either platform and immediately update the corresponding record in the other, so your marketing operations stay compliant without manual intervention.
Challenge
Avoiding Duplicate Profiles and Event Deduplication
Customers may exist in Shopify as both a registered account and a guest checkout record, leading to duplicate profiles in Klaviyo that skew segmentation, inflate list sizes, and cause customers to receive the same message twice.
How Tray.ai Can Help:
tray.ai workflows include deduplication logic that checks for existing Klaviyo profiles by email before creating new ones, merging attributes from guest and registered Shopify records into a single, clean Klaviyo profile to prevent duplicate sends and inflated metrics.
Start using our pre-built Klaviyo & Shopify templates today
Start from scratch or use one of our pre-built Klaviyo & Shopify templates to quickly solve your most common use cases.
Klaviyo & Shopify Templates
Find pre-built Klaviyo & Shopify solutions for common use cases
Template
Shopify Order Placed → Klaviyo Post-Purchase Flow Trigger
Automatically sends a confirmed order event with full order details from Shopify to Klaviyo the moment a purchase is completed, triggering post-purchase email and SMS sequences with no manual intervention.
Steps:
- Listen for the 'order created' webhook event in Shopify
- Map order data — customer email, order ID, line items, total value — to Klaviyo event properties
- Send a custom 'Placed Order' event to Klaviyo to trigger the configured post-purchase flow
Connectors Used: Shopify, Klaviyo
Template
Shopify Abandoned Checkout → Klaviyo Cart Abandonment Campaign
Detects abandoned checkouts in Shopify and passes cart contents and customer details to Klaviyo in real time, enabling a multi-step cart recovery sequence via email and SMS.
Steps:
- Capture the 'checkout abandoned' webhook from Shopify
- Extract cart items, customer email, and checkout URL from the payload
- Create or update the Klaviyo profile and send a 'Started Checkout' event to trigger the abandonment flow
Connectors Used: Shopify, Klaviyo
Template
Shopify New Customer → Klaviyo Welcome Series Enrollment
Enrolls every new Shopify customer into a Klaviyo welcome email series the moment their account is created, so no new subscriber misses your onboarding experience.
Steps:
- Detect new customer creation event in Shopify via webhook
- Create or update the subscriber profile in Klaviyo with name, email, and acquisition source
- Add the customer to the designated Klaviyo welcome list to trigger the onboarding flow
Connectors Used: Shopify, Klaviyo
Template
Klaviyo List Unsubscribe → Shopify Customer Tag Update
Keeps customer marketing preferences in sync by writing an 'email-unsubscribed' tag back to the Shopify customer record whenever someone unsubscribes from Klaviyo, maintaining compliance and consistent data across both platforms.
Steps:
- Trigger on Klaviyo unsubscribe webhook event
- Look up the matching customer in Shopify by email address
- Apply an 'email-unsubscribed' tag to the Shopify customer record for downstream use
Connectors Used: Klaviyo, Shopify
Template
Shopify Refund Created → Klaviyo Flow Suppression and Winback Enrollment
When a refund is issued in Shopify, this template removes the customer from active promotional flows in Klaviyo and enrolls them in a post-refund recovery sequence to protect the customer relationship.
Steps:
- Listen for 'refund created' webhook in Shopify
- Identify the customer profile in Klaviyo and suppress from active promotional lists
- Enroll the customer in a dedicated post-refund flow with empathetic messaging and a resolution offer
Connectors Used: Shopify, Klaviyo
Template
Shopify Cumulative Order Value → Klaviyo VIP Segment Sync
Periodically calculates each customer's lifetime spend in Shopify and updates a custom property in Klaviyo so VIP segments stay accurate and high-value customers always receive tier-appropriate messaging.
Steps:
- Run a scheduled tray.ai workflow to query Shopify orders grouped by customer
- Calculate lifetime order value and purchase frequency per customer
- Patch the corresponding Klaviyo profile with updated 'lifetime_value' and 'vip_tier' custom properties
Connectors Used: Shopify, Klaviyo