Summary

Rule-based automation in Wati helps you automatically perform tasks based on events or schedules. You can create rules to send messages, update contact information, assign conversations, and perform other actions based on specific conditions.

Each rule is built using three core components: Triggers, Filters, and Actions. Wati supports two types of rules:

  • Event-based rules run when a specific event occurs, such as receiving a customer message.

  • Time-based rules run on a schedule and act on contacts that match the configured filters.

This guide explains how rule-based automation works, how to create your first rule, and how Wati determines the order in which automations run.

Instructions

Understanding rule-based automation in Wati

Wati rules can run when an event occurs or according to a schedule. Each rule uses triggers, filters, and actions to determine when and how automation runs.

Event-based rules

Event-based rules run when a specific event occurs, such as:

  • A customer sends a message.

  • A contact attribute is added.

  • A contact attribute is updated.

Time-based rules

Time-based rules run according to a configured schedule. When the rule runs, Wati checks contacts against the configured filters and performs the specified actions for contacts that match those conditions.

Important things to know about rules

  • WhatsApp number (channel): Each rule runs through one WhatsApp number (channel), selected in the trigger configuration.

  • Automation usage: Scanning contacts to check whether they match a rule's filters is free. Only an action executed for a contact counts toward your automation usage.

  • Separate rule tabs: The Rules page displays Event-based and Time-based rules in separate tabs.

  • Rule ordering: Event-based rules can be reordered to control their execution priority. Time-based rules cannot be reordered because they run according to their configured schedules and do not follow the priority order of event-based rules.

Understanding the building blocks of a rule

Rule-based automation works by connecting three elements that define when, why, and what should happen.

Trigger

A Trigger defines when a rule runs. Depending on the rule type, it can be an event, such as receiving a new message, or a schedule that runs at a configured time.

Examples of event-based triggers include:

  • A new message is received.

  • A contact attribute is added.

  • A contact attribute is updated.

Filter

A Filter defines the conditions that must be met for a rule to continue. Filters are optional and help narrow down which events or contacts should trigger an action.

For example, a filter can check:

  • Whether a message contains a specific keyword.

  • Whether a message has an image or document attached.

  • Whether a contact attribute has a specific value.

Action

An Action is the automated task that Wati performs after the trigger occurs and the filter conditions are met.

Examples of actions include:

  • Sending a template message

  • Updating contact attributes

  • Assigning a conversation

Steps to create a rule

Follow these steps to create your first automation rule in Wati:

1. Go to automation rules

  • Navigate to the Automation page.

  • Select the Rules tab from the left panel.

2. Create a new rule

  • Click Create new rule.

  • Select the Trigger you want to use.

3. Open the rule builder

After selecting a trigger, you will be taken to the Rule Builder page. Give an appropriate name for your rule before proceeding.

The Rule Builder allows you to configure the three components of your rule:

  • Trigger

  • Filter

  • Action

For this example, we will use the trigger New attribute is added to a contact.

4. Configure the trigger

  • Click the Trigger block.

  • Select the contact attribute you want the rule to monitor.

5. Add a filter (optional)

Filters let you narrow down when the rule should act. For example, you can set a filter so the rule only runs if a message contains a specific keyword or if a contact attribute has a particular value. If no filter is added, the rule runs for every contact that matches the trigger.

6. Add and configure the action

  • Click the Action block.

  • Choose the action you want the rule to perform.

For this example:

  • Select Send template message.

  • Choose the template you want to send automatically when the rule is triggered.

Wati will continue to add more automation actions over time to support additional use cases.

Example rule

Here is a simple example of how a rule works.

Scenario:

  • A new attribute country is added to a contact.

  • The attribute value contains the word "india".

Result:

Wati automatically sends a predefined wati_test template message to that contact.

This type of automation helps businesses instantly respond to customers based on their information or activity.

Understanding event-based rule execution order

Wati evaluates event-based rules from the top of the Event-based Rules list to the bottom. When multiple rules match the same incoming message, all matching rules run, with one exception: only one chatbot or AI agent can take the conversation.

If multiple matching rules contain a Chatbot or Astra AI Agent action, only the action in the highest matching rule takes effect. The chatbot or AI agent actions in lower matching rules are skipped, but their other actions continue to run.

For example, suppose these three rules match the same incoming message:

  1. Book an appointment – Starts a chatbot.

  2. Talk to support – Assigns the conversation to an AI agent.

  3. Save appointment date – Updates a contact attribute.

The Book an appointment rule takes priority because it appears highest in the list. The chatbot starts, and the Talk to support rule does not assign the conversation to an AI agent. However, the Save appointment date rule still updates the contact attribute.

If you want the AI agent to take the conversation instead, move Talk to support above Book an appointment in the Rules list.

Important notes:

  • New event-based rules are added to the top of the Rules list by default, giving them the highest priority.

  • Turning a rule off does not change its position. When you turn it back on, it retains the same position.

How to change the rule order

You can change the order of rules to control which chatbot or AI agent takes a conversation when multiple rules match.

  • Go to the Automation page and select the Rules tab.

  • Click Reorder.

  • Drag the rule to its new position in the list.

  • Click Save changes to save the new order.

Configure rule execution settings

Rule order execution settings let you control the order in which different types of automations run when multiple automations can respond to the same incoming message.

How to open Execution Settings

  • Go to Automation > Rules.

  • On the Event-based tab, click the settings icon next to Reorder.

  • Update the settings as needed, then click Save.

Good to know:

  • The settings icon is available only on the Event-based tab, not the Time-based tab.

  • The settings icon is disabled while you are in Reorder mode. Save or cancel your current reordering changes before opening Execution Settings.

  • Only Admins and Automation Managers can change these settings.

  • All 3 toggles are off by default, so your existing automation behavior stays the same until you change and save the settings.

1. Prioritize Quick-Reply First

This setting controls whether a Quick-Reply action runs before or after other automations when a contact taps a Quick-Reply button in a campaign.

  • Off (default): Rules and Keyword Actions run first. The Quick-Reply action runs afterward, unless the contact is currently inside a Chatbot.

  • On: The Quick-Reply action runs first, followed by Rules and Keyword Actions.

Stop After Button Interactions

This setting is available only when Prioritize Quick-Reply First is turned on. It controls whether other automations can run after a Quick-Reply action.

  • On: After the Quick-Reply action runs, no other automations run for that message.

  • Off (default): Rules, Keyword Actions, and Default Actions can run after the Quick-Reply action.

If a button tap does not trigger a Quick-Reply action, the other automations continue to run as usual.

2. Prioritize Rules Over Keyword Actions

This setting controls which automation runs first when an incoming message matches a Rule and a Keyword Action.

  • Off (default): Keyword Actions and Rules run in parallel.

  • On: Rules run first, followed by Keyword Actions. Both can run for the same message.

Resulting Automation Order

The window displays the final automation order based on your selected settings. Review the order before saving your changes.

Default Actions always run last when they are triggered as part of the automation flow.

Important notes for reorder execution settings

  • Chatbot contacts: Quick-Reply priority does not apply when a contact is currently inside a Chatbot. The Quick-Reply action does not run first for these contacts.

  • When changes take effect: Your changes apply to new incoming messages after you save them.

  • Reordering Rules: These settings control the order between different types of automations. To change the order of individual Rules, use Reorder.

When rules do not run

A rule does not run in the following situations:

  • The contact is currently in the middle of a chatbot.

Important: When a contact is actively engaging with a chatbot, their messages are handled by the chatbot. Rules triggered by messages, Keyword Actions, and Default Actions do not run while the chatbot is active. They start running again after the chatbot ends.

  • The rule is turned off.

  • The rule's trigger is not included in your Wati plan.

  • The chat is assigned to a human agent or AI agent, and the rule is triggered by an incoming message.

  • The conversation is blocked.

  • The trigger is an emoji reaction.

  • The rule uses an AI intent filter and your account has no Wati AI credits left.

Rules triggered by other events can still run while an agent is handling the chat. These include:

  • Contact attribute changes

  • Shopify events

  • Schedules

  • Missed calls

If one of these rules sends a message or starts a chatbot, the conversation moves from the assigned agent back to the bot.

To avoid interrupting an agent's conversation, use actions such as:

  • Route to team

  • Assign to operator

  • Update contact attribute

  • Notification

These actions leave the conversation with the assigned agent.

Time-based rules and execution priority

Time-based rules run according to their configured schedules and act on contacts that match their filters.

Unlike event-based rules, time-based rules cannot be reordered. Their execution is determined by their schedules, not their position in the Rules list.

Time-based rules are displayed separately from event-based rules under the Time-based tab on the Rules page.

Frequently Asked Questions (FAQs)

Understanding rule-based automation

1. What is rule-based automation in Wati?

Rule-based automation in Wati lets you automatically perform tasks based on specific events or schedules. You can create rules to send messages, update contact information, assign conversations, and perform other actions when configured conditions are met.

2. What are the 2 types of automation rules in Wati?

Wati supports 2 types of automation rules:

  • Event-based rules: Run when a specific event occurs, such as receiving a customer message or when a contact attribute is added or updated.

  • Time-based rules: Run according to a configured schedule and perform actions for contacts that match the rule's filters.

3. What are the 3 main components of an automation rule?

Every rule consists of 3 components:

  • Trigger: Defines when the rule runs.

  • Filter: Defines the conditions that must be met for the rule to continue. Filters are optional.

  • Action: Defines the task Wati performs when the trigger occurs and the filter conditions are met.

4. Do filters count toward automation usage?

No. Scanning contacts to check whether they match a rule's filters is free. Only an action executed for a contact counts toward your automation usage.

Creating and managing rules

5. How do I create an automation rule in Wati?

Go to Automation > Rules and click Create new rule. Select a trigger, give your rule a name, and configure the trigger in the Rule Builder. You can then add optional filters and choose the action you want Wati to perform. Save your rule when you're done.

6. Can I change the order in which automation rules run?

Yes. You can reorder event-based rules to control their execution priority. Go to Automation > Rules, click Reorder, drag the rule to its new position, and click Save changes.

Wati evaluates event-based rules from top to bottom. New event-based rules are added to the top of the list by default. Turning a rule off does not change its position.

Time-based rules cannot be reordered because they run according to their configured schedules.

Rule execution settings and troubleshooting

7. How do I control the order in which Rules, Keyword Actions, and Quick-Reply actions run?

Go to Automation > Rules and click the settings icon next to Reorder on the Event-based tab. You can configure these settings:

  • Prioritize Quick-Reply First: Controls whether Quick-Reply actions run before or after Rules and Keyword Actions when a contact taps a Quick-Reply button in a campaign.

  • Stop After Button Interactions: When enabled, prevents other automations from running after a Quick-Reply action. This setting is available only when Prioritize Quick-Reply First is enabled.

  • Prioritize Rules Over Keyword Actions: When enabled, Rules run before Keyword Actions. Both can still run for the same message.

All 3 settings are off by default. Changes apply to new incoming messages after you save them. Only Admins and Automation Managers can change these settings. The Resulting Automation Order section shows the final order based on your selections. Default Actions always run last when triggered.

8. Why doesn't an automation rule run?

An automation rule may not run for several reasons:

  • The contact is actively interacting with a chatbot. While the chatbot is active, message-triggered Rules, Keyword Actions, and Default Actions do not run.

  • The rule is turned off.

  • The rule's trigger is not included in your Wati plan.

  • The conversation is assigned to a human agent or AI agent, and the rule is triggered by an incoming message.

  • The conversation is blocked.

  • The trigger is an emoji reaction.

  • The rule uses an AI intent filter, but your account has no Wati AI credits left.

Rules triggered by other events, such as contact attribute changes, Shopify events, schedules, and missed calls, can still run while an agent is handling the conversation. However, if one of these rules sends a message or starts a chatbot, the conversation moves from the assigned agent back to the bot.

To avoid interrupting an agent's conversation, use actions such as Route to team, Assign to operator, Update contact attribute, or Notification. These actions leave the conversation with the assigned agent.

Did this answer your question?