Loading

Last Case Comment Merge Field in Email Template Only Returns the Last Public Comment

Julkaisupäivä: Jun 2, 2026
Kuvaus

Overview:

The {!Case.Last_Case_Comment} merge field is available in Salesforce Email Templates and is documented to include "the description of the most recent comment to be created on a case." However, this description is misleading.
By design, the {!Case.Last_Case_Comment} merge field only returns the last case comment if that comment was marked as Public. Private case comments are excluded from this merge field.
This means:

  • If a case has no comments marked as Public, the merge field value is blank in the corresponding email.
  • If a case has multiple comments but only older ones marked as Public, the merge field returns the last public comment — which may not be the most recent comment overall.

Real-Life Example: A support agent closes out the day by adding a case comment as "Private" (an internal note for the team). A workflow rule triggers an email to the case owner using the {!Case.Last_Case_Comment} merge field. Because the most recent comment is Private, the merge field value in the email is blank, even though a comment was just added to the case.

 

Ratkaisu

The behavior of the {!Case.Last_Case_Comment} merge field returning only Public comments is working by design. The merge field is not designed to expose private or internal case comments in outbound email.

Workaround — Notify Case Owner of All New Comments

If you require case owners to be notified whenever new public or private case comments are added, enable the "Notify Case Owner of New Case Comments" preference. This setting sends a notification email to the case owner for every new case comment, regardless of public or private status.
To enable this setting, follow the steps in Customize Support Settings.

Knowledge-artikkelin numero

000389744

 
Ladataan
Salesforce Help | Article