When creating a push notification with a triggered delivery type and an event or state trigger, you must decide the length of time you want to delay the push after the trigger occurs. One option is to delay the push on a specific timestamp sent as a parameter or a user attribute. A common use case for this functionality is for travel apps, to send a push notification 24 hours before a user’s flight departs.
To use this feature, you must send the timestamp as a parameter value for the trigger event or state, or as a user attribute. The timestamp should be in unix format.
Note: For event/state parameters, you can also use an ISO-8601 timestamp to trigger the message (for example, “2016-05-23T23:56:21Z” is May 23rd, 2016 at 23:56:21 UTC), but parameters in ISO format will not be searchable in the Users or Analytics tab. For this reason, we recommend using a unix timestamp when possible. (Unix is still required for user attribute values.)
To base a push notification delay off of a timestamp, do the following:
- Configure a push notification message with a Triggered delivery type
- Set the trigger event
- Set what you would like the delay to be. For the example of sending a push 24 hours before a flight departs, you would set a delay of 1 days.
- Set the time format to exact time
- Click on the after trigger drop-down menu and select before time parameter
- Click the text field to the right of before time parameter and select the appropriate parameter name
If you wanted to set a delay after a time parameter, you would select after time parameter in step 5. To utilize user attributes instead, you would select either before time user attribute or after time user attribute in step 5.