[SalesForce] Is it possible to avoid Time-dependent workflow email firing on a past ‘scheduled’ date

I have a time-dependant workflow to fire 15, 7 and 1 day before a set date.
Let's taken an example.

  • Today is 1/22/2015
  • Due date set is 1/23/2015

  • 1 day email is scheduled for 1/22/2015 (today)

  • 7 days email is scheduled for 1/16/2015 (past date)
  • 15 days email is scheduled for 1/8/2015 (past date)

But I get all 3 emails today (1/22/2015), My expectation in this scenario is to get only 1 email for 1 day. How to avoid past date emails within the same workflow rule?

Best Answer

There's a good discussion of time based workflow actions for dates in the past here: Should time-based workflows trigger upon record update that puts trigger date in the past?

It quotes the documentation https://help.salesforce.com/HTViewHelpDoc?id=workflow_time_action_considerations.htm&language=en_US

If a workflow rule has a time trigger set for a time in the past, Salesforce queues the associated time-dependent actions to start executing within one hour.

So I think you will have to have 3 separate workflows, so that

  • if the Due Date is less than 15 days from now, but more than 7 days from now, the 15-day email is not included in the actions

  • if the Due Date is less than 7 days from now, but more than 1 day from now, the 15-day email and the 7-day email are not included in the actions

Related Topic