I'm trying to wrap my head around how I would accomplish this. We have one alert that goes out when a case is closed. We want to update it so one email goes out when the case is closed, and then if the case remains closed for 24 hours, we send the final case closed email. This email will be sent 1 business day after the case is closed, and remains closed. I am thinking of doing a record triggered flow with a scheduled path. Any help is greatly appreciated!
Hi @Monica Raimondi,
You are on the right track, well done.
Your record-triggered flow will run when Status=Closed.
The immediate path will send your first email.
The scheduled path will be configured to run 0 Minutes after a custom field, and send the email. Let's call the custom field "FinalEmailDate", which will be configured to store when you want to send it.
If a user re-opens the case, the scheduled path will no longer run.
You stated "business days", If you can ignore public holidays then make "FinalEmailDate" a formula. ClosedDate will natively show you when the case was closed, and will reset for you if the case is opened/closed repeatedly so you can reference that to start.
An outline of formula is below with explanation, check the syntax and ensure the rules are exactly what you want. This sends the email on Monday when closed on Friday/Saturday:
CloseDate +
CASE(WEEKDAY(DATEVALUE(ClosedDate)),
6, 3, --Adds 3 day if closed on Friday
7, 2, --Adds 2 days if closed on Saturday
1) --Adds 1 days if closed on any other day.
If you need to factor in public holidays, then you cannot use a formula field
You will need to use the functions above as well as a get-records loop checking Holiday records to determine the next business day and store it in the custom date/time field.
Please mark this as best accepted answer. Good luck.