AFI AFI

Klaviyo

Estimated reading: 9 minutes Updated August 1, 2026

Klaviyo is a behaviour-driven email and SMS marketing platform. Advanced Form Integration subscribes contacts to a Klaviyo list and (on Pro) fires custom events that Klaviyo Flows can listen for. Connection is via a single Private API Key, no OAuth dance required.

Supported actions

  • Subscribe To List (Free + Pro): adds the contact to a chosen Klaviyo list, populating profile properties from the mapped fields.
  • Create Event (Pro): fires a named Klaviyo event that you can use as a Flow trigger.

Pro additionally enables richer field mapping (more sender-plugin field types like phone, date, dropdown, hidden, and custom surface for mapping) and lets you populate custom profile properties beyond name and email.

Quick reference

Need to… Do this
Capture form signups into a Klaviyo list Pick Subscribe To List, choose the list, map email + first / last name.
Fire a Klaviyo Flow on submission AFI Pro: pick Create Event; the event name is what you reference in the Flow’s Metric trigger.
Capture phone numbers Phone must be in E.164 format (+15551234567). Use a form plugin with international phone validation. Pro is required to map phone.
Pass UTM source / GCLID into profile Enable Send UTM Variables in AFI > Settings > General; map {{utm_source}} / {{gclid}} onto custom profile properties (Pro).

Most common Klaviyo question: “the integration looks fine but subscribers don’t appear.” Almost always the destination Klaviyo list has double opt-in enabled – subscribers are waiting on the confirmation click. Switch the list to single opt-in (or accept that contacts only appear after confirming).

What you’ll need

  • An active Klaviyo account.
  • A Klaviyo Private API Key (see below).
  • The Advanced Form Integration plugin installed and activated.

Obtaining the API Key and Authentication

Before you start, you are required to save the API Key in the plugin settings page.

  1. Go to the WordPress admin area, click AFI > Settings.
  2. Select the Klaviyo tab.
  3. Click on the link and you’ll be taken to the API Keys page. Click Create API Key if it does not exist, then copy it.
  4. Paste the Key in the API Key input box and click the Save Changes button.

Klaviyo authenticates API requests with the Klaviyo-API-Key header. AFI always uses the latest v3 API revision.

Create the integration

Once the API Key is saved you can start creating a new integration. Click on Add New under the AFI menu. The New Integration page will appear.

Title

A default title will be auto-generated with an auto-incremental number. You can rename it to something related to the task. It will help you quickly recognize the correct one when there are multiple integrations set up.

Trigger

Select the correct Sender Form in the Form Provider dropdown. The desired Form plugin must be installed and activated, otherwise you won’t see it listed. After selecting the correct Form, all forms built under that form will be fetched and auto-populated in the Form/Task Name dropdown. Select the form that you want to integrate.

Action

Select Klaviyo in the Platform dropdown. In the Pro version you’ll also get the option Klaviyo [PRO]. Select that if you are using Pro.

Klaviyo AFI free version platform selection
Klaviyo AFI Pro version platform selection

Map Fields

Available contact lists will be auto-populated. Select the desired one. Map Email, First Name, Last Name, etc., and other fields that you want. Skip the fields that are not needed. Finally, click the Save Integration button.

Klaviyo AFI field-mapping screen

Phone Number

If the form on your website collects the user’s phone number, you might want to send it to Klaviyo along with other data. You have to be cautious in this case. Klaviyo only accepts a fully formatted phone number including the country code before it. You need to ensure that a fully formatted phone number is sent. So there are two ways you can achieve it.

Design your form’s phone number field in a way that the user also enters the country code number. It could be a dropdown where the country is selectable.

Phone number form field with country code dropdown

Or if you expect the visitors from the same country, you can use a simple phone number input box in the form. In this case, add the country prefix while setting up the integration. For example, if you expect all the users from Spain, add +34 before the phone number tag. The plugin will automatically add +34 before all the submitted phone numbers.

Fixed phone number prefix in AFI field mapping

Double opt-in

Double opt-in option is activated by default for lists in Klaviyo. While it is activated, new contacts will get an email first. If they click on confirm in that email, they will be added to the list. If you want the submitted data to be added directly to the list (though it is not recommended), select single opt-in in your Klaviyo list settings.

Klaviyo double opt-in list settings

Tasks supported

Subscribe To List

Creates or updates a profile in Klaviyo and subscribes it to the selected list via POST /api/profile-subscription-bulk-create/. The list is selected from a dropdown of your Klaviyo lists.

