Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Time and Condition Based Workflows in CRM 2011

Post Author: Joe D365 |

Workflows and dialogues in Dynamics CRM are great technologies that support and automate business processes. In this post, we'll focus on how to create time and condition-based workflows in CRM 2011.

There are times when we need to send reminder emails to our employees or clients in order to get things done. For example, in your IT department, you may have a policy that requires support staff to follow up with clients within three days of them opening a case with you. If a follow up is not initiated (status of case is not changed), you send a reminder email to the owner of the case. Similarly, if the estimated close date on an opportunity is reached, a reminder email may need to be sent to the salesperson. We know that workflows can be created that can send out automated reminder emails to people. But how do we make them wait for a certain number of days?

We make them wait by using “Timeout” in the workflow.

Note: “Timeout” is a substep within the “Wait” Step.

workflows in CRM 2011: timeout substep

Save and Close, and add a step to send an email after the timeout:

workflows in Dynamics CRM: send an email after timeout

And that’s it! Now, the workflow would send an email right after two days of the “Created On” date on the Case record.

Other times our workflows in CRM 2011 have to wait for certain conditions in order to proceed with the next set of actions. For example, let’s say your company has an account manager who handles accounts that have more than 50 employees. In this case, whenever the “No. of Employees” field for a certain Account record is updated to more than 50, the Account would automatically be assigned to that account manager. In this scenario, you would use the “Wait” condition.

workflows in CRM 2011: wait condition

So, essentially, you would want to use “Wait” when a value on your record needs to change for further steps to take place, and “Wait->Timeout”  when a step needs to trigger after a certain time frame.

That's your quick guide to creating time and condition-based workflows in CRM 2011! Here are some additional posts on workflows that you might be interested in:

Happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

