Print this page

How do I export or delete archived activities through the API?

Knowledge Article Number 000005388

I would like to know how I can export archived activities for deletion through the API?


Archived activities can be exported and/or deleted through API with Data Loader. To delete an archived activity you must have their record Ids which can be obtained directly from the record, through a report, or exporting the information with the Data Loader.

Option 1

In order to obtain the archived record Ids through a report you must request Increasing Archive Days for your Organization.

Note: Before the case request is opened determine how far back you would like your Archive Date to go and take into account that if you don't go far enough back you're report may not return all archived activities. Support will tell you the limits and implications on how far your date can be moved to in the corresponding case.

After the feature is enabled, you can create reports containing archived activity Ids dating back to the number of days the feature was requested.

To create the report:

a) Click on the reports tab.
b) Then click on create new custom report.
c) The report is of Activities. Depending on the activities, do Tasks or Events.

Option 2

In order to obtain the activity Ids through Data Loader you will need to perform an Export All selecting to include the Id field. Please remember that with the Data Loader tasks and events are separate objects so you will need to follow the below steps for both tasks and events individually.

You can easily Export Data including archived activities with the Data Loader by following these steps:

1. Click on the Export All button (the Export button will not work in this particular case)
2. Select Tasks or Events
3. Select the Id field and other desired fields for export and set a condition filter: IsArchived Equals TRUE
4. Click on Add Condition
5. Finish

The resulting file will contain the Ids for archived activities which you can use then use to perform a delete operation with Data Loader. See Insert, Update, or Delete Data Using Data Loader​ for more details.

Alternatively, you can also get Archived Activities by Exporting Backup Data.

promote demote