Understanding the Configuration
All Email Scrubber configuration lives in the Declutter Setup Custom Metadata Types (CMDT). This one record controls all the necessary processes. Whether you're setting things up for the first time or troubleshooting later, there's exactly one place to look.
Upgrading from an earlier version? You'll need to manually add any new fields to the CMDT page layout. They don't appear automatically.
Make the page layout your own
Not all the configuration options below are required for your specific implementation. They're all outlined here so you understand what's possible. This record's page layout ships with a default, but we'd recommend editing it down to just what your org actually uses and removing anything you don't need. A shorter, focused layout is easier for your team to configure correctly than a long list of settings you'll never touch

Field Reference
What Each Section Configures
Notifications
Administrators who wish to be notified on Email Scrubber Retro, Archive, and/or Purge batch completion, can configure the notifications section. The Notifications section can be configured to identify the users (comma delimited list of usernames) to be notified and the conditions to be notified.

Recipients will receive a notification similar to the example displayed below.

Archive Batch
The Archive Batch configuration options drive the Archive Batch process.

1
Archive Batch Where Condition
Identifies the Where condition to execute against email messages for native archiving. This query should contain “duplicate_detected__c = true” if wishing to archive only redundant email messages. Are archiving should include parent.isClosed = true unless otherwise insructed.
2
Archive Batch Order By
The order by criteria for the batch.
3
Archive Batch Limit
The total number of records to allow the batch to process.
4
Archive Batch Distination
When to store the archived records. Allows choose Redundant History.
5
Archive Batch Attachments Action
Identifies the action to take on the email attachments after the email message records has been purged.
6
Archive Migrate Attachments to Files
When checked, any Attachments migrated will be converted to Files.
7
Archive Batch Attachments Save Audit
Identifies how the audit fields (createdby, createddate, lastmodifiedBy, lastmodified) should be set when new email attachments are created. If checked, the original values will be preserved. NOTE: The running user must have this permission
8
Archive Batch Size
The size of the individual batches.
9
Archive Hard Delete
When checked, the batch will issue a hard delete (remove the delete email messags from the recycle bin)
Set Has Archive Records Field on Case
This configuration option will set a configurable field on the case to indicate that the case has archived records.

1
Has Archive is Active
When checked, the configuration is active.
2
Has Archive Records API Field Name
The case field API name to set with the process.
3
Has Archive Where Condition
The SOQL Where condition to apply to the batch
4
Has Archive Batch Limit
The Batch Limit
5
Has Archive Batch Size
The Batch Size
Create Feed Items
Note: The Archive Batch running user must have "Set Audit Fields upon Record Creation" permission.
This configuration option allows the archive batch to create archive records with the original Created By, Created Date, Last Updated By, and Last Updated Date fields. Note: The archive object does preserve the original values in custom fields if needed.

1
Create Feed Items
When checked, the archive batch will create replacement Feed Items posts for archived Email Messages.
2
Create Feed Items for Redundant Emails
When checked, if setting the redundant email flag from the Redundant Batch process, Feed Items will be created. If unchecked, Redundant emails will not generated feed item posts.
3
Feed Item Title
The title to be used for the feed item post.
4
Feed Item Archive Body API Field Name
The formula field which will dictate the text of the Archive Body.
Retro Batch
The Retro Batch configuration options drive the Retro Batch process. The Retro Batch is responsible for flagging records as redeundant.

1
Retro Batch WhereCondition
The SOQL Where condition used to run Redundant Detection.