[SalesForce] How to set up an email notification to a User when a new case comment is added

In our org we have a Requester field. This field is a lookup field to the User table on the Case page layout. This User needs to receive an email notification when a new comment is added to a case.

  1. I have created a new workflow rule referencing Case Comment, and set the rule to evaluate criteria when a new record (Case Comment) is created.
  2. The criteria for the workflow is RecordType equals Internal.
  3. I attempt to choose Email Notification, then Related User: Requester. However, Requester is only accessible on the Case object, not Case Comment object.

What is the best way to get access to the Requester field on the Case Comments object?

Best Answer

Email alerts on CaseComment do not have reference to related user fields on the Case nor do they have reference to email fields on the Case

Hence, the workflow alert needs to be on the Case. And thus, the Case workflow needs to be triggered by an update on Case. To do this...

  1. Create a workflow on CaseComment (when created) that does a field update of a custom Boolean on Case has_new_case_comment__c to TRUE
  2. Create another workflow on Case that runs when has_new_case_comment__c is TRUE. This workflow has an email alert and also a field update to set has_new_case_comment__c to FALSE
  3. The email alert in #2 uses an email template that references a built-in merge field {!Case.Last_Case_Comment}