# Klaviyo

## Connection <a href="#connect" id="connect"></a>

When you're setting up your first workflow with Klaviyo, you'll need to create a connection through MESA's Klaviyo App to finish the process. If you are not already logged in, you will be asked to log in and select the Klaviyo account that you want to connect.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FiBbgYpRQ3JzpaAPOsJPX%2Fklaviyo-credential.png?alt=media&#x26;token=912b926b-de74-43fb-8987-6d3d1d416363" alt=""><figcaption></figcaption></figure>

Afterward, you can re-use the newly created connection and select it for your future workflows!

## Configure <a href="#configuring" id="configuring"></a>

### Create Event action <a href="#event" id="event"></a>

MESA's Klaviyo Create Event action lets you create a new event to track a profile's activity. This is especially helpful if you want to add events whenever something happens in Shopify.

**This action has several required fields that you must fill in.**

1. **Metric** > **Name**

The Metric's Name field is the name of the new event added to the profile's activity. In the screenshot below, our event's name is "Placed Order".

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fy0riKikbToGF6cuJuzRY%2Fimage.png?alt=media&#x26;token=0df1e4f3-9c22-433b-b345-61829d52a529" alt=""><figcaption></figcaption></figure>

You can also [choose "Insert variable" to add a custom Metric Name](https://docs.getmesa.com/workflow-builder/fields#drop-down-menus).

2. **Properties**

Properties are extra information that you'd like to add to the new event. You can think of Key as a label or description title of the extra information, while Value is the extra information you want to send.

In the screenshot below, we send the Shopify customer's ID as the Value with a Label called "customer\_id".

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F7InaLDyVb6TwdhuBjfBP%2Fimage.png?alt=media&#x26;token=55897b5d-c1eb-490d-ac36-d238588adc48" alt=""><figcaption></figcaption></figure>

3. **Profile's Email or Phone Number**

When selecting an existing profile, you must fill out the Profile's Email or Phone Number field so that Klaviyo can identify the correct profile to update.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fpv8JgiMWIGf9BgIfsooA%2FScreenshot%202025-05-15%20at%201.44.54%E2%80%AFPM.png?alt=media&#x26;token=8a8adc63-1496-484e-8098-76dd08009582" alt=""><figcaption></figcaption></figure>

You cannot add multiple variables in the field. You must select only one variable.

4. **Profile > Email**

If you create a new profile, you will want to input an e-mail address for the user profile. In most cases, you will probably want to use a [MESA variable representing a profile's email address.](https://docs.getmesa.com/workflow-builder/fields/variables)

In the screenshot below, we selected the variable representing a Shopify customer's email address for the Email field.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fkg2gmfVhUziEFgLj5O5a%2Fimage.png?alt=media&#x26;token=ae94cba6-362f-436c-8676-67774fe75566" alt=""><figcaption></figcaption></figure>

### Adding Profiles to a List <a href="#list" id="list"></a>

MESA provides two different actions for adding people to a Klaviyo list. There are key differences between these two actions: Add Profile to List and Subscribe Profile.

* **Add Profile to List**: This lets you add people directly to a Klaviyo list without offering consent. Adding a person to a list does not change their subscription status.
* **Subscribe Profile**: [If a Klaviyo list has double opt-in enabled](https://help.klaviyo.com/hc/en-us/articles/115005251108), people will receive a message requiring their confirmation before subscribing. Otherwise, people will be immediately subscribed without receiving a confirmation message. This will remove any [unsubscribe, spam report, or user-suppressed suppressions from the person's profile.](https://help.klaviyo.com/hc/en-us/articles/115005246108#what-is-a-suppressed-profile-1)

To summarize, if you're trying to obtain [consent](https://help.klaviyo.com/hc/en-us/articles/360037101072) to receive email marketing, SMS marketing, or both, we recommend using MESA's **Subscribe Profile** action in your workflows.

## Technical Notes <a href="#flow" id="flow"></a>

### Using MESA Track Events in a Klaviyo Flow <a href="#flow" id="flow"></a>

Switch to your Klaviyo Flow to begin including your MESA track events.

#### Start a Klaviyo flow with a MESA Track Event <a href="#flow" id="flow"></a>

You may want to use events created in MESA to trigger an action in Klaviyo. Klaviyo allows you to create Flows to connect MESA and Klaviyo together. If you are unfamiliar with Flow, [you can click here to learn more.](https://help.klaviyo.com/hc/en-us/articles/115002774932#create-a-new-flow4)

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FYyCkpczJKwZm3wt7ymrz%2Fklaviyo-track-event.png?alt=media&#x26;token=27ae54b2-6fe0-4057-941e-01c06d8ee64d" alt=""><figcaption></figcaption></figure>

[Once you run a test on your MESA workflow](https://docs.getmesa.com/workflow-builder/testing), your customized event will be under Metric when creating a Flow in Klaviyo.

In Klaviyo, create the flow, and then under Select a trigger, click on Metric in the All triggers tab of the sidebar.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FUQGq2ukKqN3pKHv5uPSm%2Fklaviyo-trigger-metric.png?alt=media&#x26;token=1198e99f-e235-4cdd-90dc-e0b90be4dd9d" alt=""><figcaption></figcaption></figure>

Then, scroll to find your customized MESA track event and select it.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FbrXXzL7iS9EOPv28nxw7%2Fklaviyo-mesa-event.png?alt=media&#x26;token=e1c2ec58-9e42-4de3-95ae-016c31d5a82d" alt=""><figcaption></figcaption></figure>

#### Use a MESA Track Event in a Klaviyo Conditional Split <a href="#conditional-split" id="conditional-split"></a>

In some cases, you may want to use a MESA track event in a Klaviyo conditional split so that you can add multiple actions depending on whether the condition was satisfied. The following example shows a Klaviyo flow that checks on a fulfilled order after 2 days. If the "A fulfillment has been delivered" event has not occurred at least once since starting the Klaviyo flow, Klaviyo will send a notification.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FWuBUAgNfSbAI4Hg6lmI0%2Fklaviyo-conditional-split.png?alt=media&#x26;token=cde5adc2-3240-493c-a446-e0218779468c" alt=""><figcaption></figcaption></figure>

The MESA track event is in the field next to the "Person has" condition in the conditional split (under API).

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FNE1QfNz4i4HUh1lCVxOJ%2Fklaviyo-conditional-track-event.png?alt=media&#x26;token=e41a6240-a5f2-485d-a67c-0b87f0369b4e" alt=""><figcaption></figcaption></figure>

#### Using Event Variables from MESA's Create Event action <a href="#event-variables" id="event-variables"></a>

You can add event variables from MESA's Create Event action in metric-triggered flow messages. For more information on how to do this, [you can click here](https://help.klaviyo.com/hc/en-us/articles/115002779071-About-Using-Event-Variables-to-Personalize-Flows#01FK12GQZA8853EXPY3NNWC75S).

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FUWdeRSZqUxZnrYDKwF2G%2Fimage.png?alt=media&#x26;token=d1575f34-fa61-4ca5-8631-3cdc0fc5f1e1" alt=""><figcaption></figcaption></figure>

1. In a Klaviyo flow, you first need to select the email in which you want to show the dynamic event data. Next, click Edit in the right-hand sidebar.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F161OMcQVeW4BrPbbYgd8%2Fimage.png?alt=media&#x26;token=968d0bd5-a16c-4336-81ab-02180ca783b5" alt=""><figcaption></figcaption></figure>

2. Next, click on Preview & test in the top-right corner.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FKtsaCERXMygEQ4rKFwdE%2Fimage.png?alt=media&#x26;token=d68fc59f-2852-4560-ae13-42c307785cc3" alt=""><figcaption></figcaption></figure>

3. In the popup window, you will see a recent event that corresponds with the flow's trigger. You will see all data available for that particular event metric. Once you have located the specific data that you are looking for, you can copy the event variable by clicking on the property name.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FHs9bkCfJLgIeuVIZqj7c%2Fimage.png?alt=media&#x26;token=c161a1f1-e84f-4eee-9fb9-84b8d52dd8a7" alt=""><figcaption></figcaption></figure>

4. Then, by editing a Text content block in your email template, you can add the event variable to populate its data when the email is sent.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2F7nDMhZhee8FMSIZZRgit%2Fimage.png?alt=media&#x26;token=718c837e-fbc1-485b-a4e1-09dcf8463c16" alt=""><figcaption></figcaption></figure>

### Adding and Subscribing to Lists

Klaviyo provides single and double opt-in settings for lists.&#x20;

If your list is a double opt-in list, subscribers will not be added to the list via the **Subscribe Profile** action until the customer consents to being added to the list.

If consent is not needed, we recommend using the **Add Profile to List** action instead of the **Subscribe Profile** action to automatically add customers to a list.

{% hint style="info" %}
View Klaviyo templates and tutorials [here](https://www.getmesa.com/apps/klaviyo/integrate)!
{% endhint %}
