Salesforce Time-based email alerts workflows are evaluated at the time interval you set. But you can’t set any time increment less than an hour using the standard workflow features.

There can be scenarios where you want to send an email alert to your contacts lets at 5pm wishing them a happy birthday. But a time dependent workflow/process builder will send it out at 12 am on the date of the contact’s birthday. Similarly there can be many scenarios where you want to control the time of the email to be shoot out like in 5 minutes, or half an hour.

Here is a neat trick that i stumbled upon when trying to do something similar myself where i had to wait before sending out an email alert.

First, on the object that you need the workflow on, create a new custom formula field that evaluates to a Date/Time value.  Lets call it Trigger Time,

The formula for Trigger Time  = (Now() – 0.038)

The formula saves a Date / Time value to your record that is 55 minutes in the past.  So lets say if you save your record at 1:00 pm, the value in Trigger Time becomes 12:05 pm.

Then, write a Time Based Workflow rule or Process that gets triggered 1 hour after Trigger Time field.  So, one hour after a time 55 minutes ago becomes 5 minutes from now!

Here’s a chart that shows the value :

Formula valueMinutes agoFire in(minutes) 
0.04145600
0.038555
0.034555010
0.031094515
0.027644020
0.024183525
0.020733030
0.017272535
0.00069159

If you need the minutes to be exact , use the formula :

1/(60*24) x 55 = 0.038194444 – for 5 minutes
1/(60*24) x 50 = 0.034722222 – for 10 minutes.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *