# How does Case Merging eliminate duplicate inquiries and streamline support queues?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Case Merging, Data Hygiene

Read it on the site: https://www.forcechallenges.com/interview-questions/how-does-case-merging-eliminate-duplicate-inquiries-and-streamline-support-queues

## Answer

**Basics:** Customers email twice, call after emailing, or several contacts report the same outage. Duplicate cases double the workload and create conflicting replies. Merging picks one master case and consolidates the rest into it.

**How it works:** In Lightning Experience, an agent with the Merge Cases action selects the cases (up to three at a time), picks the master, and confirms; the other cases are closed and linked to the master, and their related items move or are referenced (verify exactly which related records, such as emails, comments and attachments, transfer in your release). In Classic, Merge Cases was a list-view button. Merging needs the right permission (edit on cases and the merge action on the page layout), and the cases should usually share the same contact or account.

**Advanced / deep dive:** Prevention beats cleanup: detect duplicates on creation by comparing the contact, subject and time window using a Flow or Apex, then flag or auto-link them. Use Email-to-Case threading properly so replies do not create new cases. In an outage, prefer parent-child hierarchies over merging, because merging loses the individual customer's identity and SLA, while a parent-child link keeps each case and lets you update all together. Reporting should treat merged cases as closed duplicates, not resolved work, so metrics are not inflated. Check how merged cases behave for milestones, entitlements and email thread IDs before enabling it for everyone. Merge is a user-driven action; if you need automated merging, design carefully for data loss and audit.

**Code / config example:**
```apex
// Bulk-safe duplicate candidate detection: same contact + subject within 24h
public static Map<Id, List<Case>> findDuplicates(List<Case> incoming) {
  Set<Id> contactIds = new Set<Id>();
  for (Case c : incoming) if (c.ContactId != null) contactIds.add(c.ContactId);
  Map<Id, List<Case>> byContact = new Map<Id, List<Case>>();
  for (Case existing : [SELECT Id, ContactId, Subject FROM Case
                        WHERE ContactId IN :contactIds AND IsClosed = false
                          AND CreatedDate >= :Datetime.now().addHours(-24)]) {
    if (!byContact.containsKey(existing.ContactId)) byContact.put(existing.ContactId, new List<Case>());
    byContact.get(existing.ContactId).add(existing);
  }
  return byContact;
}
```

**Hidden gotchas & must-remember points:**
- Maximum three cases can be merged in one operation.
- The action must be on the Case page layout or Lightning page, or users never see it.
- Merging closes child cases; SLA metrics on them stop, so reports may need adjusting.
- Merging is not reversible through the UI.
- Duplicate Management rules do not automatically cover Case; build your own detection.
- Related emails and comments may reference the old case Id; test email threading afterward.

**Best practice:** Detect likely duplicates at intake and use parent-child links for widespread incidents; reserve merge for true single-customer duplicates.

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