How to Add Product Recommendations to a Klaviyo Email using Dynamic Blocks
Introduction
Enhance your email marketing strategy by integrating Quizell's personalized product recommendations directly into your Klaviyo emails. By leveraging dynamic blocks, you can display customized quiz results within your automated email flows, helping to drive engagement and conversions.
Once you've set up your Klaviyo integration, any emails within your flow can dynamically display quiz data. This guide will walk you through using dynamic blocks to showcase personalized product recommendations effectively.
How Does It Work?
Dynamic variables allow you to insert personalized quiz data into your Klaviyo emails. These bits of code transform into customer-specific information when the email is sent. For example:
Inserting a first name into an email:
Hi {{ first_name }}
In this case, {{ first_name }} will dynamically change based on the recipient’s data.
For product recommendations, you can use dynamic variables to display specific quiz results, including:
Product Detail | Variable |
---|---|
Name | {{ title }} |
ID | {{ id }} |
Product Page URL | {{ link }} |
Image | {{ image }} |
Price | {{ price_formatted }} |
Description | {{ description }} |
Tags | {{ tags }} |
Type | {{ type }} |
Using Dynamic Variables in Your Emails
There are three ways to display product recommendations dynamically:
Dynamic tables – Best when the number of recommended products varies.
Variables per product slot – Ideal for displaying a fixed number of products.
Show/hide logic – Allows conditional display of blocks in your email template.
Creating a Dynamic Table with Quiz Data
Open your email template inside the quiz completed metric flow.
Add a table block from the left menu.
In the Table Settings tab:
Change Table data to Dynamic.
Set Row collection to event.products_all.
Set Row alias (e.g., quiz) to reference the row collection more easily.
Add dynamic content:
In the text column, insert {{ quiz.title }} to display product names.
In the image column, select Add Dynamic Image and enter quiz.image.
Save changes and preview your email.
Limiting the Number of Products Displayed
To restrict the number of products shown in the email, modify the row collection:
event.products_all|slice:'3'
This ensures only the first three products appear.
Using Variables for Specific Product Slots
If you want to display a fixed number of products (e.g., always show three), follow these steps:
Open your quiz completed metric flow email.
Click Preview and find the products_all section.
Hover over a variable and copy the code (e.g., {{ event.products_all.0.image }}).
Add this variable to the appropriate email block.
Example:
First product image: {{ event.products_all.0.image }}
Second product image: {{ event.products_all.1.image }}
Third product image: {{ event.products_all.2.image }}
Pros:
✅ Easy to integrate into any email layout.
✅ Maintains consistent formatting.
Cons:
❌ Doesn’t adjust automatically if fewer products are recommended.
Conclusion
By integrating Quizell’s product recommendations with Klaviyo dynamic blocks, you can create highly personalized and engaging emails. Whether using dynamic tables or static slots, you can effectively showcase quiz-driven results, boosting customer engagement and conversions.
For further customization, explore Klaviyo’s resources on:
Building dynamic blocks in emails
Template tags & variable syntax
Need help? Reach out to our support team! 🚀
Updated on: 30/01/2025
Thank you!