locked
How to send emails based on business hours derived from timezone of lead? RRS feed

  • Question

  • Hey everybody,

    Had an interesting idea for a workflow; delaying emails being sent to leads based on what time it is there currently if the lead has a country entered for them; this way any emails sent cross-timezone would definitely arrive on a specific day within a specific time.

    Anybody else done anything like this? Is it possible within CRM's workflow creator to do something like this? I'm about to give it a try, would love to know if anyone has had any success doing this.

    Hamual

    Thursday, September 10, 2015 4:46 PM

All replies

  • You could create a new field on the lead entity to hold the time zone offset.  Then have about 24 if-then statements, one for each possible time zone entry on the new field.  Then have the workflow wait a certain amount of time based on the condition of the if-then.

    But this could leave a large number of emails in a wait state which could be problematic, and wouldn't be my first choice.

    What you may consider is similar to the above, but set the workflow as run on demand.  Then create a console app that calls into CRM to query all the leads with the same time zone offset (based on your current time zone), and then fires the workflow against those specific leads to send the email.  Then the workflow no longer needs 24 condition statements, and no workflows need to sit waiting.  You can run the console app from a workstation.  But it could be automated by running it as a scheduled Windows task each hour.  You would have to monitor the CRM server performance during those calls to make sure that they didn't interfere with normal user interaction.


    Jason Peterson

    Thursday, September 10, 2015 6:49 PM