Setting up the OCU "Abandoned Cart" Flow in Klaviyo

Klaviyo provides a built-in "OCU Abandoned Cart Reminder" flow template that you can use. Just go to Flows > Browse Ideas to find it there in your Klaviyo account: 

If you already have an existing Abandoned Cart Flow setup for your Shopify checkout and want to use the emails in it for your OCU Abandoned Cart Flow as well, then the easiest way to set that up is to Clone your existing "Abandoned Cart" flow and then adjust the Flow Trigger and Flow Filters to work properly with OCU's metrics. The abandoned cart email templates provided by Klaviyo that works with Shopify checkout also works with OCU checkout!

Note: You will want to have two Klaviyo flows set up for Abandoned Carts; One for the standard Shopify checkout and one for the OCU checkout.

Trigger and Filter settings:

Trigger: Checkout Started (OCU)

Flow Filters:

Has Checkout Completed (OCU) zero times since starting this flow
AND
Has Checkout Completed With Offers (OCU) zero times since starting this flow
AND
Has Placed Order zero times since starting this flow

Preview the Email(s)

Click the "Preview" button to preview an email within the Flow to ensure it's setup correctly. Preview it directly within Klaviyo as a customer who has the "Checkout Started (OCU)" metric added to their account:

Not seeing the OCU metrics?

If you don't see the "Checkout Started (OCU)" metric available, start a checkout on the OCU app's checkout. Then fill out the customer information and click the "Continue to shipping method" button, then close the browser window or tab.  

If you don't see the "Checkout Completed (OCU)" and "Checkout Completed With Offers (OCU)" metrics available, you will first have to complete a live test order using the OCU checkout and accept an upsell offer as well. This should be done afteryou've connected your Klaviyo account and enabled the Abandoned Carts feature within the OCU app.

Then wait for the OCU Metrics to pass over to your Klaviyo account so you can use them when setting up the Flow Trigger and Filters. 

*Important: If your trigger or upsell products have emoji(s) in the title, it is recommended to remove them as they cause an issue with sending OCU metrics to Klaviyo.

Follow these step-by-step instructions to manually create an Abandoned Carts email template if desired (optional):

Note: The emails that are included in the standard "Abandoned Cart" flow that you clone will be setup like this already, but if you want to set them up manually instead or apply some changes then follow the information below.

All variables that OCU passes into Metric JSON can be used in the same way as variables passed from Shopify. Here is the Klaviyo article which describes how to work with it: https://help.klaviyo.com/hc/en-us/articles/115002779071-Personalize-Flow-Emails-with-Dynamic-Event-Data

Unfortunately, OCU can’t pass all of the variables that Shopify passes, but the most important ones are being passed. You can find the list of those variables at the end of this article.

How to Manually setup the first email instead:

To dynamically display the item image(s) and the information about the items, a “Table Block" is recommended.

1) Add a Table Block to the email body.
2) Click on the Table Block > Columns > Delete Column 3 since we only need two columns for this table. Delete the Heading for Columns 1 and 2.
3) Click on Rows > Dynamic > Data Source and enter the following codes:

event.extra.line_items

item

4) Click Rows > Column1 > Image. Click "Browse" to add an image and select "Placeholder". Then enter the following code and Save:

{{ item.product.images.0.src|missing_product_image }}

5) Setup a link for the Images if desired. To have the images restore the abandoned cart when clicked, use this code:

{{ event.extra.checkout_url }} 

You can use this code to have the customer taken to the Product Page when the image is clicked instead:

{{ organization.url }}products/{{ item.product.handle }}

6) Select Rows > Column2 > Text > Source and enter the following code:

<h3><a href="{{ event.extra.checkout_url }}">{{ item.product.title }}</a></h3>

<p style="line-height: 20.8px;">Quantity: {{ item.quantity|floatformat:0 }} — Total: ${{ item.line_price|floatformat:2 }}</p>

The above code makes it so that the Product Titles will also function as Cart Restore Links. If you want the Product Titles to take the customer to the Product Page instead, use this code: 

<h3><a href="{{ organization.url }}products/{{ item.product.handle }}">{{ item.product.title }}</a></h3>

<p style="line-height: 20.8px;">Quantity: {{ item.quantity|floatformat:0 }} — Total: ${{ item.line_price|floatformat:2 }}</p>

The setup for the Table Block is now complete!

7) To display a Button for the Cart Restore Link you can use the “Button Block". Add the following code to the "Link URL" field of the button:

{{ event.extra.checkout_url }} 

Add this same code to any Abandoned Cart text links used throughout your email as well.

8) Click the "Preview" button to preview the email to ensure it's setup correctly. Preview it directly within Klaviyo as a customer who has the "Checkout Started (OCU)" metric added to their account:

Finally, save your template to something like “OCU - Abandoned carts template” and you’re done! 

NOTES: 

This is the list of variables to use for any buttons or links that you want to use to restore the customer’s abandoned cart with the abandoned item(s):

  • Item product title: {{ item.product.title }}
  • Item product quantity: {{ item.quantity|floatformat:0 }}
  • Line item price: ${{ item.line_price|floatformat:2 }}
  • Item price: ${{ item.price|floatformat:2 }}
  • Product handle: {{ item.product.handle }}
  • Product image: {{item.product.images.0.src|missing_product_image}}. We pass only the first product image.
  • Started checkout OCU value: ${{ event|lookup:'$value' }}
  • Item count: {{ event|lookup:'Item Count' }}
  • Abandoned Cart Restore Link: {{ event.extra.checkout_url }}
  • Full landing site: {{ event.extra.full_landing_site }}
Did this answer your question?