Redundant Detection
Email Scrubber's Redundant Detection leverages Email Message headers data to identify email messages that are redundant. i.e. the complete email message body exists in an email higher up in the thread chain.
​​
For example, a simplified email message exchange may look like the following:
-
​Customer sends an email to support for assistance.
-
Support responds to the email asking the Customer for more information about their issue
-
Customer responds to the email with the information requested.
-
And so on...
​
This exchange creates 3 email messages records in Salesforce.
-
Email Message 1 email message body contains the original support request from the customer.
-
Email Message 2's email message body contains
-
The response from support requesting additional information​
-
The original support request from the customer
-
-
Email Message 3's email message body contains
-
The Customer's with additional information requested
-
The response from support requesting additional information​​
-
The original support request from the customer
-
​
In this simplified example, Email Message 1 and Email Message 2 are identified as redundant.
​
Note: In order to leverage Redundant Email Message detection, Save Email Headers must be turned on in your instance.
​
​
Configure Declutter Setup Custom Metadata Type
All Email Scrubber processing logic is controlled by the Declutter Setup Custom Metadata Type. Please review the documentation for a complete list of its capabilities.
​

The first step in the Redundant Detection process is to identify records to be flagged as redundant. This process identifies an email message as redundant by setting the EmailScrubber__duplicate_detected__c field to true.
Schedule the Retro Records Batch

The Email Scrubber Retro Records batch process can also be run via apex as needed.
​
emailscrubber.retroBatch batchApex = new emailscrubber.retroBatch();
Id batchprocessid = Database.executeBatch(batchApex);
Review the Results
Upon batch completion, Email Message records will be flagged only. Take this opportunity to review the results and the potential impact of archiving theses records by running the Email Scrubber Case Emails Report.​

Configure Declutter Setup Custom Metadata Type for Archive
Set the Archive Batch Where condition based on your instance's needed. Leveraging the EmailSCrubber__duplicate_detected__c field will insure only records flagged as redundant will be eiligible for archiving.

Schedule the Archive Records Batch

The Email Scrubber Archive Records batch process can also be run via apex as needed.
​
Declutter_Setup__mdt dSetup = declutterUtility.getSettings();
emailscrubber.archiveRecords batchApex = new emailscrubber.archiveRecords();
Id batchprocessid = Database.executeBatch(batchApex, Integer.valueOf(dSetup.EmailScrubber__Archive_Batch_Size__c));
Review the Results
Upon batch completion, Email Message records will be archived and available in the archive object.​