All Collections
Integrations
Klaviyo: How to Use
How to Add Product Recommendations from Your Quiz to Emails in Klaviyo
How to Add Product Recommendations from Your Quiz to Emails in Klaviyo

#integrations #klaviyo #personalization #quiz #step-by-step

Mark Baek avatar
Written by Mark Baek
Updated over a week ago

Once you've set up the correct type of flow in Klaviyo, any emails you add inside of this flow can display quiz data dynamically.

There are many ways to do this, but the one this guide will highlight is using a dynamic block to display products.

πŸ’‘ What you'll learn

  • How to create a metric-triggered flow in Klaviyo.

  • How to set up a dynamic table.


πŸ’‘ Prerequisites

Metric-triggered flows must target the quiz completed event which is available on Octane Plus.


How does it work?

Klaviyo emails can be customized by using variables which are bits of code you can add to emails that turn into customer data when the email is sent.

Variables are typed out inside of curly braces {{ }} which tells Klaviyo that any text inside will be variable code.

Hi {{ first_name }},

Thanks for subscribing!

In this example, {{ first_name }} is a variable that will turn into the first name listed in the subscriber profile that receives the email. If Klaviyo doesn't find a first name, the variable will turn into a blank space.

🎬 VIDEO: Creating Dynamic Email Content with Quiz Data

Check out the video version of this guide.


πŸ’‘ Learn more

This guide will help you set up a dynamic table which is the recommended method for inserting data from quiz completions.

By familiarizing yourself with Klaviyo's variables feature, you can unlock a ton of customization. For example, setting up the table in this guide with event.products_all|slice:'3' instead of just event.products_all will allow you to limit the table to 3 products (explained more in-depth ahead in this guide).

Here are some resources that can make you a master at building powerful email templates in Klaviyo:

Creating a dynamic table

πŸ“• How to create a dynamic table in Klaviyo's email editor:

Step 1: Open an email block inside of your metric flow.

Check out the video in this section or this guide to learn how to set the correct type of flow up.


Step 2: Open the email in the editor & add a table block.


Step 3: Inside the table block, open the Table Settings tab & change the table data type to Dynamic.


Step 4: In the row collection field, type in event.products_all.

event.products_all is the code that represents the product data packaged in each quiz completion event.

The row collection lets the dynamic table know how many times it needs to fill out (depending on the number of products recommended by each quiz completion).


Step 5: In the row alias field, type in a nickname (such as quiz or octane).

The row alias label can be anything you'd like. The alias is what we'll type in for variables instead of typing out event.products_all each time, so something short and simple works well.

For example, to insert a link to the product page, we would only have to type out {{ quiz.link }} instead of {{ event.products_all.0.link }}.

The 0 in the full variable represents the 1st product, which isn't something we'll need to worry about for dynamic tables.

Adding dynamic content into the table

πŸ“• How to use variables inside of a dynamic table:

Step 1: With the dynamic table open, go to the Content tab.


Step 2: With the text column highlighted, type in {{ quiz.title }} into the text body (replace quiz with your row alias).


Step 3: Under DYNAMIC ROWS, switch to the image column & click on Add Dynamic Image / Browse Image.


Step 4: In the Dynamic variable or dynamic URL field, type in quiz.image (replace quiz with your row alias).


Step 5: Save and try previewing the email.

You'll need to be previewing from inside a flow triggered by the quiz completed event in order to see the variables turn into customer data.

Dynamic variable reference

πŸ—’οΈ What does it turn into?

✍️ Specific variable

Name

title

ID

id

Product page URL

link

Image

image

Price (formatted in default currency)

price_formatted

Description

description

Tags

tags

Type

type

To use this table, add the variable listed here after the row alias or row collection.

For example, {{ quiz.price_formatted }} would be used in the block you want to dynamically insert product prices into.

Outside of a dynamic table, {{ event.products_all.0.price_formatted }} is what the variable would look like for the price of the 1st recommended product.

Limiting dynamic table expansion

Dynamic tables will automatically match however many products a customer saw at the end of a quiz.

To limit the table to 3 products, add |slice:'<insert number here>' such as in this example:

event.products_all|slice:'3'

Adding |slice:'2' into the row collection field now limits the dynamic table to 2 total tables overall.

To change this, edit the number. event.products_all|slice:'4' would limit the table to 4 products while event.products_all|slice:'2' would limit the table to 2, and so on.

Here's a glossary on all of the variable filters you can use to power up your flows.

Did this answer your question?