Skip to main content

Rebuy Product Recommendations in Klaviyo Flows and Campaigns

This guide outlines how to add Rebuy-powered product recommendations to your Klaviyo Flows and Campaigns for full email personalization.

Strauss Van Wagenen avatar
Written by Strauss Van Wagenen
Updated today

What is Klaviyo?

Klaviyo is a unified customer platform that helps you build stronger relationships with your customers by giving you full control over your data and interactions. It tracks shopper behavior across your site—what they click, where they drop off, and what drives them to buy. With this insight, you can create and automate personalized emails and SMS messages—like cart reminders, price drop alerts, and product recommendations—using Klaviyo’s built-in templates and workflows. It integrates seamlessly with your tech stack and scales with your growth.


Integration Overview

Enhance your marketing strategy and drive repeat purchases by combining Rebuy’s powerful product recommendations with Klaviyo’s email and SMS functionality.

  • Prebuilt Rebuy Flows in Klaviyo: Quickly set up an automated post-purchase, cross-sell, or reorder flow with event variables already configured.

  • Recommendations in Campaigns: Leverage the data added to the customer profile to tailor product suggestions and use a product feed as a fallback.

This guide will walk you through the following setup instructions:

  1. Add Rebuy Recommendations to a Rebuy-Triggered Flow

  2. Add Rebuy Recommendations to Klaviyo Campaigns


Prerequisites

Before you begin, ensure the following:

  • Rebuy x Klaviyo Integration: Your Rebuy and Klaviyo accounts are connected.

  • Rebuy Event Setup: At least one Rebuy event (e.g., [Rebuy] Order Placed) is configured.

  • Basic HTML/CSS Knowledge (optional): Helpful for customizing email blocks, though not required when using prebuilt flows.​


Adding Rebuy Recommendations to Klaviyo Flows

Overview

Rebuy offers prebuilt Klaviyo flows that utilize the [Rebuy] Order Placed event. These flows come with preconfigured email templates and event variables, eliminating the need for manual code insertion.

Installation Instructions

  1. Access Klaviyo Flows:

    • Navigate to the Flows section in your Klaviyo dashboard.

    • Click Create Flow and filter by "Rebuy" under Integrations.​

  2. Select a Prebuilt Rebuy Flow:

    • Choose a flow that suits your needs, such as:

      • Reorder and Recommendations

      • Ideal Add-On Recommendations

      • Personalized Recommendations

  3. Customize the Flow:

    • Review and adjust email content, branding, and timing as needed.

    • If a reorder link is included, ensure the Reorder Landing Page is enabled in Rebuy and linked appropriately.​

  4. Test the Flow:

    • Place a test order to trigger the [Rebuy] Order Placed event.

    • Verify that the email displays the correct product recommendations.

    • Alternatively, use the "Preview Data" feature in Rebuy's event settings to test.​

  5. Activate the Flow:

    • Once satisfied, set the flow live to start engaging customers with personalized recommendations.


(Optional) Incorporating a Reorder Landing Page

Reorder Landing Pages can enhance post-purchase flows by simplifying the repurchase process.​

  1. Create a Reorder Landing Page in Rebuy:

    • In the Rebuy dashboard, go to Landing Pages > Reorder Landing Page.

    • Customize the page with your branding and product recommendations.

    • Copy the Reorder Page URL.​

  2. Add the Link to Klaviyo Emails:

    • In Klaviyo, edit the relevant email within your flow.

    • Insert a button or hyperlink with the Reorder Page URL.

    • Save and test the email to ensure the link functions correctly.​


Adding Rebuy Recommendations to Klaviyo Campaigns

Overview

For one-time campaigns like promotions or newsletters, you can personalize product recommendations using Rebuy data integrated into Klaviyo. There are two primary methods:​

  1. Product Feed Fallback:

    • Use a Rebuy-powered product feed in Klaviyo as a simpler setup.​

  2. Dynamic Variables:

    • Insert code that loops through recommended products from Rebuy.​

Implementing Product Feed Fallback

  1. Add a New Section in Your Email Template:

    • Below your main content, insert a new section.

    • Add a text block within this section.​

  2. Insert the Source Code:

    1. Click the source code (</>) button in the text block editor.

    2. Paste the following code, replacing 'rebuy_recommendations' with your specific recommendation name from Rebuy's event settings:​

      1. liquidCopyEdit{% assign rebuy_recs = person|lookup:'rebuy_recommendations'|slice:":6" %}
      2. Example: If your Klaviyo Event's name is "rebuy_recommendations_1" then update the code to read as:

        • rebuy_recs=person|lookup:'rebuy_recommendations_1'|slice:":6" %}
    3. This code fetches up to six product recommendations for the recipient.

