Automated Abandoned Cart

An Abandoned Cart campaign targets users who added an item to their cart but did not complete their purchase. A few timely reminders can provide effective motivation for your customers to revisit their carts and check out.

Abandoned Cart messages send when specific user behaviors occur. A developer must set up your app with events for those behaviors, but anyone with access to create messages in the Airship dashboard can get started now.

Setting up events in the app

A developer must set up Custom EventsEvents that indicate that a user performed a predefined action, such as adding an item to a shopping cart, viewing a screen, or clicking an Unsubscribe button. Custom Events can trigger automation, including Sequences and Scenes. You can code them into your app or website, or send them to Airship from an external source using the Custom Event API. Custom Events contain properties that you can use to personalize messages. in your app or website so they can be used for automation:

Event NameDescription
added_to_cartAn item is added to the cart
purchasedA user makes a purchase
empty_cartThe last or only item is removed from the cart

Setting up events to send to Airship can be done in the iOS, Android, and Web SDKs with the following calls. Use the below templates to create the events. See also Custom Event Templates.

 Note

If you use an integration or your application is already instrumented with Custom Events, you may need to adjust the event names for purchased and added_to_cart.

Add an event for when a item is added to cart:

Added-to-cart event

RetailEventTemplate.newAddedToCartTemplate().createEvent().track();
let retailTemplate = UARetailEventTemplate.addedToCart()
let retailEvent = retailTemplate.createEvent()
retailEvent.track()
new sdk.CustomEvent.templates.retail.AddedToCartEvent().track()

Add an event for when the cart is purchased:

Purchased event

RetailEventTemplate.newPurchasedTemplate().createEvent().track();
let retailTemplate = UARetailEventTemplate.purchased()
let retailEvent = retailTemplate.createEvent()
retailEvent.track()
new sdk.CustomEvent.templates.retail.PurchasedEvent().track()

And an event for when the last or only item is removed from a cart:

Empty cart event

CustomEvent.newBuilder("empty_cart")
        .build()
        .track()
let event = CustomEvent(name: "empty_cart")
event.track()
var event = new sdk.CustomEvent("empty_cart")
event.track()

Setting up the automation

You will create a SequenceA series of messages that is initiated by a trigger. Airship sends messages in the series based on your timing settings, and you can also set conditions that determine its audience and continuation. Sequences can be connected to each other and to other messaging components to create continuous user experiences in a Journey. that contains your message and settings for each event. You can set up a Sequence now, even if the events don’t yet exist in your app. Once the app is ready, make the Sequence active. In fact, you can enter whatever events you’d like, but be sure to edit the Sequence for the correct events before making it active.

If you’re creating the Sequence as a test and don’t intend to make it active, you may want to include “Do not start” or similar in the Sequence name as a notice to your team members.

You will configure these Sequence components:

ComponentAssociated EventDescription
Triggeradded_to_cartUsers enter the Sequence when this event occurs.
Messagen/aAirship sends the message to users who enter the Sequence.
Conversion eventpurchasedUsers exit the Sequence when this event occurs. This prevents sending the Abandoned Cart message to a user if they make a purchase.
Cancellation eventempty_cartUsers exit the Sequence when this event occurs. This prevents sending the Abandoned Cart message to a user if they no longer have any items in their cart.
 Tip

Conversion and cancellation events have the same effect on a Sequence. The different classifications are for reporting and mapping.

New Sequence

To get started, create a new Sequence and give it a name:

  1. Select the add icon () in the project header and select Sequence, then select Start from scratch.
  2. Name the Sequence “Abandoned Cart”.
  3. Select Continue.

You will now be in the Journey MapA visualization of messaging components that can be connected to create a continuous user experience. You can also create and edit from the map., where will you configure the three events.

Trigger

Configure the event that will cause users to enter the Sequence:

  1. Select the trigger card in the Journey map, then select the edit icon ().
  2. Select Custom Event.
  3. Enter “added_to_cart”.
  4. Select Save.

Conversion event

Configure the event that will cause users to exit the Sequence when they purchase an item:

  1. Select the Sequence card in the Journey map, then select the add icon () to its right.
  2. Select Conversion Event, then Custom Event.
  3. Enter “purchased”.
  4. Select Save.

Cancellation event

Configure the event that will cause users to exit the Sequence if they no longer have anything in their carts to purchase:

  1. Select the Sequence card in the Journey map, then select the add icon () to its right.
  2. Select Cancellation Event, then Custom Event.
  3. Enter “empty_cart”.
  4. Select Save.

Your message

While it’s possible to set up multiple messages in a Sequence, our example is for a single message. See Create a Sequence for full documentation.


First, set the Message Delay — the time Airship should wait after receiving the triggering event before sending your message. For our example, set it to send one day after the most recent added_to_cart event has occurred:

  1. Select the Sequence card in the Journey map, then select the edit icon (). You will now be in the Sequence ManagerA preview of the messages in a Sequence, with options for editing and testing, and for running experiments..
  2. Select the arrow icon () next to Conditions to close that page section.
  3. Under Message Delay, select the default value 1 hour and change it to one day.
  4. Select Save.


Now you can select the audience and define the message to send:

  1. Select Add message content.
  2. Select the Originating ChannelA channel coordination strategy that targets a Named User on the channel that triggered the Sequence. strategy and the channel you set up your Abandoned Cart events for.
  3. Select Save and continue.
  4. Select Push Notification, then Add Content.
  5. In the Text field, enter a message that tells the customer that they have items remaining in their cart.
  6. Select Review in the header. At this point we recommend verifying what your message will look like on an actual device:

    1. Select Send Test.
    2. Enter at least one Named UserA customer-provided identifier used for mapping multiple devices and channels to a specific individual. or Test GroupA preview group is audience group used for previewing personalized content in the dashboard. Wherever a personalization preview is available, you can select a preview group, and its group members’ attributes will appear for any Handlebars references to attributes. You can enable any preview group as a test group so you can send test messages to its group members. These messages appear as tests in Messages Overview. and select from the results.
    3. Select Send.

    The push should appear on test user devices momentarily.

  7. Select Save and continue, and you’ll be back in the Manage screen.

After you confirm the Sequence is working as expected and events are sending for your customers, select Start on the Manage screen to make it available to your audience.

Next steps

Take your messaging further: