Process builder to send email alert 48 hours from date/time field that changes - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Jessica KwokJessica Kwok 

Process builder to send email alert 48 hours from date/time field that changes

I have a custom object of Client, with a child object of Object A. Object A has a child object called Object B. These are all master-detail objects.

I have a use case where if NOW() - date/time field from Object B > 48 hours, then send an email to a Salesforce user. I can't just have an email fire 48 hours after the creation of an Object B record; it has to fire only if the time between now and the most recent Object B record is greater than 48 hours. The basic idea is: if something hasn't happened in 48 hours, then notify the user.

I pulled up the most recent Object B date/time field all the way up to the Client object via a rollup field to find the most recent date from Object B to show on Object A, then another rollup field on the Client object to find the most recent Object B date/time from Object A. 

I'm stuck now in actually trying to create a Process Builder to email the Salesforce user. The date/time rollup field on the Client object changes every time an Object B record is entered, and I'm unable to create a time-based workflow with the criteria ISCHANGED(). I've considered various types of helper fields, but perhaps I'm not getting imaginative enough with them :) 

Any help would be appreciated - thank you! 
Best Answer chosen by Ed (salesforce.com) 
Jessica KwokJessica Kwok
After some toying around, I was actually able to solve it be using an invocable process. The first process was on the grandchild object, to kick off the invocable process in 48 hours. The second process was the invocable one on the parent object, and it checked if 48 hours had passed from the most recent date. If so, then it send out an email alert. This probably won’t work at large volumes, but in our case, we have under 100 records that would kick off this process.

All Answers

Ines GarciaInes Garcia
Hi Jessica, 

It's worth to bear in mind that automation in salesforce requires a change on the record, so you cant do 'if nothing changes' then something.
But rather think of it of since creation or edit, scheduled action of X days after 'last modified date'  (or that field) then do something.

You can use process builder for this. Hope this clarifies and helps!

Ines
Ines GarciaInes Garcia
Hi Jessica, did that help/clarify?
Jessica KwokJessica Kwok
Hi Ines! Well, I think the problem is just that: I'm trying to have a process run when nothing has changed in 48 hours. I have a roll-up field that pulls up the most recent date/time and, and from that field I'd like to schedule an email to go out 48 hours from that date. However, you can't make a scheduled action when the criteria for the field is ISCHANGED(). 
Jessica KwokJessica Kwok
After some toying around, I was actually able to solve it be using an invocable process. The first process was on the grandchild object, to kick off the invocable process in 48 hours. The second process was the invocable one on the parent object, and it checked if 48 hours had passed from the most recent date. If so, then it send out an email alert. This probably won’t work at large volumes, but in our case, we have under 100 records that would kick off this process.
This was selected as the best answer
Ines GarciaInes Garcia
Boom! there is always a way :)