Klaviyo

Klaviyo is a growth marketing automation platform that helps you acquire, retain, and grow your customers by creating personalized experiences for them through marketing channels such as email, SMS, in-app notifications, and the web.

You can configure Klaviyo as a Target in Activate to curate the raw user data from your data warehouse, sending emails and SMS to your clients based on activities such as the latest shopping behavior, website browsing behavior, or order value of the products purchased recently.


Prerequisites

  • An active Klaviyo account. Read Getting Started with Klaviyo if you need help setting up your Klaviyo account.

  • A user with Admin, Owner, or Manager role in your Klaviyo account. Read Klaviyo User Roles to know more about assigning different roles to a user.


Configuring Klaviyo as a Target

Perform the following steps to configure Klaviyo as the Target in your Activation:

  1. Click Activate in the Asset Palette.

  2. Do one of the following:

    • Select the TARGETS tab in the Targets List View, and click + CREATE TARGET.

      Create Target

    • Select the ACTIVATIONS tab in the Activations List View, and click + CREATE ACTIVATION.

      Create Activation

      1. In the Select Warehouse page, select your Activate Warehouse or click + ADD WAREHOUSE to add a new warehouse. Read Activate Warehouses to configure the selected Warehouse type.

      2. In the Select a Target page, click + ADD TARGET.

        Select a Target

  3. In the Select a Target Type page, click on Klaviyo.

    Select Klavyio as Target

  4. In the Configure your Klaviyo Target page, specify the following information:

    Configure your Klavyio Target

    • Target Name: A unique name for your Target.

    • Public API Key: The unique identifier or site ID of your Klaviyo account.

    • Private API Key: A secret value that provides Hevo access to your Klaviyo account via RESTful APIs.

  5. Click TEST & CONTINUE.

    You can view the new Target in the Targets List View. If you are creating an Activation, you return to the Select Data to Synchronize page. To finish creating the Activation, you must map the Warehouse fields to the Target fields. Refer to the section, Mapping Fields in Klaviyo for information on field mapping specific to Klaviyo.

    Created Klaviyo Target


Obtaining your API Keys

To access the data in your Klaviyo account, Hevo uses the public API key along with the private API key. Your public API key is also your site ID, and there is only one public key per account. A private API key provides access to the Klaviyo objects. It is like a password and needs to be stored securely. You can use an existing private API key or create one.

Retrieve the public API key

Perform the following steps to retrieve the public API key:

  1. Log in to your Klaviyo account.

    API Keys Account Settings

  2. In the top right, click the drop-down next to your username, and click Account.

  3. In the Account page, click Settings in the tab bar, and then click API Keys.

  4. Retrieve the Public API Key for your account from the Public API Key / Site ID section. Provide this key while configuring your Klaviyo Target.

    Public API Key

Generate the private API key

Perform the following steps to create a private API key:

  1. Log in to your Klaviyo account.

  2. In the top right, click the drop-down next to your username, and click Account.

    API Keys Account Settings

  3. In the Account page, click Settings in the tab bar, and then click API Keys.

  4. In the Private API Keys section, click Create Private API Key.

    Create Private API Key

    An API key is created without a label.

    Private Key No Label

  5. (Optional) Update the label of the API key you generated to help you identify it:

    1. Click the Edit () icon next to the Label field of your private API key.

    2. In the Update API Key Label dialog, enter a name, and click Save Label.

      Update API Key Label

    You can see the API Key with its name in the Private API Keys section. You can use this API key while configuring your Klaviyo Target.

    Labeled Private Key


Data Replication

Activate supports the following synchronization behaviors for Klaviyo:

  • Insert New and Update Existing Records (Upsert)

  • Add New Records (Insert)

  • Delete Existing Records (Delete)

Refer to the Data Model section for the synchronization behavior that applies to each supported object.

Data is synchronized with the supported Klavyio objects using the Track and Identify APIs, which require the public API key, and the RESTful APIs, which require a private API key. Data can also be synchronized with custom fields already existing in your Klaviyo object or the new ones added to the selected object in the Field Mapping page while creating an Activation. Refer to the section, Add a custom field for the steps to add a custom field to your selected object.

Activate synchronizes data from the Warehouse with the supported Klaviyo objects using these unique identifiers:

Unique Identifier Description
email The email address of a contact.
phone_number The phone number associated with a contact.

Data Model

The following table lists the objects supported by Activate, their respective unique identifiers, and their synchronization behavior(s):

Object Unique Identifiers Synchronization Behavior(s) Description
Profile - email

- phone_number
Upsert Stores information about all the contacts in your Klaviyo account.
Lists - email

- phone_number
- Insert

- Delete
Stores information about all the groups that a profile is subscribed to.
Events - email

- phone_number

Note: Apart from the unique identifiers, event, which is the name of the event, is a mandatory field.
Insert Stores information about all the activities performed by a profile, such as making a purchase, visiting your website, or updating a customer’s email address.

Mapping Fields in Klaviyo

An Activation uses the SQL query you provide in the Select the Data to Synchronize page to identify the data from your Warehouse. You must then map the query fields to the selected Target object fields to complete creating your Activation. Read Map Warehouse fields to Target fields for the steps to map the fields in the Profile and Lists objects.

Map fields in the Events object

In the Field Mapping page, once you have selected the Events object from the drop-down list, the sync behavior is automatically selected. Thereafter, you must provide a value for the event field, which is a mandatory field. You can do this in one of the following ways:

  • Event Name: Specify a name for the event that you want to add. The event name that you provide is added as a metric to all the profiles created by the Activation in your Klaviyo account.

    Mapping Event Fields

  • Use a Query Field: If enabled, you must map a query field to the event field in the Target object. The value of the mapped query field is added as a metric to each profile created by the Activation in your Klaviyo account.

    Map the Query Field

Add a custom field

You can add a custom field to any of the supported Klaviyo objects in the Field Mapping page. To do this:

  1. In the Field Mapping pane, select the query field for which you want to add a custom field in the Target object.

  2. Select + Add Custom Field from the drop-down list.

    Add Custom Field

  3. Specify a name for the custom field, and click the () icon to create the custom field.

    Add the Custom Field Name

    You must select a custom field type from the drop-down list if you are adding a custom field to the Events object.

    Add the Custom Field Type


Target Considerations

  • Klaviyo does not impose a limit on the number of API calls that can be made in a specific time interval. However, it does throw an HTTP error (429) if the rate limit for the API endpoint in use is exceeded. In such a case, Activate retries the API call a few times. If Klaviyo still responds with an error (429), then Activate puts those records for which it received the error on hold.

  • Klaviyo expects phone numbers in the data being synchronized by the Activation with the Lists object to be in a certain format. It throws an error if a phone number is not in an acceptable format. In such cases, Activate fails the records and marks them as not loaded if you have mapped the phone number to a Target field in your Activation.



Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Jul-18-2022 1.92 New document.
Last updated on 18 Jul 2022