Retention vs Purge Policy in the Archive Managed Package

Retention sets how long Archive keeps records. A purge policy deletes records before that period ends, such as for Right to Be Forgotten requests.

Note
Note This content relates to Archive. For Salesforce Archive, see Store Data Externally with Salesforce Archive.

When you archive data, you create an archiving policy that includes a retention option. The retention period, defined in the archiving policy, is a field that specifies how long Archive keeps a record, based on legal requirements or a set of criteria.

A purge policy deletes records that meet criteria you define, even if their retention period hasn't ended.

Both retention and purge permanently delete records from Archive.

Retention and Purge Compared

Retention is the default expiration set on the archiving policy. A purge policy deletes records earlier, based on its own criteria.

Characteristic Retention Purge
Defined in Retention period in the archiving policy Criteria in the purge policy
Deletes records When the retention date is reached When records meet the purge criteria
Runs Automatically Automatically or manually
Activities tab label Purge by retention Purge

Retention

  • Purpose: Retention is the period during which archived data or records are intentionally kept and is defined when setting up the archiving policy.
  • Criteria: Legal requirements, compliance regulations, business needs, or other criteria specific to your company determine the retention period.
  • Effect: During the retention period, the archived data remains accessible in Archive and isn't automatically deleted. When the retention date is reached, Archive deletes the data. The Activities tab shows these deletions as Purge by retention.

Purge

  • Purpose: A purge policy permanently deletes data from Archive before its retention period ends.
  • Trigger: Purging happens when a record meets the criteria in the purge policy. The policy runs automatically, or you run it manually as an ad hoc action. The purge criteria override the retention period.
  • Use Case: Use a purge policy to comply with data protection regulations or to respond to data deletion requests, such as Right to Be Forgotten (RTBF) requests. These requests can't wait for the predefined retention period.
  • Example: Your archiving policy keeps cases for 7 years. In year 2, a customer submits an RTBF request. You create a purge policy that deletes that customer's archived cases without waiting for the 7 years to pass.
  • Limit: A purge policy deletes up to 1,000,000 records in each run. It doesn't delete records under legal hold or records protected by Archived Data Protected from Purge. For details, see How Purge Policies Work.

Retention and Purge in Archive

  • If the retention criteria for an archiving policy change, update the retention period in that policy. For example, to meet General Data Protection Regulation (GDPR) requirements, change the retention period from 5 years to 7 years.
    Important
    Important This change retroactively affects all previously archived records through that policy.
  • To avoid retroactively affecting records, disable this archiving policy and create a clone with the newly defined retention period.

Review Activities

The Archive Activities tab shows whether a record was purged because of the retention period defined in the archiving policy or because of a purge policy.

Purge shows records removed via a purge policy.

Purge by retention shows that records were removed when the retention period was reached.