Introducing the New and Improved Match My Email Dashboard. View announcement

Introducing Automated Calendar Sync.
Schedule a demo today.

How Can We Help?
< All Topics

Bulk Removal of Emails and/or Attachments in Salesforce

Bulk Deletion when Uploading to Match My Email Custom Object

Uploading to the Match My Email custom object affords you the use of additional tools within the installed package.  One of these is a bulk delete tool that allows you to delete emails and/or attachments across all records.   It is important to remember that, one matched, emails and attachments are stored as part of the organization data in Salesforce.  Email messages are stored in Data Storage and attachments are stored in File Storage.  Some organizations want to manage and/or clean out older email messages and/or attachments to balance access to a certain number of years of email data against the cost of Salesforce storage.

We find most companies arrive at the need for this tool because they have been Match My Email users for many years and do find they are close to exceeding available storage.  A suggestion from our team would be to assess current storage usage and make use of our bulk delete tool to determine how many years of data you are able to maintain under the limit.

1. In Salesforce, go to Setup and use the Quick Find to locate Storage Usage.  You will see your total Used for both Data and File Storage in terms of GB.  You will also see in Data Storage two objects related to Match My Email use – Email Messages (EM) and Email Message Related Objects (EMRO).  You will always have more EMRO because this represents the number of record links related to a single EM.  (Another way to think of this is an email to a Contact would match to the Contact, the Account, and perhaps an Opportunity or Case.  This would mean one EM relates to up to 4 records and would result in 4 EMRO.)

Take a screenshot or jot down these numbers as a reference point before making use of the bulk delete tool.  Keep in mind that if your concern is large attachments, you would want to scroll down to the Current File Storage Usage section and note the record count and size of Attachments.

2. Navigate in Salesforce Setup to your Installed Packages list, and click Configure next to Match My Email.

3. On Configure screen, expand Data Management and click Delete Old Emails.

4. On Delete Old Emails screen, default timeframe is anything older than 60 months (5 years).  This can be modified using up/down arrows or changing number of months.  For example, if you want to keep emails and attachments only from the last 2 years, you would enter 24 months.  As you read the prompt it would be “Delete emails and attachments older than 24 months”.  Our suggestion would be to pick something further out, such as 60 months or 48 months, depending on how long you have been using the app.

You will note that you have the option to remove emails and attachments, or just focus on attachments which are held in File storage.

Delete Old Emails screen with red guidance text

5. When all settings are as desired, click Run to initiate batch deletion.  One can click Save to save these settings as “new” default for future run of a batch deletion.  The default batch size is 200 items, which is recommended.  If there are more than 200 items to be removed, Match My Email will run a series of batches up to this amount until all of the items meeting selected criteria are met.   Please note: After Run, the emails and/or attachments will be moved to the recycle bin.  Per Salesforce settings, items will stay in Recycle Bin for 15 days and are then purged. During this period, you can go to recycle bin and select items to restore if needed. 

6. When the batch run is complete, you will receive an email from Salesforce alerting you. At that time, we suggest you revisit the Storage Usage screen and compare your numbers.  If the choice for number of months to keep did not result in enough of an effect on your numbers, you can go back to the Delete Old Emails screen and reduce the number of months (i.e. years) of data you are keeping and run it again.  

Bulk Deletion when Uploading as Enhanced Email to the Activity Timeline

When uploading as Enhanced Email, the emails arrive in Salesforce as a native Salesforce Email Message object as well as a related Task. It is the Task that is reportable and is viewable in Classic edition.  Because the emails are therefore native objects in Salesforce, it is possible to use the Mass Delete Records tool native to Salesforce.  To find this option, go to Salesforce Setup and use the Quick Find to search Mass Delete Records.  The option for Mass Delete Activities will get you to the screen shown below. For assistance with this native Salesforce tool, please consult your Salesforce Admin or a Salesforce Support Representative.