> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.textit.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Searching for Contacts

In addition to searching for contacts by name or phone number, you can place queries in the search bar on your contacts tab or in the ['Start Flow'](/en/article/starting-contacts-in-a-flow-based-on-a-search-1lnu6aa/) dialogue to search for contacts based on the values in their [contact fields](/en/article/how-do-i-manage-contact-fields-1t91ubk/). 

## Queries

The query you enter will operate on all contact fields present in your account. Note that fields and values are not case sensitive within a query. 

![](https://storage.crisp.chat/users/helpdesk/website/7a9fc4558a9de000/screen-shot-2023-05-30-at-1037_j3cuuj.png)

### Operators

To find contacts that match a contact field search, use *equal* `=`  For example `hair = "blonde"`  

For searches between two numbers, use *greater than or equal to* `>=` and *less than or equal to* `<=` Example: `age >= "18" AND age <= "30"` 

To search for *not equal*, use `!=`  Example: `student_id != 001`

Note that with contact fields containing two or more words, spaces need to be replaced with underscores, e.g. `id_number = 409328`

For names and URNs (phone numbers) you can use the `~` or `has` operator. This will search for a substring, e.g. `tel ~ "779"`  

To find empty fields, you can use `""` such as `fields.gender = ""` which will find contacts with their gender field empty. On the other hand, `!=""` will find fields that are \*not \*empty; i.g.,  `fields.gender != ""` will find contacts with their gender field *not* empty, or gender set to something.
### Statements

You can use `OR` statements to match two or more contact field values, and `AND` statements to filter contacts by contact field.  
  
For example, `city = "Oakland" or city = "Berkeley"`  will return only those contacts whose 'City' contact field contains "Oakland" or "Berkeley", and `(city="Oakland" and gender="Male"` will return only those contacts whose 'City' contact field contains "Oakland" and whose "Gender" contact field contains "Male".  
  
`tel has "123"` will return only those contacts whose phone number contains '123'.  
  
`name has "Be"` will return only those contacts whose 'Name' field contains 'Be'.  

## Field Types

*Text* values containing multiple words must be enclosed in quotation marks, e.g.  
`state = "san francisco"` , while operators like `>=`  only work with *Numeric* and *Date & Time* values.  

![](https://storage.crisp.chat/users/helpdesk/website/-/7/a/9/f/7a9fc4558a9de000/screenshot-2026-08-03-at-14442_197fauc.png)
## Smart Groups

Groups resulting from queries are called [Smart Groups](https://help.textit.com/en/article/smart-contact-groups-ib7uwm/). Smart groups, previously called "dynamic", are unique in that they will continue to collect contacts who match the query that created them.  

### Creating a Smart Group

Once you enter a query, the platform will return of contacts who match it: 

You can save this new group by clicking the **Create Smart Group** on the right hand side:  

![](https://storage.crisp.chat/users/helpdesk/website/-/7/a/9/f/7a9fc4558a9de000/screenshot-2026-08-03-at-14242_kaaubu.png)

Once a smart group is saved, any new contacts that match the query will be automatically placed in it.