Field Field key Required Notes
Email email Yes Subscriber email address
First Name first_name No
Last Name last_name No
Phone Number phone_number No Must be E.164 format with country code. Pro required.
Organization organization No
Title title No Job title
City / Region / Country / Zip city, region, country, zip No Address properties

Pro features

The Pro integration extends the free version with custom profile properties, phone number mapping, and a Create Event task. Pro uses the same Klaviyo Private API Key connection.

Create Event (Track)

Use the Create Event task to:

  • Send a custom event like “Order Placed”, “Signed Up”, or “Booked Appointment” to Klaviyo.
  • Track event time, value, currency, and properties.
  • Include user profile info (email, name, phone, etc.).

These events appear under Metrics in Klaviyo and can be used to:

  • Analyze behavior.
  • Trigger flows or emails.
  • Segment users based on actions.

For example, you can send a custom event called Product Purchased with extra details like product name, amount paid, purchase time, and customer email. AFI Pro sends this data directly to your Klaviyo account under Metrics, then Custom Events.

Additional Pro tasks

  • Create or Update Profile: creates or updates a profile without subscribing to a list.
  • Add Profile To List: subscribes an existing profile to a list.
  • Unsubscribe Profile: unsubscribes a profile from a list.

Feature comparison

Feature Free Pro
Subscribe to list
Standard fields (name, address)
Phone number mapping (E.164) No
Custom profile properties No
Create Event (Track) No
Create/update profile (no list) No
Add profile to list No
Unsubscribe profile No

Log

After the integration is made, when users fill up the form and submit it, the plugin initiates the process of sending data to the configured platform. It also saves a log that includes what data it tried to send, and what it got in response from that platform. So if you find an integration is not working, your first task is to check the logs. Go to AFI > Log menu and check the recent logs.

AFI Log screen showing request and response details

Troubleshooting

Integration not working, contact not saving to Klaviyo account

If you have created an integration, but no contact is added to Klaviyo when testing it, check the following things:

  • Always test using real email addresses and phone numbers. Avoid using fake ones like test@test or a@b, as modern platforms can recognize and ignore them.
  • If you’re sending a phone number, make sure it’s fully formatted with the country code. Check the phone number section above for more details.
  • If the double opt-in option is enabled in the list settings, users will receive a confirmation email. The list will only be updated once they confirm through that email. For more information, refer to the Double Opt-in section above.
  • You can also check the Log menu, where you might find some errors logged. Review the error message and try to fix the issue accordingly.
  • If you are still having issues, please send an email to support with screenshots and a copy of the error log.

Common issues and fixes

Distilled from years of Klaviyo support tickets.

Subscribers don’t appear in the list

The list has double opt-in enabled. This is the single most common Klaviyo ticket. Switch the list to single opt-in in Klaviyo Lists settings, or instruct subscribers to confirm via email.

400 Bad Request on phone-number submissions

Phone field validation. Klaviyo requires E.164 format with country code (+15551234567). Either ensure the form pre-formats phones, or temporarily remove the phone mapping to confirm the rest of the integration works.

“duplicate_profile” 409 error

Klaviyo treats both email AND phone as unique identifiers. If a submitted phone matches one profile while the submitted email matches a different one, the API returns 409. Either dedupe upstream or align identifiers.

Lists stopped appearing in the dropdown

Most likely an old AFI version. Klaviyo changed their API spec in June 2024. Update the plugin to fix.

Same email creates only one profile

By design. Klaviyo merges by email. Re-subscribing the same email updates the existing profile rather than creating a new one.

Tags on individual contacts aren’t appearing

Klaviyo’s tagging model applies tags to lists and segments, not directly to individual profiles. If you need per-profile metadata, use custom properties instead.

API key won’t connect

Go to AFI > Settings > Klaviyo, delete the old API key entry, regenerate a fresh Private API key in Klaviyo (Account > Settings > API Keys > Create Private API Key), paste it back, and save.

Phone validation error when using Forminator

Forminator’s international phone validation produced inputs Klaviyo rejected. Update AFI to v1.114.9 or later. The phone-sanitisation fix landed there.

Notes and caveats

  • Profile dedup: Klaviyo merges by email or phone match. Re-subscribing doesn’t create duplicates, it updates.
  • Suppression list: if a contact was suppressed (unsubscribed, bounced, marked spam), re-subscribing via API won’t bring them back. Customers must opt themselves in.
  • Metric vs Event: Klaviyo’s Events feature triggers Flows. Metric names are case-sensitive. Use stable names like form_submitted.
  • Custom properties are schemaless. Any property name is accepted on first send.

Conditional logic example

Only subscribe contacts to your “VIP Customers” list when the form’s customer_tier field is “vip”. Other subscribers go to a general list via a separate integration.

Related docs