Automated Abandoned Cart

Did you know you can automatically reach out to customers with abandoned carts? Use this guide to get automated abandoned cart messaging up and running today with Airship Journeys.

A few timely reminders can provide effective motivation for your customers in revisiting their carts and checking out. Watch this video for an overview of how an abandoned cart works in Airship using JourneysA series of messages that is initiated by a single automation trigger. Airship sends messages in the series based on your timing settings, and you can also set conditions that determine the continuation of the series. .

Building an Abandoned Cart

To get started, we need to be able to trigger on user behaviors. For abandoned cart messaging, the user will enter the journey when they add an item to the cart, and exit once they purchase. Setting up events to send to Airship can be done in the Android or iOS SDK with the following calls.

Add Retail Events

 Note

If you use a partner integration, or your application is already instrumented with custom events, you may need to adjust the event names for purchased and added_to_cart.

To enter the user into the Journey, instrument the application with an event when an item is added to the cart. Use the following templates to create added_to_cart and purchased events:

Android example
fun onAddToCart(identifier: String, description: String?) {
    RetailEventTemplate.newAddedToCartTemplate()
            .setId(identifier)
            .setDescription(description)
            .createEvent()
            .track()
}

iOS example
func onAddToCart(_ identifier: String, description: String?) {
    let template = RetailEventTemplate.addedToCartTemplate()
    template.identifier = identifier
    template.eventDescription = description
    template.createEvent().track()
}

Next, add an event when the cart is purchased:

Android example
fun onPurchase() {
    RetailEventTemplate.newPurchasedTemplate()
            .createEvent()
            .track()
}

iOS example
func onPurchase() {
    let template = RetailEventTemplate.purchasedTemplate()
    template.createEvent().track()
}

Now that your app is set up to send the necessary events, it’s time to create your journey.

Create the Journey

Click   at the top of your project’s dashboard, then select Journey. Name it Abandoned Cart, then use added_to_cart for the Custom Event trigger, and use purchased event as the Conversion goal.

Next, choose the delivery time for the first message. In this example, the first message will be delivered 1 day after the most recent added_to_cart event has occurred.

Next, we can define the message that will be delivered. In this case, the message is a push notification letting the customer know that they have items remaining in their cart.

Once setup is complete, the journey is ready for testing and can be started. We recommend using the Test Run feature to ensure the messages are built correctly as they are delivered to your test devices.