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

# Rules

> Create simple When/Then automations for routing, tags, status, and assignment.

Rules apply small, deterministic ticket changes when an exact condition matches.

<Note>
  [AI Agents](/ai-agents/intro) are the default for new ticket automation and delayed or scheduled support jobs. Use Rules only when the result is a simple, predictable If/Then change. [Create an AI Agent](/ai-agents/getting-started) or learn how [routing and ownership](/ai-agents/routing-and-ownership) work.
</Note>

## When to use Rules

Use a Rule when both the condition and action are exact. For example:

* when a ticket is assigned to Team X, add Tag X
* when the `VIP` tag is added, assign the VIP team
* when a message comes from an exact sender or channel, update the status

If the automation must understand intent, use tools, wait until later, or choose between outcomes, use an [AI Agent](/ai-agents/intro).

## Set it up

<Steps>
  <Step title="Open Rules">
    Open [Rules](https://armin.cx/app/_/rules) and click **Add rule**.
  </Step>

  <Step title="Define When">
    Pick the exact filters that must match, such as channel, sender, status, team, or tag.
  </Step>

  <Step title="Define Then">
    Choose the action: assign, add a tag, change status, add an SLA, or another available action.
  </Step>

  <Step title="Save and test">
    Trigger a matching ticket and confirm the rule ran as expected.
  </Step>
</Steps>

## Assignment routing

When **Then** is **Assign to** a team, pick how tickets route inside that team:

| Mode                            | Behavior                                                                                                      | Use when                                 |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| Any offline agent (Round Robin) | Rotates through team members. Prefers online agents first, but can assign to any active agent.                | You want even distribution               |
| Live agents (with Fallback)     | Assigns only to online agents. If none are online, uses your fallback agent or leaves the ticket on the team. | You want only people who are working now |
| No specific agent               | Assigns to the team only. Agents claim tickets themselves.                                                    | You want self-serve pickup               |

## Online, idle, and offline

Agent status is automatic. There is no manual toggle.

| Status  | When                                                  |
| ------- | ----------------------------------------------------- |
| Online  | Agent is active in the app (mouse, typing, scrolling) |
| Idle    | 15 minutes of inactivity                              |
| Offline | 60 minutes of inactivity, or the browser is closed    |

## Best practices

* Keep each Rule narrow and easy to predict.
* Avoid broad keyword conditions. They can match legitimate tickets by accident.
* Use [AI Agents](/ai-agents/getting-started) when the automation needs conversation context, judgment, actions, or a delayed follow-up.

Related: [SLAs](/inbox/slas), [Spam](/inbox/spam), [Tags](/inbox/tags).
