How to close a case as duplicate or merge a case

Most organizations store similar cases as related cases, and then only work the parent cases (where ParentID is not populated). You can create a trigger to match on common criteria, and set the ParentID for any matching cases.

Apex has a merge DML statement which will allow you to merge up to three records of the same sObect type. It will re-parent any related records. However it is limited to only processing leads, contacts, and accounts.

An AppExchange solution called, "Case Merge Premium", looks like a viable solution otherwise, you'll need to write your own case merge feature.


We all were missing the merge case functionality in Salesforce and relying on the AppExchange packages. The idea was created a long ago to deliver it. You can find that here:- https://success.salesforce.com/ideaview?id=08730000000IG6hAAG

The summer’19 bring great news to us as the case merge button will be available in Lightning in Salesforce. As per Salesforce, Case Merge will be an Open Beta in Summer ’19 (with a target GA in Winter ’20).

Merge your duplicate cases like you merge your duplicate accounts and contacts with Case Merge. Now, you can consolidate up to 3 duplicate cases so your agents can get through the clutter and focus on what’s important, your customers.

Read more here:- https://salesforcediaries.com/2019/04/19/case-merge-button-in-salesforce-lightning/

and https://releasenotes.docs.salesforce.com/en-us/summer19/release-notes/rn_cases_merge.htm