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
VSK98VSK98 

send out an email every 5th case closure Salesforce

Hello Guy's,

Is it possible to send out an email to receipient on every 5th case closure.

Appreciate your inputs on the same......

Regars,
VSK98

 
Ashish Singh SFDCAshish Singh SFDC
Hi VSK98,

Do you want to send an email to the case recipient if their 5th case is getting closed? If yes, then you can do it with the flow. It can be a record-triggered flow from which you can grab the email id of the recipient and then using the get record element you can query in Case Object where the case recipient is the one which you grabbed in the previous step and you save it in collection of record. Then in next step you can divide the collection record count size by 5 and if its a whole number that means its 5 case. Simple call apex core action for send the email.

If flow doesn't solve your purpose then Apex trigger can perform this action.

Thanks,
Ashish Singh.