Octane AI sends quiz data to Klaviyo as custom properties and through the quiz completed event. You can use variables to add quiz answers, results page URLs, recommended products, and other customer-specific data to your messages.
How variables work
Variables are pieces of code that Klaviyo replaces with customer data when a message is sent.
For example: Hi {{ first_name|default:'there' }}, Klaviyo replaces first_name with the customer's first name. The default:'there' filter displays "there" if a first name isn't available.
You can use variables to personalize email and SMS content, and anywhere else Klaviyo supports dynamic data.
Custom properties vs. the quiz completed event
Octane AI sends quiz data to Klaviyo in two forms: custom properties on the customer's profile and the quiz completed event.
Custom properties
Custom properties are stored on the customer's Klaviyo profile and can include quiz answers, results, and the results page URL.
Use custom properties for:
Email and SMS personalization
Segments
Flow filters
Longer-term campaigns
Custom property variables use person.
Quiz completed event
The quiz completed event is added to the customer's Klaviyo profile each time they complete a quiz.
It includes data from that specific quiz completion, including recommended products.
Use event data for:
Quiz results emails
Recommended product emails
Other post-quiz flows that need data from a specific quiz completion
Event variables use event and are available in metric-triggered flows.
Important: Recommended product data is only available through the quiz completed event.
Add a quiz results page URL
You can add a link to the customer's personalized quiz results page to your Klaviyo emails and SMS messages.
Using a custom property
Use: {{ person|lookup:"quiz results URL"|default:'' }}
Using the quiz completed event
Use: {{ event|lookup:'quiz results URL'|default:'' }}
For a metric-triggered quiz flow, use the event version. This pulls the results URL from the specific quiz completion that triggered the flow.
Use recommended product data
Recommended product data is available through the quiz completed event and is stored in: event.products_all
Each recommended product can include:
title— Product nameid— Product IDlink— Product page URLimage— Product imageprice_formatted— Price in your store's currencydescription— Product descriptiontags— Product tagstype— Product type
Use product variables in a dynamic table
When using a dynamic table, combine your row alias with the product variable.
For example, if your row alias is quiz:
{{ quiz.title }} displays the product name.
{{ quiz.price_formatted }} displays the product price.
{{ quiz.description }} displays the product description.
Use product variables outside a dynamic table
Outside a dynamic table, use the product's position in event.products_all.
Product numbering starts at 0.
For example:
{{ event.products_all.0.title }} — First product's name
{{ event.products_all.1.image }} — Second product's image
{{ event.products_all.2.link }} — Third product's page URL
Format your data with filters
Klaviyo filters let you change how dynamic data appears in your messages. Add a filter after a variable using |.
Useful filters for Octane AI quiz data:
Add fallback text:
{{ first_name|default:'friend' }} displays friend if the customer's first name isn't available.
Limit the number of recommended products:
event.products_all|slice:'3' Limits a dynamic table to the first three recommended products.
Remove HTML from product descriptions:
{{ event.products_all.0.description|striptags }} Removes HTML tags from the Shopify product description.
Change capitalization
Uppercase: {{ event.products_all.0.title|upper }}
Lowercase: {{ event.products_all.0.title|lower }}
Capitalize each word: {{ event.products_all.0.title|title }}
Shorten text
Limit by characters: {{ event.products_all.0.title|truncatechars:10 }}
Limit by words: {{ event.products_all.0.description|truncatewords:5 }}
Shorten a displayed URL
{{ event|lookup:'quiz results URL'|urlizetrunc:15 }}
This shortens the displayed link while keeping it clickable.
Combine filters
You can use multiple filters on the same variable.
For example:
{{ event.products_all.0.description|striptags|truncatewords:20 }} removes HTML from the product description and then limits it to 20 words.
Preview dynamic content
Event variables only display real data when you preview an email inside the metric-triggered flow that uses them.
Open an email inside your quiz completed flow.
Click Preview & test.
Open Preview Event Info.
Click any value to copy its variable.
Use the recent event controls to preview the email with different quiz completions.
If you preview the email from the Templates page or from a flow that doesn't use the quiz completed event, event variables may appear blank or display as raw code.
