Data · Integrations & data sources
Klaviyo
Connect Klaviyo as a data source: the public and private API keys it needs, the contacts, lists, segments and events it imports periodically, the real-time contact and flow-event URLs for your Klaviyo flows, how its fields map to Instasent attributes, and how to map its marketing status to consent.
Klaviyo is a native connector for email and SMS marketing data. Once connected, it syncs your Klaviyo contacts and events into Instasent so you can segment and act on them alongside the rest of your audience.
How to connect
Klaviyo connects with an API key: you create the keys in Klaviyo first and paste them into Instasent. Klaviyo needs two keys — a Public API Key and a Private API Key.
Create the API keys in Klaviyo
In your Klaviyo account settings, create (or copy) your Public API Key and a Private API Key.
Add the data source
In Data sources, select Add data source and choose Klaviyo from the Integrations section.
Enter your keys and connect
On the Connect step, fill in the Connection name, the Public API Key and the Private API Key, then select Connect to Klaviyo.
Initial import
The connector imports your existing contacts and events, then keeps importing them periodically.
After connecting, the wizard continues through Mapping, Merge and Tags, the same steps as a CSV import.
What it syncs
- Contacts — your Klaviyo profiles, with their identifiers and attributes.
- Lists and segments — the Klaviyo lists and segments each contact belongs to.
- Events — activity such as purchases, started checkouts and abandoned carts.
Klaviyo doesn't send each change the moment it happens: Instasent imports your Klaviyo data periodically, and how often depends on your plan. The data source in the panel says so: We sync your Klaviyo data into Instasent periodically; how often depends on your plan. Lists and segments can lag a little more, because Klaviyo limits how fast they can be read; Instasent re-reads all your contacts every so often to bring them up to date, and the data source shows its sync status. The direction is one-way, from Klaviyo into Instasent, and contacts unify by email and phone — see unification.
Events imported periodically start your flows like any other event, only up to one import interval after they happened. For a flow that reacts to something the person has just done, such as an abandoned cart, keep its first wait longer than that interval; see Sources that import their events every so often. For a contact or an event that has to reach Instasent at once, use the real-time URLs below.
Real-time updates from your Klaviyo flows
Besides the periodic import, you can have a Klaviyo flow send a contact to Instasent the moment it reaches a step of that flow. It is optional and set up from Klaviyo. In the Klaviyo data source, Setup instructions shows two sections, each with its Webhook URL and a Payload sample; in Klaviyo, add a webhook action to the flow and paste that URL and payload.
- Realtime contact update — when the flow reaches the action, Instasent reads that contact's latest data from Klaviyo and updates it. Useful when a contact joins a Klaviyo list or changes any data.
- Realtime flow event — updates the contact the same way and also records an event
for them, which can start an Instasent flow straight away. By default it is a flow
event (
automation_flow) carrying the values you send, such as the flow's name and a link to use in the SMS; you can name another event instead, such as a coupon created (ecommerce_coupon_created) with its code and percentage.
The payload identifies the contact with Klaviyo's own ID, {{ person.KlaviyoID }}:
{
"contact_id": "{{ person.KlaviyoID }}",
"event": "automation_flow",
"parameters": { "name": "Flow name", "id": "SMS-1", "url": "https://url-to-use-in-the-sms.com" }
}Only the contacts and events your Klaviyo flows send this way arrive in real time; everything else keeps arriving with the periodic import. That is why a flow template that listens to Klaviyo still shows the import warning and lengthens its first wait even when you use these URLs: Instasent can't tell which events your Klaviyo flows send. How to add the action in Klaviyo is in Klaviyo's guide to webhook actions.
Field mapping
Klaviyo profile fields map to the matching Instasent attributes (email to _email,
phone to _phone_mobile, and so on), and events arrive with their parameters. You
confirm the mapping on setup; see
field mapping.
Consent mapping
Map Klaviyo's marketing status to Instasent's marketing-preference attribute
(_accepts_marketing_*) following the consent golden rule:
| Klaviyo status | Instasent value | Meaning |
|---|---|---|
| Subscribed / opted in | true | Accepted marketing |
| Never opted in / no status | null | No preference |
| Unsubscribed / opted out | false | Actively declined marketing |
Only an active opt-out in Klaviyo becomes false. A contact with no recorded
status must map to no preference (null), never to false — Klaviyo not
distinguishing "never said anything" from "declined" means you map to null. See
Consent.
Last updated