36 comments on “Time and Condition Based Workflows in CRM 2011”

  1. Want a workflow which should be triggered after the user finished 48 WORKING hours since the lead is assigned to him. ASAP. Please help.

    1. Hi Rags - This can be done by having a workflow that runs either on create OR on assign of a lead. It will depend on your process. If a lead is created, then someone assigns the lead, have your workflow run on 'assign' then simply timeout for 48 hours. Now wiht crm out of the box we can not determine working hours. If you are on prem you can download and use this workflow extension that will allow you to calculate 'business days'. If you are in crm online you will need to wait until the dec update to have custom workflows OR write custom code in a 'plugin'. If you are interested in a plugin right now, please contact us.
      Here's the codeplex workflow extension that currently works in crm 2011 on prem and in Dec will work online too.
      http://manipulationlibrary.codeplex.com/

  2. want to timeout for 1 minute after the lead is created so i can be sure that ClickDimension fills all data in. my workflow triggers on create BUT it fails because some data are still missing to be set on my lead form.

    1. Hi Nodan - is your timeout workflow failing or the other part that does NOT find the appropriate data? Timeout are tipicaly very reliable.

      1. its my timeout that goes crazy. i have made it so it waits for 2 minutes after the last change has been done to the form. but when i test it out the workflow is set to wait til year 9999

        1. Hi Nadan - if you are using crm on premises, make sure you are in one of the later update rollups. I have not seen the timeout condition fail like this before. If you are using crm on online, open a ticket with MIcrosoft as something appears to not be right....

  3. How can i rate an opportunity on the basis of the no. of days left for the closure. eg in case the Estimated Closure Date lies between next 30 days the rating should be Hot.

    1. Hi Mandy,
      One option is to have a workflow that runs on create of the opportunity. then have this workflow set the rating based on closure date, wait 1 day, and re-run itself. So basicaly you have a workflow that re-runs on the opportunity every day to set the rating, then quits when the opp is lost or won.

  4. I'm trying to build a workflow with several timeouts. For instance, when a contract is 3 months before its end date send email A. When it is 3 months after its expiry date send email B. I set it up that way but it send all emails at once and basically ignores the dates.
    Any suggestions or tricks for this? Do I have to organize the workflow steps in a certain order?

    1. Hi Jade - For this instance it may be easier to separate each intem into its own workflow. So workflow 1 timeout until 3 months before xxx send email. workflow 2, timeout until 3 months after yyy send email. etc.

  5. I am creating a workflow where an email should be sent 60 days before the contract end date and then 3 days before the contract end date. The System Job shows the workflow status as 'Waiting' continuously. That means if a contract will expire after one year from now, the workflow will remain in 'Waiting' state for the entire year and will be changed to 'Succeeded' only when the condition is met. Could you please advise how to create this process so that it does not remain in waiting state for so long? Is there some way that workflow wakes up only once a day to check the condition?
    We are using CRM Online and I am new to workflows. Thanks in advance.

  6. HI I have a question. I want to wait until a certain date that is determined by a field is reached and then send an email. This filed can be changed by users though (its basically a resolve case by this date field). I want to automatically send an email notifying the owner of the case that they need to resolve the case.

    My question is this: If I use timeout to wait until that date, and if a user then goes and modifies the date, will the workflow wait until the original date or will it wait until the new date? (the second is what I require).

    1. Hi Udara - correct. If a user modifies a date, the workflow will adjust automatically and the timeout is now based on that new date and NOT the original one.

  7. Is there a way to report on how many cases have been resolved in X days? I can't figure out how to build this kind of report in Advanced Find. It depends where the 'timer' is located - I have to know that to know which category to begin with in my search. Is it workflow, is it audit history? etc

    1. Hi Jenna. yep - we do this here at PowerObjects. The easiest way is to store the 'resolved on' date/time. Do this on a new custom field. Then you can do an advanced find to show all tickets resolved in last X days.

      1. Hi Jeo, I have a workflow which timeout after a Record modified on and then update the Status in the fields. Currently it is not updating the fields. Any idea why?
        Regards, Vinod

        1. Sorry Record modified on After 1 min. Just for testing purposes I used 1 min.

          1. Hi - First step would be to check the workflow logs to see if the workflow is running at all. And if it is running, is it erroring out? Also - check the scope of the workflow. Is it user or organization ?

          2. All the steps within the workflow passed and also it is Organization Scope. What I think it is going on a Loop even after the workflow is succeeded. I am attaching screenshot for you reference.

          3. Hi - Turn on auditing and check the audit log. Could something be overriding what the workflow updates ? We have found the audit log sometimes a great way to find why a record is being modified or is not being modified as we expected.

  8. Thanks for Sharing this extremely helpful post!! This is exactly what I was looking for

  9. Hello,
    I have the following situation.
    I have on my Contacts entity an field "Last contacted on" which shows me date the last time the employee send him an email/phone call.
    I want a process that after 3 Months from "Last Contacted on" to create a task for the user to get in touch again.
    I made the following settings : timeout equals 3 months after "last contact on" -> create task .
    But I do not know what settings should I use at "start when".
    What should I use to make the process to check whenever a contact (to check all contacts in CRM) has a "last contact date" 3 months ago and create a task.
    Alex

  10. Hi there Joe. I have an entity field where I list a specific date... Once the actual date/today's date is equal to the date specified in this field, I would like the workflow to active... How do I specify today's date to equal the entity's specified date?

  11. I am trying to develop a workflow which needs to trigger when the due date is 7 days away from now ( or 6, 5 , 4, 3, 2, 1 days away from now). Please help

  12. I am trying to develop a workflow which needs to trigger when the due date is 7 days away from now ( or 6, 5 , 4, 3, 2, 1 days away from now). Please help

  13. hi all I trying to build a workflow for sending emails every three working days if a condition is not met. This must exclude the weekends. anyone know how to accomplish that?

  14. Hello (I am no expert in CRM9
    I am trying to build a template for a Company quoting, where we have main Person contacts and others, the Problem is when we are trying to Quote we are able to get only the main contacts, if you want to get other contacts we have to there click on it every time and select the contaact.
    Any suggestions or easy method where we can have the other contacts same as the main contacts, Thanks.

    1. Hi Anil - unfortunately the out of the box quote experience is fairly lock down and not as robust as we hope for. For quoting we often create a custom srs report. This then allows you to have full flexibility of what data is displayed. In addition you can then also code to automatically send the quote as a pdf. This is all doable with custom code. We hope a future version of crm will have this capability more out of the box.....

  15. hi ,

    how can i set the values to unmapped fields during data import

    I Have a Customised Lead Entity (CRM existing entity) I want to use the data
    import option using a template consisting of "4 Column File".

    1 -> i want to pass some values during the import to fill the some
    mandatory unmapped field.

    2 -> set some default value to ret of the mandatory fields.

    3 -> blank space should be occupied by the optional fields.

    As i need this urgently can anybody suggest me the solution to achieve this.

  16. I wonder if you can help me on sending reminder mailers if there is no Activity created post 5 working days of the Lead created. I am able to after 5 days, but how will I make it 5 working days?

  17. I'm trying to build a workflow that sends an e-mail off when a case of a given priority is within 24 hours of it's follow up by date? Is this possible? Is there a value that can be used such as getdate that can then be compared to 1 day before follow up by date ?
    Thanks
    John

PowerObjects Recommends