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

# Filters

> Selecting subscribers by conditions: quick chat list filters, the condition builder, saved filters and reusing them in broadcasts and the funnel.

A filter is a set of conditions a subscriber must meet to fall into a selection. With it you narrow the chat
list down to the people you need: "those who registered but made no deposit", "deposits from 10 dollars",
"subscribers from RU without tags" and so on.

Filters are not a separate menu item. They live inside other sections and are assembled everywhere by the same
condition builder.

> [card] [Messenger](https://docs.botflow.cc/en/messenger.md)
>
> Chat list modes, quick funnel filters and saved filters above the list of dialogs.

> [card] [Subscribers](https://docs.botflow.cc/en/subscribers.md)
>
> The whole subscriber table with the same condition builder over its columns.

> [card] [Flow builder](https://docs.botflow.cc/en/constructor.md)
>
> The "Condition" block splits subscribers inside the funnel into branches, and each branch's condition is assembled by the same builder.

> [card] [Broadcasts](https://docs.botflow.cc/en/broadcasts.md)
>
> A broadcast audience is set by a saved filter or by one assembled in the wizard.

An assembled condition can be **saved under a name**. Assemble it once, give it a name, and you reuse it in
[broadcasts](https://docs.botflow.cc/en/broadcasts.md) as an audience and in the "Condition" block of the
[flow builder](https://docs.botflow.cc/en/constructor.md) as a branch, without building it again.

## Quick chat list filters

In the [Messenger](https://docs.botflow.cc/en/messenger.md), above the chat list, there are ready filters that need no setup. The
sliders button to the right of the search opens a menu with five modes. Exactly one is always active.

| Mode | What it shows |
| - | - |
| All chats | every dialog of the bot |
| Unread | dialogs with unread incoming messages |
| AI | dialogs the [AI operator](https://docs.botflow.cc/en/ai-operator.md) is running right now |
| Agent | dialogs switched to manual mode |
| Blocked | subscribers who blocked the bot |

A [Telegram account](https://docs.botflow.cc/en/telegram-accounts.md) has three modes, as in Telegram: "All chats", "Unread" and "Archived Chats". A filter works within the chosen mode: in "Archived Chats" it selects among the archived chats.

### Quick funnel filters

Above the list there is a strip of quick filters by the sales funnel. Their names are the same in every
interface language.

* `All`: every chat.
* `Reg`: a registration event exists.
* `FD`: a first deposit happened.
* `RD`: a repeat deposit happened.
* `Deposits`: total deposits above zero.
* `<$5`, `$5–10`, `$10–100`, `>$100`: slices by deposit amount.

The same strip shows the saved filters of this bot, and the "Filter" button at the end of the row opens the
condition builder. The list mode combines with the rest of the selection, while a quick filter, a saved filter
and your own condition replace one another.

## Condition builder

The "Filter" button (in "Messages") or "Add filter" (in "Subscribers") opens the "Subscriber filter" panel.
Here you assemble a condition from separate rows.

Each row has three parts:

1. **Field**: what we filter by (country, total deposits, tags and so on).
2. **Operator**: how we compare (equals, greater than, contains, in the last N days).
3. **Value**: what we compare with. Some operators ("is empty", "is not empty") need no value.

**1. Add the first condition**

Press "Add condition", pick a field from the list, then an operator, and set a value.

**2. Add more conditions to the group**

Conditions inside one group are joined by the "AND" / "OR" switch. "AND" requires all of them at once, "OR" is satisfied by any single one.

**3. Add a second group**

A rule like "(A and B) or C" is assembled as two groups: A and B joined by "AND" in the first, C in the second. Groups are always joined by "OR" between themselves.

**4. Apply**

Press "Apply". The chat list or the subscriber table rebuilds itself around your condition.

**5. Check the counter**

In the ["Subscribers"](https://docs.botflow.cc/en/subscribers.md) section, next to the applied filter you see how many subscribers match: "N subscribers" or "N / T", where T is all subscribers of the bot. The ["Messages"](https://docs.botflow.cc/en/messenger.md) section has no counter: the result shows right in the chat list.

> [!NOTE]
>
> One filter holds up to 50 conditions, and unfilled rows count too. At the limit the "Add condition" and "Add group"
> buttons switch off and "Reached the limit of 50 conditions" appears next to them. One condition takes up to 500
> values, and a "Saved filter" condition up to 25 filters. At the limit no more values are added, the pasted ones past it stay in the input field, and "Reached the
> limit of 500 values" or "Reached the limit of 25 values" appears. An "in the last" condition takes from 1 to
> 36,500 days.

### Which fields are available

Fields are grouped in the dropdown list.

| Group | Fields |
| - | - |
| Subscriber | Telegram ID, Username, First name, Last name, Country, Start parameter, Telegram language, Date of birth, Has avatar, Subscribed at, Blocked by bot, Blocked at, Blocked by admin, Blocked by admin at, [Tags](https://docs.botflow.cc/en/tags.md) |
| Deposits | Has registration, Registration date, Made FTD, First FTD date, Last FTD date, Repeat deposit, Deposits amount, FTD amount, Repeat deposits amount, Deposits count, Conversions, Made a withdrawal |
| Saved filters | A saved filter as a condition |
| Traffic | Click country, City, Region, Click language, Device, Source kind, Campaign, UTM source, FB campaign, FB adset, FB ad, FB campaign name, FB adset name, Proxy / VPN, Proxy type, Sub1-Sub5 |
| Dialog | Last message at, Last message direction, Unread count |
| Funnel | Funnel block |
| Activity | Last activity |
| Variables | Your [bot variables](https://docs.botflow.cc/en/variables.md) with a per-subscriber value; they are listed under their own names |

> [!NOTE]
>
> Funnel events (registration, FTD, RD) come from the [tracker](https://docs.botflow.cc/en/tracker.md) and are ready to use in the Deposits group as separate conditions. You don't need to count them yourself.

### For a Telegram account

A [Telegram account](https://docs.botflow.cc/en/telegram-accounts.md) has no fields its conversations have no data for: the Traffic group, "Start parameter", "Telegram language", "Date of birth", "Blocked by bot", "Blocked at", "Blocked by admin", "Blocked by admin at", the Funnel group and variables. It has the "User blocked" and "User blocked at" fields instead.

Some fields are counted the account's own way:

* **Subscribed at.** The moment BotFlow first recorded the chat. For the chats found when the account was connected, it is the time of the connection.
* **Last activity.** By the incoming messages of the person.
* **Unread count.** The number of unread incoming messages. A chat marked as unread by hand in Telegram does not count.
* **Has avatar.** By the profile photo of the person that the account sees.
* **User blocked.** The account blocked the person in Telegram, from BotFlow or from the phone, including blocks made before the account was connected to BotFlow.

### Operators

The set of operators depends on the field type.

| Field type | Operators |
| - | - |
| Text ("First name", "Country", "Device", `sub1`, variables) | equals, not equal, contains, does not contain, starts with, ends with, any of, none of, is empty, is not empty |
| Number ("Deposits amount", "FTD amount", "Deposits count") | equals, not equal, greater than, greater or equal, less than, less or equal, between |
| Date ("Subscribed at", "First FTD date") | greater or equal, less or equal, between, in the last, is empty, is not empty |
| Yes / No ("Made FTD", "Blocked by bot") | equals |
| Value list ("Campaign", "Source kind", "Funnel block") | any of, none of, equals, not equal, is empty, is not empty |
| "Telegram ID" | equals, not equal, any of, none of |
| "Saved filter" | any of, none of, equals, not equal |
| [Tags](https://docs.botflow.cc/en/tags.md) | has any of, has all of, has none of, has only these, no tags, has tags |

> [!TIP]
>
> The "any of" operator is handy when there are several values: enter `RU, US, KZ`, pressing Enter after each, and subscribers from any of those countries fall into the selection.

## Saving a filter

An assembled condition can be saved under a name and reused. In the filter panel press "Save as…", enter a name
in the "Filter name" field (for example, `VIP with FTD`) and press "Save". For a filter that is already saved,
"Update saved" appears next to it.

What matters about saved filters:

* A filter belongs to the **bot** or Telegram account and is visible to the whole team that has access to it.
* Operators and roles above them can create, rename and delete filters.
* Favorite filters are marked with a star and float to the start of the strip. Favorites are shared across the team.
* Up to 50 filters can be stored per bot or Telegram account.

> [!WARNING]
>
> Deleting a filter cannot be undone. Conversations and subscribers stay where they are, only the saved set of conditions is deleted. Broadcasts that already started with this filter keep their audience: it is frozen at launch. Branches of a "Condition" block in the [flow builder](https://docs.botflow.cc/en/constructor.md) built on a deleted filter, however, stop finding anyone, and subscribers go down the default branch. Check your funnels before deleting a filter.

## Reusing filters

A saved filter is chosen as the audience in [broadcasts](https://docs.botflow.cc/en/broadcasts.md): on the audience step pick a saved
filter or assemble a new one right in the wizard with the same builder.

Inside a funnel the same conditions work in the "Condition" block of the [flow builder](https://docs.botflow.cc/en/constructor.md): it
checks branches top to bottom and immediately leads the subscriber down the first matching one, for example
those with a deposit to a personal offer and everybody else to the general menu.

> [card] [Broadcasts](https://docs.botflow.cc/en/broadcasts.md)
>
> Mass or scheduled sending by a saved filter or one assembled on the spot.

> [card] [Tags](https://docs.botflow.cc/en/tags.md)
>
> Manual and automatic subscriber tags, handy for building audiences.

> [!NOTE]
>
> Before a broadcast starts the wizard shows how many subscribers fall into the chosen audience. It is the same live counter as in the condition builder.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.