When creating a workflow in Dynamics CRM you may find that you need to insert a delay between one step and another. There are two main ways to accomplish this: a Wait Condition or a Process Timeout. It is important to understand the difference between the two so that your workflow can fulfill its intended purpose.
Simply put, a Wait Condition is action- or state-dependent while a Process Timeout is date- or time-dependent. An example scenario for each is outlined below.
A Wait Condition tells the workflow to wait until some specific action has occurred, such as a field changing or updating to a specific value. This is useful for situations in which you need to wait for something to be done, rather than wait a specific amount of time. Wait Conditions are great for building workflows that are coordinated with manual processes carried out by users. You can add a Wait Condition to a workflow by selecting Add Step > Wait Condition.
Imagine that you want to create a “Registration Communication” workflow to automate communications with a Contact regarding the status of their registration for a service. You have already created a Form that, when submitted, marks a flag field on the Contact that will trigger the “Registration Communication” workflow. You want the workflow to send an email to the Contact letting them know that their registration request is pending review, and to send an acceptance email once this approval has been manually granted by a user who changes a “Registration Approval” field to “Approved."
You need a Wait Condition to accommodate this manual approval portion of the process, as shown here:
When set up like this, the workflow will begin by sending the “Pending Approval” email to the Contact, wait for the User to change the Contact’s “Registration Approval” field to “Yes” and, once this is done, send the “Registration Approved” email to the Contact.
A Process Timeout tells the workflow to wait for a specific amount of time or until a specific date. The former is essential for building workflows that should space out the execution of certain steps while remaining fully automated, while the latter is needed when a given step has to execute on a certain day or time. You can include a Process Timeout in a workflow by selecting Add Step > Wait Condition, and then adjusting the values as shown here:
Imagine that you are creating a “Registration Confirmation” workflow that, as above, runs when a flag field on a Contact record is updated by a Form submission. You want this workflow to send a confirmation email asking the Contact to review the information they have submitted. In the email, you tell them that they have 48 hours to review the information and respond with any adjustments, after which time the registration information will be locked in. This process does not require any manual review, so a Process Timeout is appropriate here.
The workflow would send the confirmation email to the Contact as soon as the flag field was updated, wait for two days and then send the Contact an email letting them know that their information has been finalized.
The Process Timeout step looks like this:
And the workflow looks like this:
Another option that you have here is to wait until a specific date rather than a set amount of time. For example, if a registrant was able to update their information up through but not after March 20, 2015, the Process Timeout would be set to equal 3/21/2015 12:00 AM.
Which, once saved, will look like this in your workflow:
These are pretty simple examples, but you could use these same principles to create some pretty complex workflows that accommodate for manual processes, variable process start times, scheduled deadlines and start times, and more.
Written by Weston Packard,