web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow to create Daily email to owners regarding overdue opportunities

(0) ShareShare
ReportReport
Posted on by

Hi CRM Masters!

A seemingly easy task here but I'm struggling for 2 days already.

Need to create a scheduled Workflow (or alternative method) that sends emails to the respective Opportunity Owner IF the Owner has overdue Opportunities (preferably but optional - add number of such Opportunities in the email message). 

As I understand the logic should be this:

  • create scheduled workflow (daily/weekly/whatever)
  • loop through all the Opportunity Owners, check if any of them have 1 or more overdue Opportunities (and preferably count them)
  • send emails one by one to the respective Owners containing link to a view "Overdue Opportunities" (and preferably indicate how many). 

I can't figure out and will appreciate any ideas on these points: 

  • How to loop through all the Opportunity Owners and count overdue Opportunities for each of them? It could be either a specific hidden field on Owner that contains this number or it could be a parameter that is passed to workflow, but how do I perform this counting for every user who has open Opportunities? Creating separate workflow for every user doesn't really make sense as there are many users and they are changing. There should be some kind of solution ... but I don't see it. 

  • How to send emails to the respective Opportunity Owners about their specific Opportunities? Presumably solution could be same as for the previous point - loop through all Users and if the overdue Opportunity indicator is>0 then send the email. But how to loop through them?

This should be done without involving developers, so - workflows, views, FetchXML, things like that.

I have a feeling I'm overlooking something, feels like the solution should be rather easy.

Thanks in advance for any ideas!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Wayne Walton Profile Picture
    13,730 on at

    So workflows don't natively work this way. They're not like Windows Scheduled Tasks.  However, there is an ISV called North52 that has a workflow scheduler that might help: www.north52.com/.../scheduler-for-microsoft-dynamics-crm-xrm

  • Community Member Profile Picture
    on at

    Thanks Wayne I'll look into N52 capabilities!

  • Verified answer
    Community Member Profile Picture
    on at

    Firstly: Don't. If users can't be bothered to look at a view of overdue opportunities on their default "Homepage" dashboard, then you can send them all the emails you like, they won't change their behaviours and engage with CRM any more than they do now. A user with one Opportunity that is overdue by one day (while they are on vacation, for example) will get the same number of "spam" emails as the user who has hundreds of Opps overdue by months.

    Secondly: As Wayne says, workflows don't work like this. You can write custom workflow activities to do things like looping, then kick off  child workflow for each user who needs an email, but it is not something you can do natively. North 52 might help, but in the end you are trying to fix a people problem with a technical solution. If the computer is faulty, replace the computer. If the user is faulty...

    Thirdly: If you do look at how to do a count of overdue Opportunities you might come up with the idea of adding a field on the User entity to hold this (and updating this with a plugin, or scheduled workflow, or as a rollup field). Don't do this. Never store a frequently changing value on the user record, as any changes cause the security cache to be invalidated and recalculated (every hour in the case of a rollup field, potentially). If you must calculate and store this, do it on a custom entity related to the user record and fully automate this (ie create a record for every new user automatically and have a lookup on the user record so you can find it in a native workflow, for example).

  • Community Member Profile Picture
    on at

    Adam, thank you very much, I appreciate the effort you put into this!
    Everything you say is understandable and I learned a few things from your reply. But still :)

    What I have here are several different scenarios when such notifications might come in handy.

    We can't include everything in the dashboards as they are somewhat limited. So if we rely solely on CRM, every user has to remember to every day check in the Opportunities, Leads, Orders, Activities etc. sections to see if there is anything that needs attention.

    What we see from experience is that that is simply being forgotten. For example I have users that work mainly with Opportunities, these users tend to forget to check Leads. And reverse. Such notifications would be useful, that's for sure. I absolutely agree that spamming users' mailboxes is not a positive approach but notifications in special cases are all fine. 

    It would also suffice just to send an email stating simply "dear user, you have overdue records, please pay attention + link to overdue opportunity view".
    But in such case it is still needed to check if there is at least one record x days overdue, and loop through the users, which also seemingly is not easily doable, even without counting the records and storing that number. 

    I was also thinking about a default Dashboard on login. The problem here is that users can change their default dashboards, so they would still need to remember to go into this "special" dashboard to check things. 

  • Suggested answer
    Abhishek_Sinha Profile Picture
    665 on at

    Hi,

    Please find  async batch samples which has custom workflow which you can customize based on your need.

    Here are some of the business problems this solution can help solving:

    - Check the due date for all open Cases once a day and set ‘Exceeding SLA’ indication if due date has passed

    - Send monthly news letter automatically to target customers

    - Update MSCRM Users details from Active Directory once a day

    - Once a month, disqualify all leads with no open activities

    mscrm2015asynchronousbatchprocess.codeplex.com

  • Wayne Walton Profile Picture
    13,730 on at

    You might want to look into Queues as well.  You can throw all that into a single Queue that becomes the place your users work, no matter the item that needs to be addressed.

  • Community Member Profile Picture
    on at

    Thanks Wayne, I'll look into this!

  • Community Member Profile Picture
    on at

    Abhishek, thanks, will check it out!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans