Abandoned cart campaign

This guide will help you understand:

  • What is an abandoned cart campaign and why you should use it
  • How to create this scenario step-by-step using Exponea
  • How to insert the abandoned products in the email template
  • How to AB test and evaluate your campaign

What is an abandoned cart campaign

Abandoned cart campaign automatically sends an email to customers who have left without ordering items they added to their cart. The average e-commerce loses over 75% of its online sales to cart abandonment. In other words, over 3/4 of shoppers choose to leave the site without completing a purchase. As the customers have already added products to the basket, they were quite far in the buying decision process. Remind the customers after a few hours or days that they have forgotten the items in the basket and increase the conversion rate easily.

How your campaign will look like

You will have created the following scenario including the email template:

How to create it using Exponea

This guide will show you how to create an abandoned cart campaign from scratch.

Prerequisites

Exponea Skills

Intermediate - we will guide you step-by-step but we assume you are comfortable navigating and working with basic components in Exponea. If you get stuck at any point, go back and read an article for that respective feature, mainly these:

Data and tracking

1. Tracking of the event cart_update

Required attributes:

  • action = add/remove - tracked for every change of the contents of the shopping cart
  • product_list - contains the current list of items present in the cart together with other required values to personalize the email. This attribute needs to contain all products that are in the cart after the last action= add or remove. Read the Recommended data section to see what values specifically you might need
  • Click here to see the tracking code snippet

2. Tracking of the event purchase

Click here to see the tracking code snippet

3. Imported product catalog

You need to have a catalog of your products identifiable by their id, which is the same one that is collected in your cart_update event. You can read more about catalogs here.

4. Integrated email domain

Creating the scenario

1. Create a new scenario and add the "On event" trigger node.
With this trigger node, customers enter the scenario every time the event is tracked.

1.1. Specify the event trigger to "cart_update" with the attribute that contains all the information about the items in the cart (product_list / products / ...) – this will prevent the situation that campaign will be sent when the cart is empty.

2. Set all the following conditions before AB split (each is explained below).

2a. Has email and consent
Only customers with email and corresponding consent should enter the scenario. Otherwise your evaluation will be corrupted with people that are not even eligible to receive such emails. Note that the consent logic will be specific for your project.
You can read more about consents in Exponea here.

2b. No AB split last X days
You most probably don’t want to send abandoned cart email to customer every time it happens. This condition specifies the time range after a customer can receive another abandoned cart email.
The campaign_id is located in the URL when you have the scenario opened.

Pro tip

We need to check the AB split instead of whether an email was delivered to keep the same rules for both the variant and control group for evaluation purposes. If we looked only at delivered emails, the control group would not be affected (as they don't receive any email). We recommend to use a period of at least 7 days).

Wait node
Define when to send the email after the customer abandons their cart using the wait node.


2c.Still has consent?
Double check whether the customer didn't unsubscribe while being in the wait node. Use the same consent condition as in the step 2a.


2d.Products in cart & no purchase & very last cart_update
Yes, this is a bit more complex condition consists of three sub-conditions. A AND NOT B AND C sub-conditions should apply. Don’t worry it’s still not a rocket science!

Explanations of the 3 conditions above

A) Products in the cart
This is an aggregate that checks whether some products remain in the cart after the last cart_update. If not, it means that the cart is empty and we don’t want to target such customer. The attribute might be called product_list or products Follow the basic documentation if you are not sure how to create an aggregate.

Save this aggregate to your project as you might need it to display certain information (which is contained in the product_list attribute) in the emails.

B) No purchase after the last cart_update
Target only customers who haven’t finished the order process. You need to include only these without purchase after the last cart_update. As in the previous step, you will need to create the same aggregate, but instead of last cart_update.product_list, select last cart_update.timestamp. In this case, however, you will need to create the aggregate in the Data Manager first and then come back here to select it from the drop-down list.

C) Very last cart_update
Remember that every event cart_update launches this scenario. Hence, if the customer made any changes to their cart later, we want to stop this scenario and take into account only the most recent version of their cart.

You will need an expression floor last cart_update.timestamp for this condition. Click here to see how to create it.

3. Add the AB test node to evaluate the uplift in revenues the campaign will bring you.

4. Attach the email node and insert the email template. Click here to learn how to create an abandoned cart email template showing the products in the cart.

Good job!

You have just created the abandoned cart scenario. Test it out on yourself and once you feel confident, start the campaign live.

Evaluation

Read our guide on AB Test Basic Evaluation to learn how you can evaluate your campaign.

Recommended data

If you want to display attributes of the items left in the cart in the email (such as an image, link, title, price, etc..) you need to have this information stored somewhere.

Using Jinja, you can fetch it either from your product catalog imported in Exponea or directly from the event cart_update and its attribute (usually called) product_list, which then contains the values you might use. The screenshot below depicts how the event might look like:

These are the attributes you might need for creating a personalized email. Note that it doesn't matter whether each attribute is present in the catalog, the event attribute or combination of both, as explained above.

Value
Use case

title

Showing the name of the product.

image

Needed to fetch the product image in the email.

url

Use if you want to hyperlink each product in the email.

total_price_local_currency

Total price of the cart in local currency. This makes it easier to tell customers they are qualified for free shipping or state how much more they need to spend to qualify.

total_price

Total price of the cart in reference currency. If you operate with more currencies, always track the prices/value in your reference currency too. This will be used to easily calculate revenue/value of carts etc. in a single currency.

price

To show the price of each product.

quantity

# units of a product in the cart.

Advanced

Custom wait time

It is a good idea to explore different wait times for different customers. You can enter this jinja into a custom wait node to send an email at the time the customer has last purchased and are therefore likely to be active.

{{ (((aggregates['592213934d539b19a436c1c2'] / 3600 + 2) % 24) - ((event.timestamp / 3600 + 2) % 24)) if   ((((aggregates['592213934d539b19a436c1c2'] / 3600 + 2) % 24) - ((event.timestamp / 3600 + 2) % 24) -3)>0) else  (((aggregates['592213934d539b19a436c1c2'] / 3600 + 2) % 24) - ((event.timestamp / 3600 + 2) % 24) +21) }}

The referenced aggregate is looking at last purchase timestamp aggregate, which looks like this:

Always remember to change the aggregate ID to the aggregate you create in your project.


What´s next?

How to insert the abandoned products in your email

Email template

Abandoned cart campaign


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.