The Wait action delays the next action or condition in a workflow until a set amount of time passes. When the workflow reaches the Wait action, all the following steps in the workflow are delayed until the wait period expires.
Changing an active workflow that uses the Wait action might have unexpected results. Before you make changes to a workflow using this action, determine whether you have active runs of the workflow in waiting status by referring to the Activity page. If a workflow with the Wait action has triggered and has active runs in waiting status, then the following occurs:
- If you edit the workflow to change conditions or actions after the wait period, then when the active run resumes it uses the updated version of the workflow instead of the original version.
- If you deactivate or delete the workflow, then active runs in waiting status are stopped. The workflow is marked as cancelled.
If a workflow contains a Get, Sum, or Count action before a Wait step, then the returned data is not available after the Wait step. To get access to that data, add an additional step of the same type after the Wait step.
After a wait period is over, data related to the workflow is refreshed. Information that is retrieved from your store is updated to be accurate at the time that the wait period ends. If information retrieved from your store changes during the wait period, then the new information is used when the workflow resumes, not the information that was retrieved when the trigger first started the workflow.
For example, you have a workflow that starts when an order is created. The workflow checks the total amount that the customer has spent in your store and adds a customer tag if the total is equal to or above 750 USD. However, you decide to add a Wait action between the trigger and the condition and specify a delay of 7 days.
A customer with a total spend amount of 700 USD places an order for 100 USD. The workflow is triggered and the new order brings their total spend amount to 800 USD. The total spend amount isn't checked until the wait period is over. The next day, the customer cancels the order and receives a refund. After the wait period is over, information is retrieved from your store. The customer's total spend amount is now 700 USD and the customer tag isn't applied.
The Wait action contains the following fields.
|How long to wait||The amount of time to delay before the workflow proceeds to the next step. By default, the delay is set to 0 seconds. To set the time delay, do the following:
The Wait action can be used in any workflow.
In this example workflow, the wait action is used to delay the remaining actions and conditions in the workflow until 1 day passes. After 1 day, if the order has not been fulfilled, an email is sent.