# Filter conditions and operators

Every condition is one row: a **field** (what you look at), an **operator** (the test) and a **value**. For example, "Status **Equal to** Open" or "Phone **Starts with** +60".

![An operator list in the conversation filter, with a one-line meaning under each choice](../../.gitbook/assets/guides/filter-operator-meanings.jpg){ width="408" }

Each operator shows its meaning under its name while you pick. You build conditions in five places:

| Where | Saved as |
|---|---|
| **Conversations → Filter** | **Folders** |
| **Contacts → Filter** | **Segments** |
| **Settings → Automation**, a rule's conditions | the rule |
| A blasting's **Audience** step, **Filter contacts** | the blasting |
| **Settings → Message Sequences**, a step's conditions | the sequence |

![The Filter contacts dialog](../../.gitbook/assets/guides/filter-contacts-dialog.jpg)

## Text fields

Names, email addresses, phone numbers, message text and text attributes offer these operators.

| Operator | Meaning | Example |
| --- | --- | --- |
| **Equal to** | Matches only this exact value | Email **Equal to** `ali@example.com` |
| **Not equal to** | Matches anything except this value | Name **Not equal to** `Test` |
| **Contains** | Matches if the text appears anywhere in the field | Message **Contains** `invoice` |
| **Does not contain** | Matches if the text appears nowhere in the field | Name **Does not contain** `test` |
| **Starts with** | Matches if the field begins with this text | Phone **Starts with** `+60` |

## Pick-one fields

Status, inbox, assignee, team, priority, country and list attributes have a fixed set of values, so the operators are simpler.

| Operator | Meaning | Example |
| --- | --- | --- |
| **Equal to** | Matches only this exact value | Status **Equal to** Open |
| **Not equal to** | Matches anything except this value | Inbox **Not equal to** Sales |
| **Is present** | Matches when the field has any value | Assignee **Is present** (someone owns the chat) |
| **Is not present** | Matches when the field is empty | Assignee **Is not present** (nobody owns it yet) |

## Labels

![Label operators: Has any of, Has none of, Is present, Is not present](../../.gitbook/assets/guides/filter-labels-operators.jpg)

A record can carry several labels, so label conditions test membership.

| Operator | Meaning | Example |
| --- | --- | --- |
| **Has any of** | Matches if at least one selected label is on the record | Labels **Has any of** VIP, Reseller |
| **Has none of** | Matches only if none of the selected labels are on the record | Labels **Has none of** Spam |
| **Is present** | Matches when the record has at least one label | — |
| **Is not present** | Matches when the record has no labels at all | — |

## Numbers

Number attributes add two comparisons to the pick-one set.

| Operator | Meaning | Example |
| --- | --- | --- |
| **Is greater than** | Matches numbers above this value | Order total **Is greater than** 500 |
| **Is less than** | Matches numbers below this value | Seats **Is less than** 3 |

## Dates

**Created at**, **Last activity** and date attributes use the same two comparisons, read as time.

| Operator | Meaning | Example |
| --- | --- | --- |
| **Is greater than** | Matches dates after the one you pick | Created at **Is greater than** 1 Sep |
| **Is less than** | Matches dates before the one you pick | Last activity **Is less than** 1 Sep |
| **Is x days before** | Matches dates more than this many days ago | Last activity **Is x days before** 7 (quiet for over a week) |
| **Is present** / **Is not present** | The date is set, or empty | Birthday **Is present** |

Message sequence conditions add a few date operators of their own, because the check happens when a message is due to go out, not when you write the condition:

| Operator | Meaning |
| --- | --- |
| **Is in the future** | Matches dates after today, checked when the message is due |
| **Is in the past** | Matches dates before today, checked when the message is due |
| **Is before** / **Is after** | For the current date: matches when today is before, or after, the date you pick |

## Automation events that watch for a change

![The Add Automation Rule dialog with its Conditions row](../../.gitbook/assets/guides/filter-automation-conditions.jpg){ width="620" }

Rules that run on **Attribute Changed** test the change itself, not a stored value.

| Operator | Meaning |
| --- | --- |
| **Label added** | Fires when this label is added to the conversation |
| **Label removed** | Fires when this label is removed from the conversation |
| **Changed to** | Fires when the field changes to this value |

## Blasting audience

When you choose **Filter contacts** as the audience, you can also filter by what people were already sent.

| Operator | Meaning |
| --- | --- |
| **has received any of** | Contacts who were sent at least one of the selected blastings, WhatsApp templates or message sequences |
| **has not received any of** | Contacts who were sent none of the selected items |

## Combining conditions with AND and OR

Each condition row ends with a connector to the next row.

* **AND** means every condition must match.
* **OR** means any one condition is enough.

"Status **Equal to** Open **AND** Labels **Has any of** VIP" finds open VIP chats. "Labels **Has any of** VIP **OR** Priority **Equal to** Urgent" finds chats that are either VIP or urgent, or both.

## Worked examples

* **Customers who went quiet.** In **Contacts → Filter**: Last activity **Is x days before** 7, **AND** Labels **Has any of** Hot lead. Save it as a segment and use it as a blasting audience.
* **Unowned chats waiting right now.** In **Conversations → Filter**: Status **Equal to** Open, **AND** Assignee **Is not present**. Save it as a folder for the team lead.
* **Route billing questions.** In **Settings → Automation**, on **Message Created**: Message **Contains** `invoice` → assign the Billing team.

## Related

* [Searching, filtering and segments](/contacts/searching-filtering-and-segments)
* [Conversation folders explained](/conversations/conversation-folders-explained)
* [Labels, attributes and automation](/settings/labels-attributes-and-automation)
* [Creating and scheduling a blasting](/campaigns/creating-and-scheduling-a-campaign)
* [Message Sequences](/campaigns/message-sequences)

---
Source: https://help.mampuai.com/settings/filter-conditions-and-operators
