Abandoned Shopping Carts

When a user places items in their shopping cart but does not complete an order, you can automatically send a reminder email.

There are two ways to configure abandoned cart messages.

  1. Use Lifecycle Optimizer and the Purchase API or JavaScript API Library
    • Create a flow with the Entry type Abandoned Cart.
    • This feature requires that your company has configured your site to sync cart data with Sailthru, enabled the Sailthru JavaScript on your site, and configured a template that can display the cart contents.
    • This method is recommended because:
      • It takes into account the user’s browse activity, identifying inactivity based on a lack of pageviews for the industry-standard 30 minutes. You can then add any custom wait time in LO before messaging the user.
      • It is easy for a marketer to use the LO interface to change the wait time, template, and other logic, at any time.
    • For complete information, see Automate Abandoned Cart Reminders in the Lifecycle Optimizer section.
  2. Use the Purchase API or JavaScript API Library Exclusively
    • When you sync cart data with Sailthru using either the JS API Library or server-side Purchase API calls, you’ll also include a defined:
      • reminder_time – the time to wait after the last cart addition before sending a reminder message. This time is reset upon each additional cart addition.
      • reminder_template – the template to send to the user, reminding them of their cart items).


  • Sync Cart Data – To learn how to configure the necessary cart-data sync for either of the above methods, see the Purchase API page or Sailthru JavaScript API page. The only difference in the data sent for the two methods above is that with Lifecycle Optimizer (Method 1) your call will not contain a reminder_time and reminder_template. However, for both methods, you will send the user’s full array of cart data each time the user adds or removes a cart item and when they complete the final checkout.
  • Set Up a Template – In order to show cart activity in your reminder emails, you will need to create a dedicated Abandoned Cart template.
  • If using Lifecycle Optimizer, create an Abandoned Cart flow.

Display Cart Activity In Email

You can use Zephyr to display the user’s abandoned cart contents which, if it exists, is stored on the user profile. You can include this in Abandoned Cart emails and also in other messaging.

  • The entire incomplete purchase array is always accessible using {profile.purchase_incomplete}.
  • For example, you could put a block like this at the top of your campaign email that includes items remaining in the user’s shopping cart:
    {if profile.purchase_incomplete} 
    <p>The following is currently in your cart:</p> 
       {foreach profile.purchase_incomplete.items as i} 
             {i.qty} {i.title} ${number(i.price/100,2)}<br/> 
    <a>Complete Checkout</a> 

    Only those users who have abandoned carts will get that special block of content.
    If you wish to include an image of the product, you would have to include image URLs in the “vars” parameter when users add items to their cart. See the Purchase API for further information.
    You can then surface the image content in the template code:

    <p>{foreach profile.purchase_incomplete.items as i}
    <img src="{i.vars.image_url}" />{i.qty} {i.title} ${number(i.price/100,2)}
    {/foreach} </p>

Clear Incomplete Purchases from a User Profile

Should you need to clear a user’s incomplete purchase data from their profile–for example, when the user removes all items from their cart without making a purchase–simply pass another incomplete purchase API call with an empty array of items.

For example:

{"email":"example@domain.com","items":[],"incomplete": 1}