# What is the purpose of Case Comments in tracking investigation notes and progress?

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

Read it on the site: https://www.forcechallenges.com/interview-questions/what-is-the-purpose-of-case-comments-in-tracking-investigation-notes-and-progress

## Answer

**Basics:** CaseComment is a child of Case with CommentBody (up to 4,000 characters) and IsPublished. Private comments are for agents; published comments appear to customers in Experience Cloud or the Customer Portal.

**How it works:**
1. Add the Case Comments related list to the case page (Lightning) or use Case Feed's posts.
2. Agent adds a comment and chooses Make Public if appropriate.
3. Public comments are visible to the customer; if "Enable Case Comment Notification to Contact" (Support Settings) is on, the contact is emailed.
4. Comments appear in the case history and activity context and can be reported with Cases with Case Comments report types.

**Advanced / deep dive:** In orgs using Case Feed, agents mostly use feed posts, emails and internal notes instead of comments, which lets them mix Chatter, email and logging. CaseComment supports triggers but not custom fields or attachments; if you need richer notes use Feed items, ContentNote or a custom child object. Permissions: editing and deleting comments is limited by permissions (verify). Comments inherit the case's sharing. Integration: sync public comments to external ticketing tools using CDC or a trigger, and make sure to flag visibility. Automation: Flow can create comments on status changes, but remember record-triggered flows on CaseComment require care with notifications.

**Code / config example:**
```apex
List<CaseComment> notes = new List<CaseComment>();
for (Case c : closedCases) {
    notes.add(new CaseComment(ParentId = c.Id,
        CommentBody = 'Resolved: see Knowledge article.',
        IsPublished = true));    // visible to customer
}
insert notes;
```

**Hidden gotchas & must-remember points:**
- A published comment is visible to the customer; a mistaken publish cannot be un-sent by email.
- CommentBody is limited to 4,000 characters.
- Public and private status can be changed after creation only with certain permissions.
- No attachments on case comments.
- Case Feed pages may not show the Case Comments list unless it is added.
- Comments are not the same as email messages (EmailMessage) or feed posts.

**Best practice:** Keep customer-facing updates as public comments or emails, and keep investigative notes private.

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