Smart Delivery

Delivery notifications at the perfect moment

Our Smart Notification Delivery system allows timing the delivery of your notification based on realtime device conditions.

Examples

Here are some examples of how Smart Delivery can improve your notification click through rate:

  • Wait until the the device is being held (not flat on a table), before showing a notification, to increase visibility

  • Hold off on notifications if the user's battery is low or they are on low data mode

  • Wait until the evening and the user is connected to WiFi for sending an re-engagment notification for a game

Important: be sure to setup the background processing as described in our Quick Start guide, or smart notifications can't detect the ideal moment to deliver.

Example Config

This object would be added to a notification object, to create a smart notification.

"idealDeliveryConditions": {
    "condition": "device_orientation != 'face_up' && device_orientation != 'face_down'",
    "maxWaitTimeSeconds": 8640000
}

Spec

Start by setting up up a notification in your config, as described in the notification spec. Once the standard notification is setup, add a idealDeliveryConditions json object to the notification config. It contains the following properties:

  • idealDeliveryConditions.condition: an ideal delivery condition in the form of a conditional statement, defining the ideal conditions you'd like the notification delivered under. For example device_orientation != 'face_up' && device_orientation != 'face_down'

  • idealDeliveryConditions.maxWaitTimeSeconds : defines how long you're willing to wait for ideal conditions, before giving up and delivering anyways. An integer number of seconds, or -1 for forever.

The notification will still wait until at least the appropriate deliveryTime as defined in your notification. However, it will also check the ideal delivery condition. If the condition isn't met, it will keep checking until it's met or maxWaitTimeSeconds has elapsed to delivery the notification.

Understanding iOS Background Processing

Your app will occasionally get short periods of background runtime, and Critical Moments will use those times to check if any notifications meet their ideal delivery conditions.

However, the times when your app is run are controlled by Apple and are not deterministic. Don't expect a notification for the condition device_battery_state == 'charging' to fire the moment you plug in your phone. Factors like low battery and app-usage-frequency can impact how often Apple gives each app runtime.

We suggest using a reasonable maxWaitTimeSeconds as a fallback, to ensure your messages are still delivered after a fallback amount of time.

Last updated