Skip to main content
← Back to plugins
Klaviyo

Klaviyo

Synchronize orders and customers with the Klaviyo marketing platform

Version1.12.0
Compatibility>=2.2.0
CategoryOther
Last updatedFeb 5, 2026

Official documentation here

An extensible plugin for sending placed orders to the Klaviyo marketing platform.

Getting started

The default setup will only send placed orders to Klaviyo

  1. Log in to your Klaviyo account and get your API key
  2. Add the following config to your vendure-config.ts:
Ts

All placed orders will now be synced.

Custom event handlers

If you want to send more events to Klaviyo, you can implement your own handlers. For example, syncing account verification events to Klaviyo, so that you can send out welcome e-mails:

  1. Create a custom handler klaviyo-account-verified-handler.ts

    Ts
  2. Register the handler in the plugin in your vendure-config.ts

    Ts

Custom data in Klaviyo's default Order Placed event

If you'd like to send custom data in the Klaviyo native Order Placed event, you can also create a custom handler, but make sure to return a KlaviyoOrderPlacedEvent instead of a KlaviyoGenericEvent. The plugin will recognize your return type and handle it as an Order Placed event.

Don't forget to exclude the default order placed handler if you do!

Ts

Abandoned cart emails

This plugin includes a mutation klaviyoCheckoutStarted, which can be called from your storefront. When called, and an active order is present, it sends a custom event Checkout Started to Klaviyo, including basic order and profile data. This event can be used to set up abandoned cart email flows in Klaviyo.

Refund and Cancellation Events

This plugin includes a mutation klaviyoRefundCreated, which sends events to Klaviyo whenever a refund is created for an order.

To enable the refund event, add the refund handler to the plugin config:

Ts

Newsletter signup

The following mutation allows a customer to sign up to a Klaviyo Audience list via the API:

Graphql

This mutation requires an active session, which means a customer should have interacted with the Vendure API already. This can be done for example by fetching an active order. This is to prevent unwanted bot sign ups. The customer will also receive a double opt-in email, asking them to confirm signing up for marketing emails.

Product Feed

You can use this plugin to get the JSON product feed for Klaviyo. This can be used to sync your products to Klaviyo. To enable it, you need to configure the feed settings of the plugin:

Ts

After that, you can call the feed via the shop API, which will return a JSON object. You could stringify that, and use it to save it to a static file. For example klaviyo_feed.json, and use the path to that file to have Klaviyo fetch your products.

Graphql

Without the feed.password set, feed generation is disabled.

Back In Stock notifications

Allow customers to subscribe to back in stock notifications for a given product. Requires an active session, and requires the Klaviyo feed to be connected in your account.

Graphql

Failed to send event to Klaviyo

If for some reason an event fails to be sent to Klaviyo, an FailedToSendToKlaviyoEventevent is emitted. You can listen to this event to monitor failed events and take action.

Example:

Ts
Changelog
  • Upgraded to Vendure 3.5.3
  • Set customProperties.language for Klaviyo profiles based on the request context language code from Vendure
  • Emitting FailedToSendToKlaviyoEvent event when a Klaviyo event fails to be sent
  • Documentation update
  • Updated official documentation URL
  • Don't throw error for products without a price when generating the product feed
  • Filter out disabled variants from the product feed
  • Added query for retrieving the Klaviyo JSON product feed.
  • Added mutation for subscribing to back in stock notifications for a given product.
  • Upgrade to Klaviyo Client from 10.1.0 to 18.0.0
  • Upgrade to Vendure to 3.3.2
  • Added RefundEventHandler to send events to Klaviyo when a refund is created.
  • Fetch order with relations instead of hydrating in CheckoutStartedEvent, to prevent order object modification
  • Added mutation to sign up to Klaviyo Audience list
  • Update Vendure to 3.1.1
  • Include klaviyoCheckoutStarted mutation to be able to use abandoned cart email flows
  • Don't log push jobs and log errors for channels without api keys
  • Allow setting an apiKey per channel
  • Add support for DiscountCode on Placed Order event
  • Allow setting multiple Klaviyo handlers for Vendure's OrderPlacedEvent
  • Allow order items to be excluded from 'Ordered Product' events
  • Update compatibility range (#480)
  • Updated Vendure to 2.2.6
  • Added extra tests for 'Ordered Product' events
  • Initial setup of the plugin