WonderPush Documentation

The WonderPush Developer Hub

Welcome to the WonderPush developer hub. You'll find comprehensive guides and documentation to help you start working with WonderPush as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Cart reminder

Re-engage customers that left your site without buying the contents of their shopping cart.

Not familiar with segment-based automation? Read our documentation on the subject

Setting up a cart reminder with WonderPush requires the following:

Updating properties

In this step, we make sure to keep a string_cartProductName property up-to-date with the name of one of the user's cart items, or null when their cart is empty.

// Adapt this line to get the name of a product from the user's cart.
// When the cart is empty, set nil as the value of productName
let productName = nil
WonderPush.putProperties(["string_cartProductName": productName])
// Adapt this line to get the name of a product from the user's cart.
// When the cart is empty, set [NSNull null] as the value of productName
NSString *productName = [NSNull null];
[WonderPush putProperties:@{@"string_cartProductName": productName}];
// include this snippet on every page of your website, including the "Thank you" page users get after purchase

WonderPush.push(function() {
  // Adapt this line to get the name of a product from the user's cart.
  // When the cart is empty, set null as the value of productName
  var productName = null;
  
  WonderPush.putProperties({string_cartProductName: productName});
});
// Adapt this line to get the name of a product from the user's cart.
// When the cart is empty, set null as the value of productName
String productName = null;
JSONObject properties = new JSONObject();
properties.put("string_cartProductName", productName);
WonderPush.putProperties(properties);

Make sure the above code gets called every time the shopping cart is updated, including when the user finalizes his purchase. This will maintain a string_cartProductName property we'll use below to setup an automated notification.

Setting up the notification

Go to your online dashboard and create a behavior-based push notification trigger.

In the compose tab enter any information you like. For this example, we used a Simple format and setup a simple text reading “Your shopping cart is about to expire”. We'll personalize this message later to give it more impact.

In the target tab of the push notification edition interface, select Send only to users within the segment... and enter the following criteria:

  • Installation property (string) has any value in field string_cartProductName,
  • Presence – User is absent since more than 30 minutes.

These targeting criteria ensure that users leaving your site with a non-null string_cartProductName property receive your notification after 30-minutes of absence. You can customize this delay to your needs.

Save your notification, your cart reminder is now functional, test it!

Personalizing the notification message

To have more impact, we'd like the re-engagement message to read:

Your cart is about to expire!
30 minutes left to buy NAME OF PRODUCT GOES HERE.

What we're trying to achieve is to make the message more personal by including the name of the product left in the user's cart. To do this, we'll use personalized content with some Liquid syntax.

Go to the notification interface compose tab and enter the following in the Title field:

Your cart is about to expire!

In the Text field, enter:

30 minutes left to buy {{ installation.custom.string_cartProductName }}.

Notice the {{ installation.custom.string_cartProductName }} liquid tag that get substituted with the contents of the string_cartProductName property when the notification is sent.

That's it!

Cart reminder


Re-engage customers that left your site without buying the contents of their shopping cart.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.