top of page

Targeted Detection

Email Scrubber's Targeted Detection leverages your Salesforce data to identify email messages that are no longer needed for day to day business transactions.  

​​

For example, a common business use case may identify targeted email messages as email messages where

  • The Case is Closed

  • The Case has been closed for more than 18 months

  • The Case was not related to Product X

​

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.

​

image.png

As we are interested in archiving any email message related to a case that has been closed more than 18 months, we will set the Archive Batch where condition to:​​​​

WHERE ParentId != null
AND Parent.IsClosed = true
AND Parent.ClosedDate < LAST_N_MONTHS:18 

Schedule the Archive Records Batch

image.png

For clients on Email Scrubber version 5.0 and higher, a one-time Email Scrubber Archive Records batch can be executed directly from the Email Scrubber app page.  â€‹â€‹

image.png

For clients on an Email Scrubber version prior to 5.0, a one-time Email Scrubber Archive Records batch can be executed via apex with the following command.  â€‹â€‹

​​

emailscrubber.archiveRecords batchApex = new emailscrubber.archiveRecords();

Id batchprocessid = Database.executeBatch(batchApex, 200); 

Review the Results

Upon batch completion, Email Message records will be archived and available in the archive object.​

bottom of page