After you edit the content of an action, you can control the delivery settings for that action using Sub-Delivery. This allows the actions in your campaign to run seamlessly from start to finish.


When you set your Sub-Delivery, you'll choose a delivery event, delay time, or a display when event. Each action can be delivered using some Delay since the previous action, and some actions can be sent with Immediate delivery.


First, select Delay VS. Immediate, then set the delivery and display events.


Your Sub-Delivery options will change depending on the type of action you are sending and the type of action immediately before it. For example, you can't send an in-app message immediately after the user opens an email, because the user opens an email outside of your app. You could, however, send an in-app message the next time a user opens the app after the email was opened.


Delayed Sub-Delivery allows you to wait a set amount of time before delivering an action.

  • In-app actions, such as in-app messages or variables, will display on the user's next session after the delay runs out.
  • Externally sent actions (e.g. push notifications or emails) will send as soon as the delay runs out.

The Deliver section is where you set the delay time. For example, you could set an action's delivery to "Deliver 2 days exact time after user triggers this campaign."

For a refresher on delivery options, see Delivery.


Optimal time delays

If your delay is set to a certain number of days, you can use Optimal Time delivery. For example, you could wait 2 days then send a push notification at a user's optimal delivery time, which is calculated based on average usage data for each user. See these tips for more info on optimal time.


This delay period will begins after the delivery event you select or after Campaign start (for the first action). Note that Delay is the only Sub-delivery option after campaign start.

Delay based on trigger event parameter or user attribute

Apart from delaying an action for a specific time after campaign start or relative to the previous action, you can also delay it based on a time-based parameter of the event which triggered the campaign or a user attribute. A common use case for this is for travel apps sending an action 24 hours before a user’s flight departs.

To use this feature, you must send a timestamp as a parameter value for the trigger event or state, or as a user attribute. The timestamp should be in unix format. This is only supported with triggered campaigns.

This can be configured on any top-level action in your campaign. In the Delivery section, choose the option that best fits your case:

  • After time parameter
  • After user time attribute
  • Before time parameter
  • Before time user attribute

Delay based on trigger event parameter or user attribute

After choosing the option, you will need to enter the name of the time parameter or user attribute on which the delay is based on.


Enter the time parameter name


Immediate Sub-Delivery will deliver your event immediately after the selected event. Immediate Sub-Delivery is possible when the previous action in the campaign brings or keeps the user inside your app.


Only in-app actions have the option for immediate Sub-Delivery. In-app actions include in-app messages, app inbox messages, variable changes, and app functions.

For example, you can trigger an in-app message immediately after a user taps a push notification, because the user will already be in your app once they tap the push.

Action delivery event

This setting determines which event will trigger the action's delivery. Click the dropdown to select which event will trigger the current action's delivery. If your campaign has only one action, this delivery event will be "Campaign Start" by default.

  • For Delayed actions, Action delivery determines which event should start the delay period before delivering the current action.
  • For Immediate delivery, Action delivery determines what event will trigger the current action (without delay).


The delivery event options in the dropdown will change depending on the type of action before the current one. For a list of all the Action delivery events available for each action type, see Action-Delivery events.

For Delayed actions, the Delay section sets the amount of time the action is delayed after the delivery event. For example, You could set an action's delivery to "Delay 1 day after previous Push Notification is opened."

Display (In-app actions only)

For in-app actions, you must decide what trigger should cause your in-app message to display.


If no display when event is set, you will be notified with an alert on the summary page.

For delayed Sub-Delivery, Leanplum will wait the amount of time you set for the delay, then deliver the in-app action on the selected Display trigger. This trigger can be on the next app start, when the user triggers one of your custom events, and more. See the full list of "display when" triggers above.

You can also trigger the message based on custom events with certain parameter values. Choose "User triggers event with parameter" from the Display dropdown.



Default Sub-Delivery settings in multi-message campaigns

In One-time and Recurring campaigns, the Sub-Delivery of the first action will always be set to 0 seconds delay, so that it sends right when the campaign starts. Any following actions are usually set to a delay of one day by default.

For Triggered campaigns (and all actions below the top action), the Sub-Delivery is set to 1 day Delay by default. You should always check your Sub-Delivery settings to make sure your actions are sent at the right time.