> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/reference/archive-tab/archive-policy-editor/advanced-retention-rules.md).

# Advanced Retention Rules

Though every Snapshot Policy has a default record retention rule, it is often convenient to have a custom retention rule for specific tables. Example:

* By default, retain records in a snapshot for 90 days.
* Retain Account, Contact, and Opportunity records for 365 days.
* Retain Case records for 2 years.
* Do not retain EmailMessage records.

The following two screens illustrate how to set up this policy.

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-defb804d7e1f3ae53b141a5f4bb63d0b7bb73fee%2F8016651c-Default-Retention.png?alt=media)

Clicking on the *Advanced* button launches an editor to override the default record retention rule. The following example sets up the scenario described at the top of this page.

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-e1e8ddb4de4e1a0fbdf986e1357b9cf19e61dff3%2Fb903c196-Custom-Retention.png?alt=media)
