All Collections
Klaviyo Integration
How to Use Event Variables in Klaviyo Emails With Dynamic Table Blocks
How to Use Event Variables in Klaviyo Emails With Dynamic Table Blocks

This guide will outline how to use event variables in Klaviyo's dynamic blocks and tables to add upsells and cross-sells to emails.

Strauss Van Wagenen avatar
Written by Strauss Van Wagenen
Updated over a week ago

This document can be considered the 4th step in including data-driven product offers in your Klaviyo emails. If you'd like to review the previous steps or move to the next steps after reading through this entire document, check out these help docs:

After completing this step and adding personalized upsells and cross-sells to your Klaviyo flows, you can expect to:

  • Increase AOV and revenue with targeted upsells πŸ“ˆ

  • Maximize conversions through timely cross-sells that excite customers πŸ’°

  • Surface relevant offers for repeat customers to boost customer lifetime value πŸš€

What are dynamic table blocks?

Simply put, Klaviyo's dynamic table blocks are content cells that can be placed into emails to personalize content based on the event that triggers the flow. Dynamic tables are a great way to automatically generate content without having to manually create each block within the Klaviyo editor.

These can be used for product recommendations and they offer a simple way to display the item(s) your customers have purchased or compare at prices.
​If you've never used dynamic table blocks before. read Klaviyo's help documentation on the subject.

Placing dynamic table blocks in your Klaviyo flow

First, navigate to the desired flow within your Klaviyo dashboard. Select the email draft that you would like to add dynamic table block(s) to and click the Edit button in the left-hand sidebar.

You'll then be redirected to a new page that allows you to change the flow's settings such as subject line and sender details. Click the Edit Email button in the top right-hand corner of the edit box. You'll be redirected again, where you can begin editing the dynamic table.

From the left-hand sidebar, scroll down until you see the Table option under the Content tab. Drag and drop the table block where you'd like it to be placed on the email.

Once the table is placed, click on the table in the email and navigate to the Table Settings tab in the left-hand sidebar. From here, change the Table Data toggle to Dynamic.

Change the row collection to event.rebuy_shopify_order.line_items and change the row alias to item.

Managing dynamic rows to update images and text

After updating the Table Settings, navigate back to the Content tab in the left-hand sidebar. Using the Cell Selector and Cell Content toggles, you'll be able to update the table's layout using Rebuy's event variables, depending on your personalization needs.

If you haven't already seen the recommended event variables to surface Rebuy data, please reference our previous help document and scroll to the Common Rebuy variables used in Klaviyo emails section.

Important to note - since the applied row alias has now been input, Klaviyo will be able to identify all of the items in the order. The term "item" represents each item that was purchased in the order, so input a shortened version of the variable in the corresponding image or text block.

Here is an example when changing the cell content settings for a text block:

  • Paste in the full event variable from the previously input row collection:

    • e.g., {{ event.extra.line_items.0.title }}

  • Replace the text you used for the row collection and the following dot and number with the previously input row alias, but keeping the surrounding brackets.

    • For this example, {{ event.extra.line_items.0.title }} becomes {{ item.title }}, since item is the alias.

Confused about how this works? Read Klaviyo's help documentation on the subject for clarification.

Click the collapsible sections below to learn how to add event variables for image and/or text blocks πŸ‘‡

Dynamic images

After selecting the dynamic table block, click on the image option under Dynamic Rows and then click the Add Dynamic Image / Browse Image button to add the event variable.

You'll then be redirected to a popup window, where you can add the desired event variable. Based on the previously explained row alias rules, use

{{ item.product_json.images.0.src }}.

To clarify, the event variable is no longer {{ event.rebuy_shopify_order.line_items.0.product_json.images.0.src }}. Instead, update the dynamic variable to read as {{ item.product_json.images.0.src }}.

After adding the variable under the Dynamic Image settings, click Save and you'll be redirected back to the template editor with your newly placed dynamic image.

Dynamic text

Next up: changing the text within the dynamic table block.

Following the same shortened event variable principles, use {{ }} to display the name of the purchased product, rather than manually creating a row for each possible item purchased.

To clarify, the event variable is no longer

{{ }}. Instead, update the Cell Content to read as

After inserting the text copy, your dynamic table is ready! Each item will now display in the created table, once previewed.

Simply click Preview and Test in the top right-hand corner of the page.

If you see any changes that need to be made after checking out the preview, you can re-update the dynamic table block's settings in the template editor.

Using other dynamic blocks in Klaviyo flows

Klaviyo makes it easy to drag and drop different types of content blocks, depending on your needs. With headers, text, buttons, images, and more, you can quickly build emails with dynamic blocks and generate content using Rebuy's event variables.

Start by dragging and dropping the content you would like to see displayed and input the desired variables in their respective settings.

Check out this short video for an in-depth example of how to do this:

Please note: The email recommendations will be determined by the data source that is attached to the Klaviyo Event, which was created in the Rebuy dashboard.

What's next?

After you've created the dynamic table block(s) that you'd like to surface, you're ready to start converting customers with relevant upsells and cross-sells! Click here to read the next help document if you'd like to use or reference our pre-built Klaviyo email templates.

Good news, the Rebuy integration for Klaviyo doesn't stop here! We have 2 other integration features that you should check out:

Looking for a compiled list of all the Klaviyo integration help docs? We got you 🀝

Did this answer your question?