> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://lai.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Integrate with Klaviyo

| Klaviyo is a popular email marketing and automation platform designed which provides tools and features that enable businesses to create targeted email campaigns, automate marketing processes, and analyze customer data to drive sales and engagement.

# Connect LAI Product Reviews with Klaviyo

### Step 1: Installation

Please ensure to install 2 apps: 

* [LAI Product Reviews](https://apps.shopify.com/lai-reviews?utm_source=docs&utm_medium=website&utm_campaign=laiwebsite&utm_content=klaviyo)

* [Klaviyo: Email Marketing & SMS](https://apps.shopify.com/klaviyo-email-marketing)

### Step 2: Klaviyo API key verification

* Visit [this link](https://www.klaviyo.com/settings/account/api-keys) to get an API key. If there is no API key available, follow [this link](https://help.klaviyo.com/hc/en-us/articles/7423954176283#create-a-private-api-key-2) for more information.

* Copy the API Key > Come back to LAI Product Reviews > Enter the API Key here > Click on **Verify**:

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla3_1y4x6zt.png)

### Step 3: Connection

* Click on **Connect**

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla4_13wh9sz.png)

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla5_yoh57b.png)

## Send emails and use Klaviyo templates

* Click [here](https://www.klaviyo.com/flows/create) > click on **Build your own** > name the flow.

### Step 1: Select a LAI metric

* Click **Your metrics** > **API** > Choose an LAI metric that aligns with your goal.

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/klaviyo1_5tih5u.png)

* The table below includes three metrics provided by LAI Product Reviews:

| Metrics | Meaning |
| ---- |
| LAI fulfilled orders | Automatic emails will be sent after orders are fulfilled |
| LAI paid orders | Automatic emails will be sent after orders are paid |
| LAI reviews are submitted | When a review is submitted in LAI Product Reviews, an event will be sent to Klaviyo to implement the flow created in Klaviyo |

### Step 2: Edit the email template

|| Currently, only emails can be sent with the integration.

1. Drag and drop an **Email** block to your flow > go to **Edit template** page to insert LAI elements to your emails.

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla9_ahbfk2.png)

* This is a variable list that you can use to mention your customers in emails:

{{ event.products.0.shop_name|default:'' }}: to show your shop name

{ event.products.0.email|default:'' }}: to show your customers' emails

{{ event.products.0.first_name|default:'' }}: to show your customers' first names

{{ event.products.0.last_name|default:'' }}: to show your customers' last names

{{ event.products.0.full_name|default:'' }}: to show your customers' full names

* This is a sample to use these variables:

Setting: Hello {{ event.products.0.full_name|default:'' }}, hope you have a nice day. {{ event.products.0.shop_name|default:'' }} is waiting for your feedback of the recent order. Could you please spare just 1 minute to share your thought? We truly appreciate your help!

Reality: Hello James Harry, hope you have a nice day. Nlittleleaf is waiting for your feedback of the recent order. Could you please spare just 1 minute to share your thought? We truly appreciate your help!

### How to show the list of products available in your orders

1. Add a** Table** block to your template.
  
* One column contains product titles and **Submit review** button. The other contains product images.

2. Set up the **Table Settings**:

* Under Table **Styles** > select **Dynamic** > enter Row collection as **event.products** and Row alias as **product**

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/klaviyo4_1b5jaz1.png)

3. Set up the table **Content**:

* Image column

Click **Select Image** > select **Dynamic** > enter **{{ product.image }}**

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/klaviyo3_kfhc7y.png)

* Text column

Select **Source code** > enter the following piece of code:

`<div style="margin-left: 20px;">
  <h3 style="font-size: 16px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden;">{{ product.title }}</h3>
</div>
<div style="border: none; border-radius: 5px; margin-left: 20px; cursor: auto; background: #0000FF; width: 50%; height: 40px;"><a style="text-decoration: unset; width: 100%;" href="{{ product.link }}">
  <p style="font-size: 16px; line-height: 40px; color: #ffffff; text-align: center;">Submit review</p>
</a></div>`

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla13_bjkh3z.png)

* This is how the email displays when it is sent to your customer:

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla14_5j1hf5.png)

## Disconnect LAI Product Reviews from Klaviyo

* To stop sending events and emails by Klaviyo, please click on **Remove** or **Disconnect**.

![](https://storage.crisp.chat/users/helpdesk/website/e1f7f04a48c48800/kla15_1p26t40.png)

If you need any other help, please contact our support team via live chat or send emails to support@smartifyapps.com.