Abandoned cart email

Create abandoned cart email and increase the conversion to purchase

Sometimes leads add items to their cart but do not complete an order. Such event is often called "abandoned cart", and all online stores try to reduce the number of abandoned carts.

If a lead adds an item to a cart, it means that they are interested in this item. So our task is to lead them to make an order.

Read about abandoned cart pop-up in this article.

Let's see how you can create an abandoned cart email. Follow these steps:

  1. First of all, you need to set data collection, so the system will be able to track added to cart items. The following events must run after everything is configured: "Added an item to the cart"

    $cart_added with event properties $name, $img, $amount, $url

    "Made an order"

    $order_completed with event property $order_amount

    and "Page leave" event;

All data (which will be added to email) is taken from event properties.

After data collection is configured, the events "Item viewed" and "Added an item to the cart" will be shown in lead card:

  1. Start the email creation process;

  2. Select "Added an item to the cart" event as a trigger and indicate 1 hour message sending timeout. It means the message won't be sent immediately after one adds an item to the cart.

  3. Now we need to set the audience, so that the email will be sent to those who have email address and who don't complete the order in one hour (or the time period which you indicated at the first step in timeout option).

In this case, the message won't be sent to those who paid their orders.

  1. In order not to disturb leads with the same message over and over again, set "resend in 1 day" condition.

  2. Select email type.

Paste code to the message text, so last 20 added to cart items will be shown in the message (they won't be duplicated):

{% set lastDateCompleted = 0 %}

{% if get_last_events('$order_completed') | length > 0 %}

{% set lastDateCompleted = get_last_events('$order_completed')[0]['created'] %}

{% endif %}

{% set massOrder = [] %}

{% set massOrderName = [] %}

{% for e in get_last_events('$cart_added') %}

{% if e['created'] > lastDateCompleted %}

{% if e.props['$name'].lower().strip() not in massOrderName %}

{% set x = massOrder.append(e) %}

{% set x = massOrderName.append(e.props['$name'].lower().strip()) %}

{% endif %}

{% endif %}

{% endfor %}

If you compose HTML email, do not forget to include div with display style: none - in order not to show it in message.

Run a loop which will add data from the created massive:

{% for b in massOrder %}

{% set link = b.props['$url'] %}

{% set img = b.props['$img'] %}

{% set price = b.props['$amount'] %}

{% set name = b.props['$name'] %}

After this, you need to add a block with items (you should replace link to the item, it's name, price and link to it's image with corresponding variable {{link}}, {{name}}, {{price}}, {{img}}).

For example:

<img src="{{img}}">

<a href="{{link}}">{{name}}</a>

<span>{{price}} USD</span>

After this block, add the following:

{% endfor %}

to complete the cycle.

 

  1. Select the message goal if needed.

Example: we want to check how many leads will make an order in 3 days after receiving an email and how much income will this auto message bring;

  1. Check whether all settings are correct.

We would recommend to launch events for message chains in order to see what message was send/read/replied/etc (it will help you to build analytics).

  1. Do not forget to check message statistics.
Powered by