# Destination filters

With filters, you have the possibility to define some conditions. As a result, some events will be sent and some don't, according to your conditions.

## Simple filter

Use the drop down to select the property on which you want to filter, then select the operator and the value to filter on.

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-f77f055002c2762c6f74b30916290998a336e725%2FCapture%20d%E2%80%99e%CC%81cran%202023-03-15%20a%CC%80%2010.48.32.png?alt=media" alt=""><figcaption></figcaption></figure>

Available operators:

* is
* isn't
* match regex *(see also '*[*About regex*](#about-regex)*' section)*
* doesn't match the regex *(see also '*[*About regex*](#about-regex)*' section)*
* contains
* doesn't contain
* starts with
* doesn't start with
* ends with
* doesn't end with
* exists
* doesn't exist
* is empty

## Advanced filter

An "Advanced" filter can be used when a simple one is not sufficient.

The simple filter will be automatically transcribed into the advanced one, but the opposite is not possible, as advanced functions are not supported by the simple filter.

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-90dbf61e4ed04fd3c9c57ff0bd779af24324249c%2FCapture%20d%E2%80%99e%CC%81cran%202023-03-15%20a%CC%80%2010.50.15.png?alt=media" alt=""><figcaption><p>From simple filter...</p></figcaption></figure>

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-4e4cac23b197b6dc5dc8bf04aa0a7559da3b2898%2FCapture%20d%E2%80%99e%CC%81cran%202023-03-15%20a%CC%80%2010.50.31.png?alt=media" alt=""><figcaption><p>...to advanced filter</p></figcaption></figure>

With Advanced filter, you can use formula and advanced [functions](https://doc.commandersact.com/features/data-quality/data-cleansing/supported-transformation-functions), simply click on the button on the right of the field to see all available functions.

Supported operators:

* `= (equals to)`
* `> (smaller than)`
* `< (greater than)`
* `!= (different from)`

Supported conditions:

* `AND`
* `OR`

Supported functions:

{% content-ref url="../data-quality/data-cleansing/supported-transformation-functions" %}
[supported-transformation-functions](https://doc.commandersact.com/features/data-quality/data-cleansing/supported-transformation-functions)
{% endcontent-ref %}

{% hint style="info" %}
Always use " " to enter a value in advanced mode.\
All values entered without " " will be treated as a number.
{% endhint %}

### About Regex

Both simple and advanced filter can manage regex:

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-c6591ebc2647ef032448c9960790ca8c33d6fc60%2FCapture%20d%E2%80%99e%CC%81cran%202023-03-15%20a%CC%80%2017.07.25.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2Fgit-blob-b6f14820a3ed5271680ad9bfa6e5fb52bc4ae44a%2FCapture%20d%E2%80%99e%CC%81cran%202023-03-15%20a%CC%80%2017.07.44.png?alt=media" alt=""><figcaption></figcaption></figure>

To know how to build a regex, please refer to [regular expression documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).

## Consent filter

For clients using our CMP module: simply select the appropriate category in the drop down.

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2FhN5nCQQtDnEcb53gjmnw%2Fimage.png?alt=media&#x26;token=a04ccaad-2240-41e4-8d07-bfe0a3e264b1" alt=""><figcaption></figcaption></figure>

For clients using an external CMP: Simply enter the value as it is collected in the "user.consent\_categories" of your server side events.

Example:

<figure><img src="https://1259070148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mk6XpTQ2LaRLcr2tA-d%2Fuploads%2FD98JoMW298ipJofKXlLT%2Fimage.png?alt=media&#x26;token=61ab2243-da11-4222-98de-d252dd4379bf" alt=""><figcaption></figcaption></figure>
