Skip to main content

Send Okendo Quizzes Recommendations using Klaviyo

Written by Stephen Dundas

In this article, you'll learn about:

Quiz data sent to Klaviyo

This article will discuss how to send quiz recommendations to customers' email using Klaviyo. The following variables can be populated in the email:

  • Quiz Name

  • Product Name

  • Product Image URL

  • Product URL

  • Product ID

  • Question

  • Answer

For the full list of loyalty profile properties and event variables, see Okendo data sent to Klaviyo.

Sending quiz recommendations to customers

  1. Open Klaviyo and create a new flow with the trigger Submitted Okendo Quiz.

    1. If you would like to filter the flow to a specific quiz only, click on the trigger, add a trigger filter and filter by the dimension Quiz Name.

  2. Drag and drop a new email into the flow, and click edit.

3. Drag a table block into the email.

4. Navigate to Styles > Dynamic and fill out the Row collection and Row alias. These variables are case-sensitive and must be entered as below.

event|lookup:'Recommended Products'
Product

5. Navigate to Content > Dynamic Rows > select the left column and set the Cell Content to an Image. Add a dynamic image and insert the following URL:

{{ Product|lookup:'Product Image Url'|default:'' }}

To link to the product description page, insert the following variable in the Link address field. Set the Max width of the products to size them as required.

{{ Product|lookup:'Product URL'|default:'' }}

6. Select the right column under Dynamic Rows and set the Cell Content to Text. Enter the below variable in the text field following the video below. (Klaviyo's new editor is a bit finicky so follow the gif below for a quick way to add the necessary event variables by copy/pasting them from this article:

Product name (the text displayed in the block)

{{Product|lookup:'Product Name'|default:'' }}

Product url (hyperlinked that leads to the product in your store)

{{ Product|lookup:'Product URL'|default:'' }}

7. Preview the changes. The product name, image and link to the product description page should populate correctly.

Displaying quiz questions and answers

  1. Drag a text block into the email.

  2. Below is the schema for the question and answer variable. Variables with "0" represent the first question or answer and the number will increase for each question/answer pair passed to Klaviyo. You can also reference the gif to see what a quiz with even more questions/answers looks like.

{{ event.0.question|default:'' }}
{{ event.0.answer|default:'' }}

Keep in mind that you can customize the variables depending on how many questions and answers you'd like to show. Again, Klaviyo's new editor is a bit finicky when it comes to adding event variables, so follow the pattern from the gif above to copy/paste event variables using the Preview & Test screen.

Note: Alternatively, an HTML block can be used. Tags can be copy/pasted directly into an HTML block (custom HTML styling will need to be added as well).

The screenshot below shows an example of what this should look like:

2. Preview the changes and ensure that it's populating correctly.

Linking to the quiz's recommendation page

A link or button can be added to the email for the quiz taker to view their recommendations on site. The quiz response ID variable is sent through with the Submitted Okendo Quiz event.

{{ event|lookup:'Quiz Response ID'|default:'' }}

A combination of the page URL that the quiz is installed on, the query string ?okendo_quiz_response_id= and quiz response ID will be required together to create the link.

For example:

https://okendocosmetics.com/pages/custom-beauty-recommendation?okendo_quiz_response_id={{ event|lookup:'Quiz Response ID'|default:'' }}

Did this answer your question?