> 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/policy-filter-rules.md).

# Policy Filter Rules

A Snapshot Policy Filter Rule contains the logic which determines if a database record should be processed by the snapshot policy. There are several types of policy filters built into CopyStorm Snapshot.

* [All Changes](/reference/archive-tab/archive-policy-editor/policy-filter-rules/all-changes-filter-rule.md) — this filter always indicates that a record should be processed. Use it when all changes to records should be snapshot.
* [Column Expression](/reference/archive-tab/archive-policy-editor/policy-filter-rules/column-expression-filter-rule.md) — with this filter a rich expression based on columns in a record can be used to determine if a record should be snapshot.
* [Deleted Records](/reference/archive-tab/archive-policy-editor/policy-filter-rules/deleted-records-filter-rule.md) — this filter only matches records that have been deleted in Salesforce. This filter is used to build recycle bin type policies.
* [SQL Predicate](/reference/archive-tab/archive-policy-editor/policy-filter-rules/sql-predicate-filter-rule.md) — this advanced filter supports injecting user specific SQL fragments into a query that determines if a record should be snapshot.

The Filter Rule for a Snapshot Policy is specified on the *Main Tab* of the snapshot editor.

Parameters specific to the selected *Filter Rule Type* can be set on the *Filter Rule Parameters* tab.

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

## White and Black Lists

Nearly all Filter Rule Types support the concept of a White and/or Black list for selecting the tables to be processed by the policy.

* A White List indicates tables to include in the snapshot.
* A Black List indicates tables to exclude from the snapshot. All tables not on the black list will be included.

Typically the technique used for selecting tables for a snapshot is either by White List or Black List. However, if you are brave (and using regular expressions) both a White and Black list may be useful.

The following example (from the *All Changes* filter rule type) illustrate the components of the White/Black list editor.

* The pull-down menu indicates whether tables should be selected by White list, Black list, or both.

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

The dialog for selecting tables is nearly the same for a White or Black list. The following example is for a White list.

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