# How do automated case comment notifications maintain communication transparency with customers?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Case Comments, Notifications

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-automated-case-comment-notifications-maintain-communication-transparency-with-customers

## Answer

**Basics:** CaseComment records are the classic notes on a case. A comment has IsPublished: public comments are visible to customers in portals and Experience Cloud, private ones are internal. In Lightning Case Feed, agents more often use emails and posts, but comments still matter for portal communication and integrations.

**How it works:** Out of the box, Support Settings (Setup > Support Settings) include options to notify the case contact or owner about changes; names vary by release, so verify the current options. For anything beyond that, build automation: a record-triggered flow (or Apex trigger) on CaseComment, entry criteria IsPublished = true, then send an email using an email template to the Case Contact. For internal stakeholders, add the case owner, team members or Slack. The email template can use the case comments merge field, and the email is logged as an activity.

**Advanced / deep dive:** Decide between comments, emails and feed posts: emails are threaded with Email-to-Case using the Thread ID reference and reply handling, comments are simple and portal-friendly. Use Enhanced Email and an org-wide email address so replies route back to the case. Single email limits are 5,000 external recipients per day per org (Enterprise); a chatty trigger can consume it. Mind loops: an auto-reply to a comment that creates another comment can recurse. Apply sharing: portal users see only public comments on cases they can access. Experience Cloud has its own in-app and email notification settings for users.

**Code / config example:**
```apex
trigger CaseCommentTrigger on CaseComment (after insert) {
    List<Id> caseIds = new List<Id>();
    for (CaseComment cc : Trigger.new) {
        if (cc.IsPublished) caseIds.add(cc.ParentId);
    }
    if (!caseIds.isEmpty()) {
        CaseCommentNotifier.notify(caseIds); // bulk handler: query cases, send emails once per transaction
    }
}
```

**Hidden gotchas & must-remember points:**
- CaseComment body is limited to 4,000 characters.
- Unpublished comments never reach the customer, even if a notification fires.
- Customers without an email on the Contact get nothing; silent failure.
- Daily email limits apply to workflow-free automation too.
- Workflow Rules and Process Builder are retired; use Flow.
- Comments cannot be edited by customers and are not threaded replies.

**Best practice:** Notify only on published comments, use a template with a clear case reference, and log every notification for auditability.

---
Source: ForceChallenges · last updated 2026-11-02
