> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whatsy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up Whatsy behavior rules to control auto-replies

> Create behavior rules to skip, archive, or reroute messages before the AI replies — filter spam, set contact-specific responses, and more.

Behavior rules let you define exactly how Whatsy handles messages before the LLM ever gets involved. Each rule pairs a condition (what to look for in an incoming message) with an action (what to do when that condition matches). Use rules to suppress replies for certain contacts, enforce quiet hours, route specific conversations to a different persona, or silently archive spam — all without writing any code.

## Creating a behavior rule

<Steps>
  <Step title="Open the Behaviors view">
    Open the Whatsy app and click **Behaviors** in the left sidebar. You'll see a list of your existing rules, each showing its condition type, trigger value, and current enabled/disabled state.
  </Step>

  <Step title="Add a new rule">
    Click the **+ New Rule** button in the top-right corner. The rule editor opens as a sheet on top of the Behaviors view.
  </Step>

  <Step title="Name the rule">
    Enter a descriptive name in the **Rule Name** field so you can identify it at a glance (e.g. "Skip newsletter keywords", "Work contacts – formal persona", "Quiet hours 10pm–8am").
  </Step>

  <Step title="Choose a condition type">
    Open the **Condition** dropdown and select one of the four condition types:

    * **Keyword Match** — triggers when the message text contains a specific word or phrase
    * **Contact Label** — triggers for contacts tagged with a specific WhatsApp label
    * **Time of Day** — triggers during a specified hour range
    * **Message Type** — triggers for a specific media type (e.g. `image`, `video`, `any`)
  </Step>

  <Step title="Enter the condition value">
    Fill in the value field that appears below the condition picker. The label updates to guide you — for example, **Keyword to match**, **Contact label**, or **Hours range (e.g. 9-17)**. Enter the exact text, label name, hour range, or message type you want to match.
  </Step>

  <Step title="Choose an action">
    Open the **Action** dropdown and select what Whatsy should do when the condition matches:

    * **Skip Reply** — ignores the message; no reply is sent
    * **Reply with Persona** — uses a specific persona instead of the currently active one
    * **Notify Only** — logs the message without sending a reply
    * **Archive** — archives the conversation automatically
  </Step>

  <Step title="Enable and save">
    Make sure the **Enabled** toggle is on, then click **Save**. The rule appears in your Behaviors list immediately and begins applying to incoming messages.
  </Step>
</Steps>

## Condition types

| Condition         | What it matches                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| **Keyword Match** | Any incoming message whose text contains the specified word or phrase (case-insensitive)              |
| **Contact Label** | Messages from contacts that have been tagged with a specific label inside WhatsApp                    |
| **Time of Day**   | Messages that arrive within a specified hour range, entered as `start-end` (e.g. `22-8` for 10pm–8am) |
| **Message Type**  | Messages of a specific media type; use `any` to match all types, or values like `image` or `video`    |

## Action types

| Action                 | What it does                                                                                                                           |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Skip Reply**         | Whatsy takes no action; the message is received but not replied to and not logged as an auto-reply event                               |
| **Reply with Persona** | Whatsy replies using the persona whose ID you specify in the **Persona ID** field, overriding the active persona for this message only |
| **Notify Only**        | The message is logged in the activity feed but no reply is sent; useful for monitoring certain contacts without automating responses   |
| **Archive**            | Whatsy archives the conversation; no reply is sent; useful for suppressing known spam or marketing threads                             |

## Example rules

Here are three real-world rules you can create right away:

**1. Ignore marketing messages**

| Field           | Value                     |
| --------------- | ------------------------- |
| Name            | Skip unsubscribe keywords |
| Condition       | Keyword Match             |
| Condition value | `unsubscribe`             |
| Action          | Skip Reply                |

**2. Route work contacts to a formal persona**

| Field           | Value                                |
| --------------- | ------------------------------------ |
| Name            | Work contacts – professional persona |
| Condition       | Contact Label                        |
| Condition value | `work`                               |
| Action          | Reply with Persona                   |
| Persona ID      | `the-professional`                   |

**3. Enforce quiet hours overnight**

| Field           | Value               |
| --------------- | ------------------- |
| Name            | No replies 10pm–8am |
| Condition       | Time of Day         |
| Condition value | `22-8`              |
| Action          | Skip Reply          |

<Note>
  Rules are evaluated from top to bottom in the order they appear in your Behaviors list. The **first** rule whose condition matches a given message is the one that gets applied — subsequent rules are not checked. If you need more specific rules to take priority, drag them above more general ones.
</Note>

<Tip>
  To test whether a rule is triggering correctly, temporarily pause auto-reply using the **Running / Paused** toggle on the Dashboard, send yourself a test message from another phone, then check the **Activity Logs** view. Each log entry shows which action was taken (replied, skipped, archived, etc.) so you can verify the rule fired as expected.
</Tip>
