Klaviyo
Use Klaviyo for your app’s email and SMS marketing: your app adds the people who agree to marketing to your Klaviyo lists, keeps their profiles up to date, and sends events that your Klaviyo flows start on. To connect, you need a Klaviyo private API key.
Connect Klaviyo
To connect Klaviyo, first create a private API key in Klaviyo under Settings › API keys › Create Private API Key. Give it Full Access, or make a Custom Key with Read access to Accounts and Segments, and Read/Write access to Lists, Profiles, Subscriptions, and Events. The key starts with pk_, and Klaviyo shows it only once.
Only a project owner can connect Klaviyo. If you’re a project owner, connect it:
- Open Project Settings › Connections, and then turn on the switch for Klaviyo.
- In the Connect Klaviyo dialog, paste the key into Private API key. To open Klaviyo’s help on private API keys, click Find it beside the label.
- Click Connect.
For more about connecting, see Connect a service.
What to ask
Ask the agent for the sign-up form, profile update, or event that you want, and name the Klaviyo list or event it uses. For example, your app can read your lists and segments, find a person’s profile (including whether they can get marketing email and SMS), update profiles, subscribe people to a list, and record events. It can also call other Klaviyo API endpoints that your key’s access allows.
Add a newsletter checkbox to the sign-up screen. When a person selects it, subscribe their email address to my Newsletter list in Klaviyo, with App sign-up screen as the source.
When someone changes their name or city in their profile, update their Klaviyo profile to match.
When a person finishes checkout, send a Placed Order event to Klaviyo with the order’s items and total, using the order number as its unique ID.
Subscribe only people who agreed to marketing. Subscribing an email address signs it up for email marketing, and subscribing a phone number signs it up for SMS marketing, which needs SMS set up in Klaviyo. On a list with double opt-in, Klaviyo emails the person to confirm, and subscribes them after they confirm. Updating a profile or sending an event doesn’t change anyone’s consent.
Agent questions
If Klaviyo isn’t connected, the agent asks you to connect it in a card above the message box. See Answer the agent.
Review
After the agent finishes, read the turn’s Summary and review its Changes. Check the affected screens in Screens, and try the change in Preview. If the change uses records or sign-in, test it with the thread’s own data in Data.
After you push a backend change, check the result in Backend.
Test with an email address that you own, and then find its profile in Klaviyo. Klaviyo processes subscriptions and events shortly after your app sends them, so a new one can take a moment to show. Klaviyo drops events for example.com and test.com addresses, so don’t test events with them.
Push
After you test the feature, push the changes to your app.
Next steps
- To replace the key or disconnect Klaviyo, see Manage connections.
- For other services your app can use, see Available services.
Troubleshooting
- The dialog says that you pasted the public key: Klaviyo’s six-character public key (site ID) doesn’t connect. Paste a private API key, which starts with
pk_. - Klaviyo refuses a call for missing access: a key’s access can’t be changed after you create it. Create a private API key with the access listed in Connect Klaviyo, and then replace the key.
- For a key that’s refused or a connection that needs attention, see Troubleshoot connections.