If you want to send an email with an abandoned basket to your contacts, it is necessary to create a template for the abandoned basket in Ecomail and then the automation itself, thanks to which the email will be sent. For automation to work properly, you also need to set up integration with your e-shop and track users on the web.
Let's take a look at how to make an automation and a template for an abandoned basket.
To integrate your e-shop with Ecomail, you can use one of our available plugins, API, or you can use your own solution for integration.
2. Preparing the template
If you have already completed the integration, you need to prepare a template with the content of the basket.
It is very easy and a few special merge tags will help you, for example:
*|#ECM_BASKET|* - number of products in the basket
*|IF:#ECM_BASKET=2|* - condition if the number of products in the basket is 2
*|ECM_BASKET.name|* - name of the first product in the basket
*|ECM_BASKET.price|* - price of the second product in the basket
The product features are then as follows (demonstrated on the first product
*|ECM_BASKET.productId|* - Product ID
*|ECM_BASKET.img_url|* - image location
*|ECM_BASKET.url|* - product link
*|ECM_BASKET.name|* - product name
*|ECM_BASKET.price|* - price
*|ECM_BASKET.description|* - description
Therefore, the following entries must have a modified number for each parameter *|ECM_BASKET[1/2/3...].ProductId|*.
The basic element is the condition. The following condition displays products by logic:
- If there is one product in the basket, one product will be displayed in the template
- If there are two products in the basket, two products will appear in the template
- if there are more products in the basket (3 or more), three products will be displayed
Then set the parameters according to what information you want to parse, as well as whether you want to use the buttons or not.
As an example, here is a template that contains a condition according to the number of items in the user's basket:
three items (ie even if there are more than three items in the basket)
TIP: Under all the inserted buttons, you typically insert a link to the basket on the e-shop -> to redirect the contact directly back to the basket after clicking and thus bring him closer to completing the order. Clicks on the product are automatically below the images thanks to the inserted merge tags.
If you want the images, that will be next to each other, to be aligned at the same height, we recommend inserting the merge tag for the images into one specific structure, as well as a button on which you can insert a link to the basket or for placing the order. However, this means that especially in the mobile view, the content will be sorted as the structures follow each other (the images below each other will be displayed and after that the structure with the content of the name, price).
The image is inserted via the source code of the text content (Source on the toolbar).
We also recommend setting the maximum size for product images, as they will be otherwise displayed in their original size. The code for such an image might look like this:
<img alt="*|ECM_BASKET.name|*" src="*|ECM_BASKET.img_url|*" width="250" />
<!-- Where 250 is maximal width of an image -->
The newsletter has a width of 600px, so it is good to set the size of the images adequately, eg: three images (products) next to each other should each have a maximum of 200px, two images (products) can have a maximum of 300px, etc.
3. Automation settings for an abandoned basket
After creating a template for an abandoned basket, you can start creating the automation itself.
Set the trigger frequency to "Multiple times" and the automation trigger is always a "Custom event - Basket", see PrntSc:
After this trigger, set the subsequent scenario according to the strategy of your choice. The scenario can look like this:
wait 3 hours
condition whether the user has placed an order in the last x hours (we recommend to use a time reserve, so in this case >> in the last 6 hours)
if an order was not placed, send an email with the content of the basket
you can also send another email after another 48 hours, for example
The automation tree can then looks like this in Ecomail:
You can test the functionality of the automation before starting it.
The first step is to track your email address on the website (e-shop). You can do this as follows:
1. Insert the following string after the link and replace it with your email, which you have in the contact list: ?email@example.com (eg firstname.lastname@example.org) or
2. Run a snippet via the console in the browser (eg in Google Chrome via Developers tools or F12> console) and replace it with your email:
window.ecotrack ('setUserId', 'email@example.com');
Once the tracking is activated, put the goods in the basket. Then enter your address in the contact list for which automation is set. Wait for your custom events to be displayed in the contact details (Activity and events) and then insert the contact into automation testing.
Do you find template creation and automation difficult? Need help with specific settings? Do not hesitate to contact us on our chat, which is available to you in the application or on the website.