<div>{% with columns=4 rebuy_recs=person|lookup:'rebuy_recommendations'|slice:":6" %}
<style>
.rebuy_product_block_table {
margin: 0 auto;
width: 100%;
border-collapse: collapse;
padding: 5px;
}
.rebuy_product_block_text {
text-align: center;
padding: 3px;
}
.rebuy-product-image-cell {
height: calc(100% / 4);
text-align: center;
}
.rebuy-product-image {
max-height: 100px;
max-width: 150px;
border-radius: 5px;
}
.rebuy-product-title-cell {
height: 50px;
vertical-align: top;
text-align: center;
padding-top: 5px;
font-size: 16px;
}
.rebuy-product-price-cell {
height: 20px;
vertical-align: top;
text-align: center;
font-size: 14px;
color: #333;
}
.rebuy-button {
display: inline-block;
padding: 8px 16px;
font-size: 14px;
border-radius: 5px;
background-color: #1155cc;
font-family: "Helvetica";
text-decoration: none !important;
color: #FFFFFF !important;
margin: 5px 0;
}
@media (max-width: 768px) {
.rebuy_product_block_table {
display: block;
width: 100%;
}
.rebuy_product_block_cell {
width: 50%;
box-sizing: border-box;
float: left;
}
.rebuy_product_block_table th {
width: 100%;
}
.rebuy_product_block_table th img {
display: block;
margin: 0 auto;
}
.rebuy-product-image-cell {
height: calc(100% / 2);
}
.rebuy-product-image {
max-height: 80px;
max-width: 120px;
}
.rebuy-product-title-cell {
font-size: 14px;
}
.rebuy-product-price-cell,
.rebuy-button {
font-size: 14px;
}
}
</style>
<table class="rebuy_product_block_table">
<tbody>
<tr>{% for item in rebuy_recs %}
<td class="rebuy_product_block_cell">{% catalog item.id %}
<table class="rebuy_product_block_inner_table">
<tbody>
<tr>
<th class="rebuy-product-image-cell"><a href="{{ catalog_item.url }}"> <img class="rebuy-product-image" src="{{ catalog_item.featured_image.thumbnail.src }}" alt="{{ catalog_item.title }}"> </a></th>
</tr>
<tr>
<th class="rebuy-product-title-cell">{{ catalog_item.title }}</th>
</tr>
<tr>
<td class="rebuy-product-price-cell">
<p class="rebuy_product_block_text">{% if catalog_item.metadata|lookup:"$price" %} {% currency_format catalog_item.metadata|lookup:"$price"|floatformat:2 %} {% elif catalog_item.metadata|lookup:"price" %} {% currency_format catalog_item.metadata|lookup:"price"|floatformat:2 %} {% endif %}</p>
</td>
</tr>
<tr>
<td>
<p class="rebuy_product_block_text"><a href="{{ catalog_item.url }}" class="rebuy-button">Shop Now</a></p>
</td>
</tr>
</tbody>
</table>
{% endcatalog %}</td>
{% if forloop.counter|divisibleby:4 %}</tr>
<tr>{% endif %} {% endfor %}</tr>
</tbody>
</table>
</div>
<div>{% endwith %}</div>

Creating a Product Feed Fallback

After creating the Klaviyo Event, you'll need to first create a Product Feed Fallback in your desired email campaign. It's important to clarify that although event variables can only typically be used in metric-triggered flow messages, Rebuy's "Send to customer profile" toggle in the Event Settings section allows Rebuy-powered recommendations to be surfaced in email campaigns.

Since some customers in an email campaign might not have past orders to trigger product recommendations from (i.e., the selected Customer Segment includes customers who don't have "Order Placed" events on their profiles), we recommend creating a Product Feed Fallback to ensure that recommendations are always surfaced.

  1. Navigate to your Klaviyo portal to create a new email campaign or edit an existing one.

  2. Add a new section for the product feed with a text block(s) and insert the following conditional logic:

    1. {% if not person|lookup:'rebuy_property_name' %} 
  3. Add a Klaviyo product feed block below the text block. If you don't have a feed created, read this help article.

  4. Add a second text block below the product block with the following end logic:

    1. {% endif %}
    2. You should end up with 2 separate sections – one for the conditional product feed and another for the Rebuy Recommendations.

  5. Save each section as "Universal Content" so you can use them anywhere.

    1. Name the product feed (first) section "Rebuy Recommendation Fallback".

    2. Name the other (second) section "Rebuy Recommendations".

  6. In any Klaviyo email or campaign, go to the content editor and select the universal content you created ("Rebuy Recommendation Fallback" and "Rebuy Recommendations") to insert the universal content into your email campaign.


(Advanced) Using Dynamic Event Variables

If you prefer granular control or want to reference the same [Rebuy] Order Placed events in a campaign, you can manually insert dynamic event variable blocks.

For campaigns, you might use a segment triggered by certain interactions and reference the Rebuy event data if it’s stored on their profile.

Below is a simplified code snippet that loops through items in the event data:

{% if event.extra.line_items %} <table> {% for item in event.extra.line_items %} <tr> <td> <img src="{{ item.product_image_url }}" alt="{{ item.product_title }}" width="80" /> </td> <td>{{ item.product_title }}</td> <td>${{ item.product_price }}</td> </tr> {% endfor %} </table> {% else %} <p>Check out our latest products!</p> {% endif %}
  • event.extra.line_items: This is often where Rebuy’s dynamic recommendations or item details are stored.

  • Adjust or rename variables as needed if your data is structured differently.


FAQs

Are the prebuilt Rebuy flows free or do they cost extra?

Using the prebuilt Rebuy flows is included in your Rebuy plan. Standard Klaviyo email/SMS costs apply.

What if I don’t see the [Rebuy] prebuilt flows in Klaviyo?

Make sure that the event you named comes through as [Rebuy] Order Placed. If it is named something else like [Rebuy] Product Recs , then the prebuilt flows will not render but you can still create custom flows using that metric.

Did this answer your question?