Contact search examples

Neelke Stadler Updated by Neelke Stadler

Contact search is powerful! Let's show you all the possibilities.

None of us appreciate unsolicited messaging. Therefore, when we talk about sending reminders to contacts we have to reiterate that WhatsApp makes it extremely easy for users to block businesses. And blocking result in message limitations. We cannot emphasise enough how important it is to make sure you initiate only relevant conversations with people that expect to hear from you.

Let's take a look at how to search for specific contacts so that you find the right people to initiate a conversation with.

1. Search within a specific contact field

The best way to search is to specify the name of the contact field in your search query. To refer to a contact field you have to prefix it with @, for example @name is an instruction to search within the name contact field. Once you start typing you will see the available contact fields in a list and be able to select the field you are interested in. You will see the field show as @contact.name after selection.

Here's a list of possible ways to search and how to express those in the search query.

  • where the name field contains Alice: @name:Alice
  • where the name field contains the exact phrase "john smith": @name:"John Smith"
  • where the appointment_day field contains Monday or Tuesday: @appointment_day:(monday OR tuesday)
  • where the name field is pippa, neelke or smn and the phone number starts with 27: (@whatsapp_profile_name:pippa or @whatsapp_profile_name:neelke or @whatsapp_profile_name:smn) and @whatsapp_id:27*. Note the use of brackets when using AND and OR operators together.

You can also do advance searches such as:

  • where any of the fields appointment_first, appointment_second or appointment_third contains Monday or Tuesday (note how we need to put backslash before the *): @appointment\*:(monday OR tuesday)
  • where the field language is NOT English: NOT @language:english
  • where the field opted_in has any non-null value, e.g. _exists_:@contact.opted_in
  • where the field opted_id has null values, NOT _exists_:@contact.opted_in
  • if you want to find all contacts: *

2. Search within a range on date fields

Ranges can be specified for date fields. Inclusive ranges are specified with square brackets [min TO max] and exclusive ranges with curly brackets {min TO max}.

  • where the appointment_date is any date before 2022: contact.appointment_date:[* TO 2022-12-31]
  • where the appointment_date fields is any date in 2022 or 2023: contact.appointment_date:[2022-01-01 TO 2023-12-31]

3. Search using wildcard operators

Wildcard searches can be run on individual terms, using ? to replace a single character, and * to replace zero or more characters, for example to find all contacts with South African phone numbers you can search for@whatsapp_id:27* where 27 represents the South African country code.

4. Search across all contact fields

You can type anything in the search bar and see what happens. It will search across the information in ALL your contact fields. If you have a large user base this is NOT the recommended way to search.

Was this article helpful?

How many people can I send Reminders to?

Understanding Reminders' statuses and stats

Contact