You need to sign in to do that
Don't have an account?
Sujit K
Send an email after 4 hours of Inactivity on Cases
Hi All,
I have a requirement wherein we need to send an email to a group of users if cases is not assigned within 4 hours after it gets created.
Any help or sugegstion is highly appreiciated.
I have a requirement wherein we need to send an email to a group of users if cases is not assigned within 4 hours after it gets created.
- The case is getting created in salesforce using Email-To-Case and assigned to Queue as default case owner.
List<Case> casesUpdatedInLastFourHours = [select id, Subject, LastModifiedDate from Case where LastModifiedDate = TODAY AND HOUR_IN_DAY(LastModifiedDate) > 4];
Any help or sugegstion is highly appreiciated.
Create a formula field to caculate the hours based on case created date and now() you will get the time diffrence if the case owner is still queue.
Formula should be like below. Note: above formula calulates the time differenece current time & createddate untill the case owner as queue.
Refer the datetime formula help article.
https://help.salesforce.com/s/articleView?id=000324878&type=1
\Create a workflow rule using below conditions:
Evaluation Criteria:
3rd option: created, and any time it's edited to subsequently meet criteria
Rule Criteria:
formula_field __c > 4
Email alert:
send an email alert to the respective users.
If this helps, Please mark it as best answer.
Thanks!!
Workflow rule will fire when there is Insert or Update on a record. But here we need to know if the record is not edited in 4 hours after it is created.
Any workaround for this?
That is what the formula will do. If the record owner not changed untill 4 then workflow criteria will met and send the notifications to the respective user.
Try that, it will work.
Thanks!!
The workflow rule will not trigger on formula field changes as per the documentation here
https://ideas.salesforce.com/s/idea/a0B8W00000GdW63UAF/allow-changes-in-formula-field-value-to-trigger-workflow
Correct me If I am wrong
Thanks,
Sujit