[SalesForce] Need information on the ‘Scheduled Actions’ in Process Builders

enter image description here

The functionality of above process builder is that when a 'Learning Assign' object record is created, then it checks for the 'Due Date' in another object 'Learning Activity'.

If Due Date = 60, then a immediate action updates the 'Learning assign' object 'Due Date' field to (TODAY+60).

Similarly it updates to 45,30… days as per the 'Due Date' field value on 'Learning Activity'.

Note: 'Due Date' field is on both 'Learning Assign' and 'Learning Activity' object. Based on the value in 'Learning Activity' the field in 'Learning Assign' is updated.

After the immediate actions , there are scheduled actions which will send Email alerts based on the updated 'Due Date' on 'Learning Assgin' object.

Now since there are so many Scheduled Actions I was planning to reduce them by removing the condition to check if Due Date = 60,45… Instead I am planning to give a condition to check if Due Date != NULL. And then run the immediate action to update record.

But I need confirmation on that if suppose the Due Date =30 days, then will the Scheduled action for '40 days' be skipped and will move to execute '25 days' scheduled action or not ?

Is it like 1st scheduled action has to process then only 2nd will happen. Or will 2nd happen if the conditions specified are true ?

Thanks

Best Answer

if suppose the Due Date =30 days, then will the Scheduled action for '40 days' be skipped and will move to execute '25 days' scheduled action or not ?

Assuming you make the change you're discussing and collapse the conditionality of scheduling these actions: No, the scheduled action for 40 days will not be skipped. It will be executed more or less immediately.

The best documentation on this is Considerations for Time-Dependent Actions and Time Triggers. Note that

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. For example, if a workflow rule on opportunities is configured to update a field 7 days before the close date, and you create an opportunity record with the close date set to today, Salesforce starts to process the field update within an hour after you create the opportunity.

That's the situation here. If you have a Due Date at 30 days, and you set a Scheduled Action for 40 days prior to that date, it will be at a time in the past, and Salesforce will begin executing it within one hour.

You'll have to preserve some type of conditions on adding the scheduled actions to achieve your desired outcome.

Related Topic