> 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.

![](/files/KfD1B3MR8txwS0tL4sU5)

## 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.

![](/files/JDzzllsO7Ppa11XiE1dJ)

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

![](/files/4Azi92qImZUJiAjQCFJi)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.capstorm.com/reference/archive-tab/archive-policy-editor/policy-filter-rules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
