Performing Rule Actions with a Delay in Drip
Use rule actions to delay actions until specific dates
Delayed Rule Actions in DripWhen configuring rules in Drip, some actions are able to be configured with a delay before being performed.
The rule actions that can be performed with a delay are:
- Move from one campaign to another
- Remove from a campaign
- Remove from a workflow
- Restart a campaign
- Send a campaign
- Send a one-off email
- Start a workflow
- Unsubscribe a subscriber
When you choose one of these actions in a rule, an option for configuring a delay appears at the bottom of the action configuration.
There are three options for when the action can be performed:
Perform this action immediately (the default)
No extra delay is introduced, the action is performed immediately.
Perform this action after a delay
This option allows you to specify a fixed amount of time to delay the action by after the rule is triggered. You can specify the delay time in minutes, hours, or days.
Perform this action based on a property of the trigger event
This option allows you to specify a specific date and time when the action should be performed. You specify the date using liquid and can reference properties of the event that triggered the rule.
The first 2 options, perform immediately and perform this action after a delay, are pretty straight forward. The option to perform the action based on a property of the trigger event is powerful because of the ability to use liquid.
Performing an action at a specific date and time.
To perform an action at a specific date and time, you can specify the date and time in Liquid in the 'Perform at:' field.
For example, to perform an action on 2017-09-18 at 15:35, you would use this Liquid tag:
An important note about timezones.
If there is no time zone specified in the date, it is assumed that the date/time is in GMT. In the above example of 2017-09-18 15:35, it may not run at 15:35 (or even on 2017-09-18) if you are not in the GMT timezone.
To specify the timezone for a date, you can apply the Liquid at_time_zone field like this:
This will make sure that it runs at 15:35 on 2017-09-18 in the specified time zone.
If you need to make adjustments to a perform at date, you should convert the date to a timestamp, add or subtract time, and then convert it back into a date format.
For example, the Liquid statement below adds 15 minutes to 2017-09-18 15:35
Using event properties
In addition to specifying a fixed date in Liquid, you can also reference properties of the triggering event. This can be really handy for having delays that might be conditional or dynamic.
Let's say that the rule is triggered based on a custom event named "Start Delayed Workflow" and in that event there is a date stored in the delay field. To use the delay date you would use the Liquid statement:
You could also use event.delay and perform other modifications via Liquid like adding a fixed amount time to the delay date.
How to use the "Perform this action based on a property of the trigger event" delay option
Since not all available Drip actions can be performed with a delay in a rule, you may need to configure the actions in a workflow and trigger a workflow with a delay from the rule.
The options for waiting until a specific date/time in a workflow are limited. Triggering a rule with an action configured to use a variable delay can provide you with that ability. You could either kick off a seperate workflow with additional actions, or if you have the subscriber exit the workflow immediately after triggering the rule, you could use a decision to re-enter the same workflow and resume at a different point based on a decision.