We have some customers that will desperately email multiple support email addresses at our company. Those support email addresses are tied to different E2C (Email-to-Case) processes so a case will get created for each of those support teams. This creates a problem where multiple support teams are then reaching out to the customer about their issue.

For example: From: customer To: [email protected], [email protected], [email protected], [email protected] Subject: Help! We have a problem!

This creates Case1 for the ABC Support Team This creates Case2 for the BCD Support Team This creates Case3 for the EFG Support Team This creates Case4 for the XYZ Support Team

How have other Salesforce users tackled this issue? Automatically merging duplicate cases and choosing the first email address's case as the "winner/survivor"?

1 Answer 1


You could write a new trigger on Case or EmailMessage that checks for Cases with the same Subject and Web Email in the past 10 seconds (can increase or decrease based on your testing if necessary), and if one already exists, either merge the current one as the loser to the previously existing one as the winner, or just delete the current one (DML can be done directly in after trigger with related Case Id or via @future method). The one gotcha will be to make sure auto-reply emails aren't sent for these subsequent duplicate Cases. Previously I've done auto-deleting in the after trigger for spam and hate emails and took care of the auto-reply in the trigger handler itself to avoid complication.

  • Thank you!. I will give this a try. Apr 21, 2021 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .