All Collections
Email
Datatrics emails
Abandoned cart flow in a Hybrid Campaign
Abandoned cart flow in a Hybrid Campaign

This article describes how to use our hybrid campaign for sending abandoned cart emails via Datatrics.

Christiaan Proper avatar
Written by Christiaan Proper
Updated over a week ago

If you want to send emails via Datatrics, you need to make sure you set up the right DNS settings on your server. You can create the DNS record for your domain at https://app.datatrics.com/project/dns.

Once your DNS settings are set up correctly, you can start setting up a hybrid campaign to build a cart abandonment flow. To create such a campaign, head over to the Campaign tab in Datatrics and click on “Create Campaign” > “Hybrid Campaign”.

You will now see a blank canvas, which you can use to set up your flow. You can drag and drop the blocks on the left to the canvas. For the cart abandonment flow, you need to set it up as follows:

For the first trigger, you need to set up the targeting as follows:

Number of items in shopping cart [greater or equal] 1

The decision (black pill), needs to have the same targeting as the first trigger. So after (in this case) 4 hours, the flow checks if a user still has items in his shopping cart. If this isn’t the case, they converted and the flow stops. If this is the case, a touchpoint is triggered.

This touchpoint will be the cart abandonment email. The touchpoint type needs to be “Email” and you need to filter the products that can be present in the email in the section “Content”. You also need to choose the “Abandoned Cart” strategy as “Recommendation Strategy”, see an example below:

Next up is styling an email template and adding the abandoned cart products. You can do this at the section “Appearance”.

To add products to your template, drag and drop a row to your template. In this example we will add a 1:2 column row, in which we’ll add an image to the left column and its information and button to the right column. Later on we'll give an example of a full row with custom HTML.

To place this row for every product abandoned in the shopping cart, you need to select a condition that needs to be applied to this row. Click on the "Select condition" button and choose for "Loop through content" > "Product Recommendations". You can find the button when you click on the row, see the example below:

Now drag and drop the dynamic image block to the left column.

Next up, is adding a text block to the right column. You can use our variables as you would use them in embedded website touchpoints in this text block (e.g. {{name}}, {{description}}, {{price}}). See the example below:

The last item to add is the button with an URL to the product. Simply drag and drop a button from “Content” to the right column and use {{url}} as an URL (Note: The URL field needs to contain the full URL for this to work. If you only have a slug in this field, you need to enter you domain before {{url}}). See the examples below:

You can now style your template so it matches your brand colors and such.

Example with a full row and custom HTML

It is also possible to drag and drop a full row into the template and use the HTML below. Don't forget to select the condition for the row like in the example above ("Loop through content" > "Product Recommendations").

<table style="width: 100%; position: relative; text-align: left;">
  <td style="width: 33%; height: 150px; text-align: center; margin: 0 auto; vertical-align: middle;">
    <a href="{{url}}" style="color: #000;text-decoration: none; cursor: pointer;">
      <img src="{{image}}" style="max-height: 100%; width: auto; max-width: 100%;" />
    </a>
    </td>
    <td style="width: 66%; padding: 10px; position: relative; vertical-align: top;">
      <a href="{{url}}" style="color: #000;text-decoration: none; cursor: pointer;">
      <div style="margin-bottom: 10px;">
        <div style="font-weight: bold; font-size: 15px; margin-bottom: 10px; color: #282828;">{{name}}</div>
        <div style="font-size: 11px; color:#282828; margin-bottom: 10px;">Artikelnummer: {{sku}}</div>
      </div>
      {{#ifEqual price special_price}}
      <div style="font-size:13px; color:dtPrimaryColor; font-weight: bold;">€{{#price_format price , . }}</div>
      {{else}}
      <div style="font-size:11px; color:#a0a0a0; text-decoration: line-through;">€{{#price_format price , . }}</div>
      <div style="font-size:13px; color:dtPrimaryColor; font-weight: 700;">€{{#price_format special_price , . }}</div>
      {{/ifEqual}}
      </a>
    </td>
</table>

In some situations the code displayed above does not work properly when displayed in outlook. The image's size will not be properly displayed and your styling will be off. For this reason we always recommend you check the email with an outlook recipient to make sure everything looks fine. If you are however running into these issues, please replace this:

<a href="{{url}}" style="color: #000;text-decoration: none; cursor: pointer;">
      <img src="{{image}}" style="max-height: 100%; width: auto; max-width: 100%;" />
</a>

With this:

<a href="url" style="color: #000;text-decoration: none; cursor: pointer;">
<img src="image" width="200" height="200" style="max-height: 100%; width: auto; max-width: 300px;" />
</a>

This will force the image to be displayed with an absolute size instead of a percentage based one. Outlook will always display this properly.

Extra settings
Under settings, it is possible to set a few more settings, such as a subject, sender email and sender name.

When your touchpoint is finished, you can already publish it. As long as the hybrid campaign is still on draft we won’t send any emails.

At the campaign settings (tab above the flow canvas), you can enter a few more settings for your Hybrid Campaign. You can for example A/B-test it, and know how much of a conversion increase impact the emails have. Another important setting is the frequency cap. By default, users will only go through the flow once. If you want them to go to it more frequently, you can set it to, for example, a maximum of 1 time per week.

Your abandoned cart email flow is now set up! Please contact us to do a final check and we will activate emailing for your project. After this, you can use the button on the top right of the Hybrid Campaign to publish it.

Did this answer your question?