10

I have a PB flow which is meant to send reminders to change an opportunity's stage after a date has expired. There's multiple emails that go out -- an hour after the date elapses, a day after, etc -- but the problem is that even after the opportunity's stage has been changed, the alerts don't stop. It was my understanding that once the record no longer qualified for the rules, it wouldn't continue the flow.

Here's the flow:

enter image description here

enter image description here

So if the first scheduled action fires, and the opportunity's stage is changed in response to that, it shouldn't receive the other scheduled actions. Any reason why that wouldn't work?

EDIT:

At the very top of my flow, the first option is a separate action group based on whether a specific user owns the opportunity. If true, it sends a series of emails asking them to reassign the opportunity. After that, the other options are like I explained above.

This first choice seems to work fine -- the first email is sent (subsequent ones if necessary), but once the owner is changed (and the criteria no longer matches), the flow progresses on to the next stage.

enter image description here

enter image description here

Why would this first part work, but not the rest?

5 Answers 5

3

Not sure if this changed since the original post, but I had the same problem, this is what I found ultimately in sf help.

https://help.salesforce.com/articleView?id=process_limits_scheduled_processing.htm&type=5

If the Process starts when the record is Created, then it doesn't re-evaluate. If it starts when the record is Created or Edited, "scheduled actions remain in the queue only as long as the criteria for those actions are still valid. If a record no longer matches the criteria, Salesforce removes the scheduled actions for the record from the queue."

Though, another part of that page points to another problem. If you de-activate the Process, change it, and activate the new version, "the scheduled actions continue as usual. If a deactivated process has pending scheduled actions and the record whose field the schedule is based on is changed, Salesforce recalculates the schedule for those actions. Once a process is deactivated, Salesforce ignores all other changes to associated records."

0

The way the process works is to evaluate the criteria rules once then perform all the immediate actions you are listing. So after it evaluated your opportunity stage condition it will perform all the actions in your action group even though the stage of the opportunity is changed by one of the actions. If you want to reevaluate the condition then you have to create a new one after each action is finished. Hope this makes sense.

1
  • so it sounds like you're saying the record is evaluated once and only once -- then all the items in the action group process regardless of whether the record changes to no longer fit the group's criteria? Can you explain more about how I could have it re-evaluate so the alerts stop once the criteria is no longer met?
    – Matt
    Commented Mar 24, 2016 at 21:09
0

For the functionality you're trying to achieve, PB won't work. It uses a "fire and forget" logic where once the criteria are met, it will always execute the actions defined, regardless of whether the criteria still match at the time those actions are executed.

If you want to keep an eye on the criteria and still want time-based triggers, I would suggest taking a look at time-based workflow rules. It's not a solution that is as visual as the PB, but it will achieve the re-evaluation you're looking for without coding.

3
  • I added an edit above showing an earlier part of the flow that seems to work in the way I was hoping... it's just the other parts of the flow that don't. Any idea why one choice would work and one wouldn't?
    – Matt
    Commented Mar 24, 2016 at 23:00
  • 1
    Found this also in the documentation.. help.salesforce.com/… "For processes that are set to run when a record is created or edited, scheduled actions remain in the queue only as long as the criteria for those actions are still valid. If a record no longer matches the criteria, Salesforce removes the scheduled actions for that record from the queue."
    – Matt
    Commented Mar 25, 2016 at 1:46
  • @Matt Seems like what the PB is doing, is going to the next criteria and evaluating that one once the first criteria doesn't match anymore. But because for the second criteria in your flow, there is no "next criteria", it might be stuck. Try adding another criteria and see what happens.
    – nicolas
    Commented Mar 25, 2016 at 20:04
0

I'm not sure if this is related, but there seems to be (have been? Can't confirm if still) a known issue around this around versioning: https://developer.salesforce.com/forums/ForumsMain?id=906F0000000fz6b

0

Scheduled actions set by process builder remain in the queue only as long as the criteria for those actions are met. No exceptions here. As soon as a record no longer meets the criteria, the scheduled actions for that record are removed from the queue.

To check if your time dependent process works well, go to 'Create' --> 'Workflow & Approvals' --> 'Flows' and look at the 'Paused and Waiting Interviews' to see if your scheduled actions are in there and removed at the appropriate event.

When you find unexpected results, there's no other way to find out why than to change evaluation criteria and check again.

In the given example one situation that may cause the process to not work as expected is when the record initially meets BOTH the criteria of the first evaluation AND those of the second one. That means that after the record has been changed because of the resulting actions of the first evaluation, the specified changes have not taken place for the second evaluation to fire on the next occurrence.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .