Skip to main content

How to set up Filters in rules

Summary

Filters in Rules allow you to automate responses in Wati based on specific conditions such as keywords, contact details, or message timing. By applying filters, you can ensure the right automation runs only when the defined conditions are met.

This guide explains the supported filters available in Rules, how to configure them, and how to combine multiple conditions to create more precise automations.

Instructions

Supported filters

You can use the following filters when creating Rules in Wati.

1. Incoming message matches keyword(s)

This filter checks whether an incoming message contains specific keywords.

Common use cases

  • Send an automatic reply when a message contains words such as “help”, “order”, or “pricing”.

  • Route conversations based on specific customer requests.

2. Contact initiates a new chat

This filter detects whether a message starts a new conversation, rather than being a reply in an existing chat.

Common use cases

  • Send a welcome message only when a customer starts a new conversation.

  • Trigger onboarding messages for first-time interactions.

3. Timestamp

This filter checks when a message is received.

Common use cases

  • Send out-of-office replies for messages received outside working hours.

  • Apply different responses during business hours vs after hours.

4. No keyword matches

This filter ensures that the rule runs only when no other keyword-based rules apply.

Note:

  • The No keyword rule(s) matches filter works together with the Contact initiates a new chat filter.

  • Once you add Contact initiates a new chat filter, you can define AND logic for the No keyword rule(s) matches condition.

Common use cases

  • Send a fallback response when a message does not match any predefined keyword rules.

5. Contact

This filter checks whether the sender already exists in your contact list.

Common use cases

  • Send different responses to new leads and existing customers.

  • Trigger onboarding messages for new contacts.

6. Contact attributes

This filter matches rules based on specific contact attributes such as location, tags, or custom fields.

Common use cases

  • Personalize responses for VIP customers.

  • Segment customers by region, purchase history, or account status.

Tip: Have a filter request? Share your suggestions here (e.g., chat status, tags).

7. Incoming message contains media

Continues the rule only when the incoming message has an attachment — an image, video, audio file, voice note, document or sticker.

After you select this filter, choose one of two options:

  • Contains media — the rule continues only for messages that have an attachment.

  • Does not contain media — the rule continues only for messages with no attachment, such as plain text.

A location pin, a contact card and an order are not counted as media. If you want your rule to act on those, use the Message type filter instead.

8. Message type

Continues the rule only when the incoming message is one of the types you tick. Tick as many as you need:

  • Text, Image, Video, Audio file, Voice note, Document, Sticker, Location, Contact Card, Order

Tick at least one type — the rule cannot be saved with none selected. When you tick several types, the rule continues if the message matches any one of them.

How to add filters to rules

Single condition

A single condition triggers an action when one specific rule is met.

Steps

  • Select the attribute you want to filter by (for example, source_url).

  • Define the value to match (for example, “contains sample.com”).

Example

IF source contains "sample.com" → Trigger action

Multiple AND conditions

Use AND conditions when you want the rule to run only if all conditions are true.

  • Add your first filter condition.

  • Click And.

  • Add another condition.

Example

IF source contains "sample.com" AND country contains India → Trigger action

This rule will trigger only when both conditions are satisfied.

Multiple OR conditions

Use OR conditions when you want the rule to run if any one of the conditions is true.

  • Add your first filter condition.

  • Click Or.

  • Add an alternative condition.

Example

IF source_url contains "sample.com" OR name contains "john" → Trigger action

This rule will trigger if either condition is met.

Example: combining the new filters

You can combine these filters with any other filter using AND and OR. For example, to send invoices straight to your finance team:

  • Trigger: New WhatsApp message is received.

  • Filter: Incoming message contains media → Contains media.

  • Add an and condition: Incoming message matches keyword(s) → Contains → invoice.

  • Action: Assign to team → Finance.

The rule now runs only when a customer sends an attachment with the word invoice in the caption.

Advanced usage

Combining AND and OR conditions

