Create a Deal Based abandoned cart email + workflow + module

Using custom modules is a great way to leverage the data that comes into your HubSpot through our Unific Sync product. Show the right products in each email to your customers.

Abandoned carts are an e-commerce merchants daily challenge. HubSpot helps you face it through automating the emails a client would receive once they abandon a cart, but even a tool as strong as HubSpot, can be improved.

 

The Unific Data Sync Product gets your abandoned cart data into HubSpot

The first step to doing so, is our Unific Sync product, which includes over 140 properties synced to both contact and deal record, over 10% of which are details of a customers’ abandoned carts. The most important properties to know:

We save line items in the deal record and up to 3 product URL’s in the contacts in order to have a way to dynamically show them in each email sent.

In this article we will walk through creating the workflow and the custom modules needed for it to work. 

 

*Default HubSpot modules will not work for any third-party app.

 

Choosing your type of workflow

The first step in creating a workflow is going to your Automation tab on the top toolbar in your HubSpot portal. Depending on your HubSpot plan some features may be limited.

There are two types of workflows that you can use for abandoned carts, each with its own advantages and disadvantages.

Contact based workflow


To create a contact-based workflow and email, please refer to this article.

Advantages

  • Prevents double enrollment for contacts with more than one deal that is abandoned
  • Allows you to set up and track goals, measuring conversions and success inside each workflow
  • Used and relies on tools that are not beta products

Disadvantages

  • Is triggered after deal creation, when a contact property is updated in the backend
  • Revenue cannot be specifically attributed to each deal
  • Only allows up to 3 abandoned products to show in each email sent

Deal based workflow

Advantages

  • Allows concurrent enrollment of more than one abandoned cart deal
  • Is triggered by deal creation, and deal stage ABANDONED being reached.
  • Revenue is attributed to each deal through attribution reporting outside the workflow (reports must be created manually)

Disadvantages

  • Does not allow for goals to be set up and measured inside the workflow, only un-enrollment triggers
  • Display of line items when there are variants and currencies can be limited
  • Depends on a beta feature

How to create a deal-based email + workflow.

In order to have emails that show the desired products, the first step will be to create our custom code module. To do so, please follow these steps:

  1. Open the Marketing tab
  2. Go to Files and Templates
  3. Choose Design tools

Screen1

 

4.    On the left-hand panel, chose NEW + FILE

 

Screen2

 

5.   Chose module and give it a name, we recommend:

ABANDONED CART – DEAL BASED – UNIFIC

Screen3

Screen Shot 2023-01-17 at 8.59.20 PM

 

6.   Paste the following code in it

--


"<!-- The CSS below goes into the style tag inside the HTML template in HubSpot (make sure that the style tag has an id of "hs-inline-css" as shown below) -->

<style type="text/css" id="hs-inline-css">

div.unific-module.order-items table.items-unific{
  width:100%;
  font-weight:400;
  color:#666566;
  font-size:20px;
  line-height:30px;
}

div.unific-module.order-items table.items-unific tbody tr td.item-product-image{
  padding:0 10px 0 0;
}
div.unific-module.order-items table.items-unific tbody tr td.item-product-image img{
  width: 130px;
}
div.unific-module.order-items table.items-unific tbody tr td.item-product-name{

}
div.unific-module.order-items table.items-unific tbody tr td.item-product-name span.item-variant-name{
  display:block;
  font-weight:100;
  font-style:normal;
}
div.unific-module.order-items table.items-unific tbody tr td.item-cost{
  text-align:right;
  font-weight:500;
  padding: 10px;
}
</style>


 


<div class='unific-module order-items'>
  <table class='items-unific'>
    <tbody>
      
      
      

     


      
      
    </tbody>
  </table>
</div>"

--

 

7.  On the right-hand panel chose PUBLISH CHANGES before publishing it make sure the email beta feature on the right panel is turned on. 

Screen Shot 2023-01-17 at 7.55.31 PM

Screen Shot 2023-01-17 at 7.55.48 PM

 

Creating your email to be sent out

The next step is to create the emails that your clients will receive upon abandoning a cart, this is where we will include the module.

  1. Open the Marketing tab and go to emails

    Screen6

2.   Create a new automated email in the drag-and-drop editor

 

Screen7


3.   On the left-hand side panel, choose the MORE option

 

Screen8


4.   Find the new module we created and drag it into your email template

Screen9

*When you drag it will look empty inside the email, that is normal behavior for this type of module. This is why to try it you must to go preview.

 

5.   To test it you must use the SEND TEST EMAIL feature, the preview might not work.

Screen12-1

 

*Make sure you use a contact that has a current abandoned cart, otherwise it will be empty.

 

Best Practice Recommendations

For best practices, we recommend creating 3 to 5 follow-up emails in an abandoned cart sequence over the spread of 10 to 30 days. This can depend on your type of product and the average time to purchase. The goal is to increase the chances of an abandoned cart becoming an order.

Fun fact: we have seen conversions all the way up to the fifth email.

 

Creating the workflow to automate email send out

Once you have written your emails and included the module in all of them, make sure they are published.

Now it's time to continue with our workflow creation.

  1. Open the Automation tab

    Screen11-1
  2. Create a new contact workflow from scratch

Screen Shot 2023-01-17 at 9.04.58 PM

 

3.   Set the basic triggers in the following way:

Screen Shot 2023-01-17 at 9.05.49 PM

The only trigger is the deals being in an Abandoned Cart stage in the Commerce Pipeline. 

 

4.  Set an if and then statement based on segmenting practices

Screen Shot 2023-01-17 at 9.07.24 PM

If you have segments built through lists, this is where you can define how will you approach each customer differently. Our general recommendation is to provide a discount from the very first email to newer clients but not for recurring ones.

 

Properties like AVERAGE ORDER AMOUNT, NUMBER OF PURCHASES can help you segment if you don’t already have lists defined.

 

Our Dynamic Segments product was created to do this for you, creating a property called UNIFIC DYNAMIC SEGMENTS that will read: New Customer, Promising, Big Spender, Loyalist or Champion. This is what you can see in our screenshot.

 

Screen Shot 2023-01-17 at 8.42.06 PM

 

*Dynamic segments is a separate product not included in the subscription for the UNIFIC SYNC product. 

 

5.   Include the emails and set delays between them. This can depend on the type of product, but setting at least 2 to 3 days between them is standard practice.

Screen Shot 2023-01-17 at 8.45.30 PM

6.   Now it’s time to set an unenrollment criteria, as deal based workflow don't allow goal setting. On the top, go to settings and choose UNENROLLMENT AND SUPPRESSION. In this instance the unenrollment criteria is the deal being part of any new stage. 

 

 

Screen Shot 2023-01-17 at 9.09.03 PM

 

7.  Turn it on and chose if you want deals from before to be enrolled as well or if you only want it working from the moment you turn it on, into the future.

 

Screen Shot 2023-01-17 at 8.49.05 PM

 

That is it! You have built a custom module, an email and a workflow to send out abandoned cart reminders. 

Trying to achieve at least 10% in recovery can be great for your revenue, specially considering abandoned carts are usually money left on the table that is nor particularly hard to recover once you have a strategy and the tools to automate, measure and optimize. 

 

Contact Based Workflow for Abandoned Carts

To create a contact-based workflow and email, please refer to this article.