> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create Filters

To start with, let’s go through how to create a filter for customers.

Go to **Customer Data Platform** → **Customers**:

<img src="https://mintcdn.com/maestraio/8PKiDbR3rMJsCzSE/images/imported/00_newCreateFilter.png?fit=max&auto=format&n=8PKiDbR3rMJsCzSE&q=85&s=ef6d1f6ff9bf0f58b187d631eb615ba0" alt="00_newCreateFilter" width="2912" height="722" data-path="images/imported/00_newCreateFilter.png" />

The filter conditions field contains the **Add AND condition** and **Add OR conditions** buttons.

<Note>
  **AND condition.**
  ​

  Use the **AND** condition when **all filter conditions must be true** for a customer to qualify.

  ​**Example:**
  If you want customers with a **valid email AND an active subscription**, both conditions are required.
  A customer with a valid email but no subscription **will not qualify**.
</Note>

<Note>
  **OR condition.**
  ​

  Use the **OR** condition when **at least one condition must be true** for a customer to qualify.

  ​**Example:**
  If you want to find customers who purchased a **hat OR a scarf**, the filter will include:

  * customers who purchased a hat
  * customers who purchased a scarf
  * customers who purchased both
</Note>

Below the buttons on the left, you can see the total customer database size — in our case, it's 22,914 customers.

## How to add AND condition

Click on the **Add AND condition** field. A dropdown menu will appear with a list of customer attributes you can filter by. At the top, you’ll see standard profile properties (e.g. name, gender, birthday), followed by grouped property categories (e.g. custom fields, orders and product lists).

<img src="https://mintcdn.com/maestraio/-w5Ud9QNiG7Y4nor/images/imported/01_newCreateFilter.png?fit=max&auto=format&n=-w5Ud9QNiG7Y4nor&q=85&s=30f595d27ca3c5e28eadcf37d14041ee" alt="01_newCreateFilter" width="2530" height="1310" data-path="images/imported/01_newCreateFilter.png" />

Click a group name to reveal related filter options:

<img src="https://mintcdn.com/maestraio/59KyfifOW7tLz5QR/images/imported/02_-20newCreateFilter.png?fit=max&auto=format&n=59KyfifOW7tLz5QR&q=85&s=8a4f65379508e8ad2eb775e266fed71e" alt="02_ newCreateFilter" width="2034" height="1278" data-path="images/imported/02_-20newCreateFilter.png" />

After selecting a filter, fill in any additional settings if available.

For example, if you select the **Subscription** condition, additional fields will appear where you can specify the brand (if you have more then 1), channel and topic:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/03_newCreateFilter.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=c7c62d7f02bdcdbbdd9ba982888541a4" alt="03_newCreateFilter" width="2918" height="964" data-path="images/imported/03_newCreateFilter.png" />

Once you’ve filled in all the required fields, click the **Add condition** button:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/04_newCreateFilter.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=4b209e6ad22747f0010ab6ed5c6dda4d" alt="04_newCreateFilter" width="2900" height="1238" data-path="images/imported/04_newCreateFilter.png" />

Click **Apply** to save the condition(s) you selected. The system will display the filtered customers and their total number:

<img src="https://mintcdn.com/maestraio/5322-upQA3cGdluA/images/imported/05_newCreateFilter.png?fit=max&auto=format&n=5322-upQA3cGdluA&q=85&s=9548f1c94130d5f6d0b61c2edb95d693" alt="05_newCreateFilter" width="2906" height="856" data-path="images/imported/05_newCreateFilter.png" />

<Tip>
  AND conditions are connected by a light blue branching line (connector).

  <img src="https://mintcdn.com/maestraio/5322-upQA3cGdluA/images/imported/06_newcustomerfilter.png?fit=max&auto=format&n=5322-upQA3cGdluA&q=85&s=473ee7e5a4304f27d87376feaeea0028" alt="06_newcustomerfilter" width="2882" height="552" data-path="images/imported/06_newcustomerfilter.png" />

  This condition means we want to find customers who have a valid, non-empty email AND a valid non-empty phone number AND a filled-in name.
</Tip>

## How to add OR condition

Use this feature when you want to match customers who meet any of the selected conditions.

For example, to create a segment of customers with valid emails OR valid phone numbers, follow these steps:

1. Click **Add OR condition**

2. Click **Add AND condition** → **Email**, and select the "**not empty and valid**" from the dropdown on the right. After that, click **Add condition**.

3. Then, on the same panel below click **Add condition** → **Phone number** and select the "**not empty and valid**" from the dropdown on the right. Click **Add condition**.

4. Finally, click **Apply**.

For more details on how to create filters with OR conditions, please refer to this article.

<Tip>
  OR conditions are connected by a lilac branching line (connector).

  <img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/07_newcustomerfilter.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=47f37e25f7981d80a9d29e5c8ffe021c" alt="07_newcustomerfilter" width="2906" height="478" data-path="images/imported/07_newcustomerfilter.png" />

  This condition means we want to find customers who either have a filled-in valid email OR have a filled-in valid phone number. Satisfying at least one of these two conditions is sufficient.
</Tip>

## How to add a nested condition

A field may contain additional conditions.

The main condition and its more detailed nested condition are linked by a blue line of different levels.

For example, to find customers who have placed an order and whose order value exceeds \$100 and whose previous orders have been fully paid select the following conditions:

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/07_createfilter.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=3207f470fa5120440cd5c76a50741223" alt="07_createfilter" width="2572" height="818" data-path="images/imported/07_createfilter.png" />

To apply additional conditions, click **+** next to the relevant condition.

To apply nested conditions, click the links of the adjacent conditions.

For example, to make the **Status** condition more detailed with a nested order line condition, you can choose from the following two options:

1. Click **+**:

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/08_createfilter.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=be5d42146e875a342532060dade3ee7a" alt="08_createfilter" width="1982" height="1024" data-path="images/imported/08_createfilter.png" />

2. Click on the side line:

<img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/09_createfilter.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=dc3788f212b4bfc7b7065a9c2cc7a2b3" alt="09_createfilter" width="1980" height="800" data-path="images/imported/09_createfilter.png" />

## Search

You can look up the required field using its name:

<img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/10_createfilter.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=7c26811e4d3353718a039c57801d1130" alt="10_createfilter" width="1542" height="566" data-path="images/imported/10_createfilter.png" />

### Cross-search through nested conditions

You can find the field you need among the list of nested conditions.

For example, if you want to find an **Action template** condition which is nested in the **Customer action field**, one way to do this would be to select **Actions** → **Customer action** → **Action template**:

<img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/11_createfilter.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=3da0257f38a819d7cd347a7821adda99" alt="11_createfilter" width="1956" height="1112" data-path="images/imported/11_createfilter.png" />

But you can also do this in one step if you use the search bar — simply start typing the field name in the Condition name field and click on the line you’re looking for:

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/12_createfilter.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=f7f6f64188c4660654ccec2e739b3b5c" alt="12_createfilter" width="1186" height="1290" data-path="images/imported/12_createfilter.png" />

<Note>
  The cross-search function works across first- and second-level nested fields only.
</Note>
