function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike A SmithMike A Smith 

Automation email sending when status equals void and PB shows status equals Completed.

I dleleted the original question I posted as I had the wrong criteria.

We have a Process Builder that is sending a pre class confirmation email 7 days prior to the class start date. Part of the criteria is that the scheduling Status=Completed so why would emails still be sent when the criteria on the Training Event = Void?

In one example I'm looking at the TE was created on 5/22/23 with a class start date initially of 8/9/23. The start date, while 'In-Discussion' status, was changed around a little but always occuring in early August and ended up being set to 8/5/23. The Scheduling status was then set to Completed on 6/15/23. Then on 7/6/23 the Scheduling Status was changed from Completed to VOID.

So why might the email still have sent 7 days prior to 8.5.23 when the status no longer matched the criteria=Completed when it was changed to Void on 7/6/23?

Does the system check the criteria one last time to make sure everything still matches before sending the email? That's what a Salesforce support agent told me years ago so not sure if that's true today but would seem if was checking on 7/29/23 it would have seen the VOID status no longer matched the criteria Scheduling Status=Completed. And thus the email should not have been sent.

So any ideas at all why the email was sent out ? 
 
Sukanya BanekarSukanya Banekar
Hi Mike,

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

As per the documentation, if the criteria does not match with updated record then the scheduled action will be cancelled.
Actions remain scheduled only as long as the criteria for the actions are still valid. If a record no longer matches the criteria, Salesforce cancels the scheduled actions for the record.
For processes that start when a record is created, Salesforce never reevaluates the record associated with that process. The scheduled time for the actions stays the same, even if the record no longer meets the associated criteria when the scheduled actions are executed.


Can you tell me how many days did you set up to send an email?

Thanks,
Sukanya Banekar
Mike A SmithMike A Smith
Thanks Sukanya. 

Here below is an actual TE (with History) that resulted in the email being sent even though the status was made VOID. Again the email is set to send 7 days prior to the start date so if the START DATE here was set as 8/5 then you would expect the email to send very early in the morning on 7/29 correct? But the Status was changed to VOID on the morning of 7/27 so then why did the email send on 7/29 if it would have evaluated the criteria again before sending as at that point the status was no longer 'Completed'... the criteria did not match before the send...:

Date    Action
7/27/2023, 11:13 AM    Changed Void Reason to Customer Declined.
            Changed Scheduling Status from Completed to Void.
6/19/2023, 2:10 PM    Changed Completed Date to 6/19/2023, 2:10 PM.
            Changed Scheduling Status from In-Discussion to Completed.
6/19/2023, 1:27 PM    Changed Start Date to 8/5/2023.
            Changed Number of Instructors to 1.
            Changed Number in Class to 12.
            Changed End Date to 8/5/2023.
6/19/2023, 1:24 PM    Changed Scheduling Status from Contacting to In-Discussion.
6/19/2023, 1:24 PM    Changed Scheduling Status from Open to Contacting.
6/19/2023, 1:24 PM    Created.
Mike A SmithMike A Smith
Note I chose a TE with the shortest history so I could paste that info here (so there wouldn't be a ton of info to go through) but there are other examples I have where the Scheduling Status was made Void WELL in advance of the start date... but the email still went out. For example, class had start date as 8/8/23 and the Scheduling status was made void on 7/13/23. That would be a little over 2 weeks PRIOR to when the email was scheduled to send (8/1/23). The criteria would not match the process builder as VOID is not part of the criteria. So why did it still send the email to the training contact?
Mike A SmithMike A Smith
And to confirm this process builder starts when a record is created or edited. 
Sukanya BanekarSukanya Banekar
Can you please check if 'Do you want to execute the actions only when specified changes are made to the record?'  checkbox is marked?
Please uncheck the checkbox and try.. 
If it is already unchecked then you should raise a case with Salesforce to invetsigate furthermore.
Or may be try using workflow rule.

Thanks,
Sukanya Banekar
Mike A SmithMike A Smith
Thanks, I will look at that. We actually have an admin working with Salesforce support right now but that was not progressing like we hoped it would so I thought I would try here to see if anyone had any ideas. Appreciate the input!
whitewalter whitewalterwhitewalter whitewalter
Elevate your academic journey with https://essayshark.com/custom-term-paper.html exceptional philosophy essay writing service. Discover a seamless platform at https://essayshark.com/, where expert writers delve into profound philosophical analysis tailored to your needs. With our user-friendly interface and prompt delivery, navigating complex essays becomes effortless. Trust EssayShark for insightful, well-crafted, and timely philosophy essays that stand out.
lopic bowwerlopic bowwer
Automating email sending based on specific conditions like when a status equals "void" while a PB (presumably referring to a process or system) shows a status equals "Completed" can be achieved through custom scripts or automation tools. For instance, if you were to use a workflow automation platform, you could set up a trigger to monitor the status changes and configure it to send an email notification when these conditions are met. Just as with this automation scenario, you can utilize automation tools or scripting to streamline various tasks, such as editing videos with CapCut (https://capcutmodapks.net), by creating custom actions and triggers to enhance your workflow and save time.