You need to sign in to do that
Don't have an account?
Gleb Vrevsky
Process Builder - time-dependent action will still fire if conditions are not met ?
Hello!
I have a Process which starts only when a record is created. Example of process: http://www.screencast.com/t/5okrck1Or
Time-dependent action is configured, which is sending out an email before object overdue date. Everything works fine, except of: scheduled action is executed in spite of conditions are met or not. E.g. criteria for Executing Actions is set to Object Status Equal to "Not Paid". If object status is changed to e.g. "Paid" before scheduled actions, it is still sending out an email.
Process configuration seems to be fine...or should I start the process when a record is created or edited + "Do you want to execute the actions only when specified changes are made to the record?" set to YES ?
From documentation:
"Time-dependent actions remain in the workflow queue only as long as the workflow rule criteria are still valid. If a record no longer matches the rule criteria, Salesforce removes the time-dependent actions queued for that record.
For example, an opportunity workflow rule can specify:A criteria set to “Opportunity: Status not equals to Closed Won, Closed Lost”
An associated time-dependent action with a time trigger set to 7 days before the opportunity close date
If a record that matches the criteria is created on July 1 and the Close Date is set to July 30, the time-dependent action is scheduled for July 23. However, if the opportunity is set to “Closed Won” or “Closed Lost” before July 23, the time-dependent action is removed from the queue."
Thanks a lot in advance.
I have a Process which starts only when a record is created. Example of process: http://www.screencast.com/t/5okrck1Or
Time-dependent action is configured, which is sending out an email before object overdue date. Everything works fine, except of: scheduled action is executed in spite of conditions are met or not. E.g. criteria for Executing Actions is set to Object Status Equal to "Not Paid". If object status is changed to e.g. "Paid" before scheduled actions, it is still sending out an email.
Process configuration seems to be fine...or should I start the process when a record is created or edited + "Do you want to execute the actions only when specified changes are made to the record?" set to YES ?
From documentation:
"Time-dependent actions remain in the workflow queue only as long as the workflow rule criteria are still valid. If a record no longer matches the rule criteria, Salesforce removes the time-dependent actions queued for that record.
For example, an opportunity workflow rule can specify:A criteria set to “Opportunity: Status not equals to Closed Won, Closed Lost”
An associated time-dependent action with a time trigger set to 7 days before the opportunity close date
If a record that matches the criteria is created on July 1 and the Close Date is set to July 30, the time-dependent action is scheduled for July 23. However, if the opportunity is set to “Closed Won” or “Closed Lost” before July 23, the time-dependent action is removed from the queue."
Thanks a lot in advance.
All Answers
"Time-dependent actions remain in the workflow queue only as long as the workflow rule criteria are still valid. If a record no longer matches the rule criteria, Salesforce removes the time-dependent actions queued for that record.
For example, an opportunity workflow rule can specify:A criteria set to “Opportunity: Status not equals to Closed Won, Closed Lost”
An associated time-dependent action with a time trigger set to 7 days before the opportunity close date
If a record that matches the criteria is created on July 1 and the Close Date is set to July 30, the time-dependent action is scheduled for July 23. However, if the opportunity is set to “Closed Won” or “Closed Lost” before July 23, the time-dependent action is removed from the queue."
I agree with Gleb. I set up time dependent actions to fire, even using the "created or edited" condition and "only execute actions when specified changes are made". My scheduled tasks are still firing even when the criteria are no longer met.
The criteria are set to "when created or edited". At the time of creation the criteria are met, but if the record is edited to no longer meet the criteria before the time lapse action is due the action still triggers (i.e. its added to the queue when the record is created and not removed after its edited).
Has anyone come across a solution to this? is it a known problem?
As a solution to our original problem in the first version (criteria not re-evaluating on edit), we created a second version of the process without the time lapse actions (as a stop gap whilst we tried to work out the issue), that is when we discovered the versioning problem that you have described in the linked discussion. The discussion that you've linked me to explains why our stop gap solution did not prevent external partners from incorrectly receiving email alerts (thanks again), but it doesn't actually explain or solve the original problem (in the case of there being only one process version the criteria not being re-evaluated before actions are executed).
If you or anyone else has thoughts on this I'd really like to hear them.
I am also running into a similar issue regarding time-based actions in process builder. Would you mind sharing the structure of your work around using the invocable process?
Thank you!
Michelle
Sure. My first process builder has an immediate action and a scheduled action and my invocable PB has just an immediate action. When a record is created or edited to meet the criteria of the intitial PB then the immediate action will occur right away and then the record (in this case opportunity) is put in a queue waiting for the scheduled action to occur which is record is sent through the invocable PB. To stop from having records that changed while waiting in the queue from acting on the scheduled action with out analyzing the requirements first. In this case I do not want opportunities with the stage of closed won/closed lost/cancelled to have a chatter message. Therefore, I changed my scheduled action to be an action that invokes another process builder. I created a second PB that is an invocable process and added the same conditions for the invocable process as the conditions that are on the initial PB contains. Finally, I made the actual action that I wanted to be time based on the original PB as the immediate action of the invocable process. This allowed each record that was put in the queue by the first PB to be reanalyzed before the second action actually occurrs.
Awesome! Thank you for the sharing, this will definitely be useful for some of our current/future projects!
My pleasure. :)
What I did then was use different criteria to solve, and it seems to be working so far.