Did you know that you can add a wait condition to a workflow? This can be particularly helpful if the workflow is complex. Sometimes the system can get ahead of itself and cause workflows to fail if too many actions are being performed too quickly.
In this example, we will create a workflow for the following scenario:
Email a member if they have an Active Order after 30 days.
1. Start the workflow as normal
Name the workflow, select the entity, Scope, how it will run (automated, on demand) and trigger. For more information on setting up workflows, see Workflows - Basic Setup.
2. Add a check condition
- Click Add Step and select Check Condition
In this example, we will check for Active Orders.
3. Add the wait condition
- Click Add Step and select Wait Condition.
We want to send an email to members who have Orders that are older than 30 days. Adding the Wait Condition will tell the system to pause until a certain amount of time has passed.
- Click the "<condition>" link to configure the action.
A new window will open.
- For the first value, choose "Process" under Local Value (at the bottom of the dropdown)
- Choose Timeout as the second value
- Set Duration, Before, or After and the amount of time using the Form Assistant
What's the difference between Duration, Before, and After?
- Duration: a set amount of time for the workflow to pause (ex: 30 days, 2 hours, 10 minutes)
- Before and After: based on a field. (ex: 10 days after x field is modified)
For this example, we will use a Duration of 30 days.
4. Add the next step
Note: Adding the next step inside the Wait Condition (image 1) can lead to issues if you ever need to change the time to elapse. Instead, highlight the entire block (image 2) before adding the next step.