You can combine multiple conditions to build more advanced automation rules.

Example

IF (source_url contains "sample.com" AND vip_customer is true) OR shop_name is "Cafe" OR address contains "India" → Trigger action

This rule triggers when any of the defined condition groups are satisfied.

Tailoring responses for different audiences

Filters can also be used to send different responses based on whether a contact is new or existing.

Example

IF message contains "hello" AND contact does not exist → Send welcome message  IF message contains "hello" AND contact exists → Send personalized reply

In this scenario, the welcome message is sent only when a new customer sends “hello”, while existing customers receive a different response.

Next steps

After setting up your filters:

  • Test your rules using sample messages to confirm they trigger correctly.

  • Combine filters with automated actions such as:

    • Tagging contacts

    • Assigning chats

    • Sending automated responses

Using filters effectively helps you create more accurate, personalized, and scalable automations in Wati.

Frequently Asked Questions (FAQs)

Filter Types

1. What are filters in Wati Rules?

Filters are conditions that determine whether a Wati Rule should continue and perform its configured action. Filters can use conditions such as keywords, contact details, message timing, media, and message type.

2. What is the Incoming message matches keyword(s) filter?

The Incoming message matches keyword(s) filter checks whether an incoming message contains specific keywords. It can be used to send automatic replies or route conversations based on customer requests.

3. What does the Contact initiates a new chat filter do?

The Contact initiates a new chat filter detects whether a message starts a new conversation rather than being a reply in an existing chat. It can be used to send welcome messages or trigger onboarding messages when a customer starts a new conversation.

4. What does the Timestamp filter do?

The Timestamp filter checks when a message is received. It can be used to send out-of-office replies outside working hours or apply different responses during and after business hours.

5. What does the No keyword matches filter do?

The No keyword rule(s) matches filter ensures that a rule runs only when no other keyword-based rules apply. It can be used to send a fallback response when a message does not match any predefined keyword rules.

6. What does the Contact filter do?

The Contact filter checks whether the sender already exists in the contact list. It can be used to apply different responses to new leads and existing customers.

7. What does the Contact attributes filter do?

The Contact attributes filter matches rules based on specific contact attributes, such as location, tags, or custom fields. It can be used to personalize responses or segment customers based on information such as region, purchase history, or account status.

8. What does the Incoming message contains media filter do?

The Incoming message contains media filter continues the rule only when an incoming message has an attachment, such as an image, video, audio file, voice note, document, or sticker.

The filter has two options:

  • Contains media: The rule continues only when the message has an attachment.

  • Does not contain media: The rule continues only when the message has no attachment, such as a plain text message.

Location pins, contact cards, and orders are not counted as media. To filter for these message types, use the Message type filter.

9. What does the Message type filter do?

The Message type filter continues the rule only when the incoming message matches one of the selected types. Available message types are Text, Image, Video, Audio file, Voice note, Document, Sticker, Location, Contact Card, and Order.

At least one message type must be selected. When multiple types are selected, the rule continues if the message matches any one of the selected types.

Combining Filters

10. Can I use AND and OR conditions when creating a rule?

Yes. You can combine multiple filter conditions using AND and OR logic.

  • AND: The rule runs only when all conditions are true.

  • OR: The rule runs when any one of the conditions is true.

For example, source contains "sample.com" AND country contains India requires both conditions to be satisfied, while source_url contains "sample.com" OR name contains "john" runs when either condition is satisfied.

11. Can I combine AND and OR conditions in the same rule?

Yes. You can combine multiple conditions using both AND and OR to create more advanced automation rules. For example, a rule can run when (source_url contains "sample.com" AND vip_customer is true) OR shop_name is "Cafe" OR address contains "India".

12. Can filters distinguish between new and existing contacts?

Yes. Filters can be used to send different responses depending on whether a contact exists. For example, a rule can send a welcome message when a new contact sends "hello" and send a personalized reply when an existing contact sends "hello".

Did this answer your question?