# How to create and manage routing rules [embed](
Who can use this feature?
Admins only.
) ## **Overview** Routing rules process, tag and assign incoming tickets automatically. Each rule checks conditions such as customer segment, channel, business hours, keywords in the subject or message and custom field values, then sends the ticket to the right team or agent. This removes manual triage and gets tickets to the right people faster. Every routing rule uses AND logic: a rule is triggered only when all of its conditions are true. Keywords in the same field work as OR: the rule applies if any keyword matches. If you need OR logic between different conditions, create similar rules, each with a different condition. [embed](
Related articles:
•  Tags and tag groups: Create the tags your rules apply.
•  How to create and manage teams: Create the teams your rules route to.
•  How to configure customer segments: Create the segments a rule targets.
•  How to configure organization settings and business hours: Set the business hours a rule can use.
) --- ## **Key Features** - **AND logic:** A rule is triggered only when all its conditions are true. If even one doesn't match, such as the channel or business hours, the rule is skipped. - **First match wins:** Atlas checks rules from top to bottom and applies only the first rule that matches. The remaining rules are skipped. - **Default fallback:** If no rule matches, the ticket keeps your default settings. - **Keyword matching:** Check the ticket subject or message for one or more keywords. The rule applies if any keyword matches, and Python regular expressions are supported. - **Custom fields (preview):** Match tickets created with any of the selected values of list-like custom fields. - **Shift-aware assignment:** Distribute tickets by round robin or least busy, and only to agents who are on shift. - **Multiple actions in one rule:** Route to a team, assign an agent, send an automatic reply, add tags, and set priority or status at the same time. - **Real-time evaluation:** A new or updated rule starts evaluating new tickets immediately. --- ## **Conditions and actions** A rule is triggered only when all the conditions you set are true. Then Atlas runs all the actions in the rule. [embed](
ConditionsActions
ConditionWhat it checks
"Escalated by Zeus"Enabled: the rule runs only after Zeus AI escalates a ticket. Disabled: tickets escalated by Zeus AI are ignored.
"Segment"The customer belongs to the segment you select, for example "Visitors" or "VIP customers".
"Subject contains"The ticket subject contains any of the keywords you add, for example refund or chargeback. Supports Python regular expressions. Optional.
"Message contains"The message contains any of the keywords you add. Supports Python regular expressions. Optional.
"Channels"The ticket came in through one of the selected channels, such as Email, Chat or Slack.
"Business hours"When the ticket arrives: "During business hours", "Outside business hours" or "All hours".
"Custom fields (preview)"The ticket was created with any of the selected custom field values. Only list-like fields are supported for now. Optional.
ActionWhat it does
"Assign team"Sends the ticket to a team so its members can work on it.
"Assign agent"Assigns the ticket with a "Distribution method": "Round robin" (takes turns), "Least busy" (fewest open tickets) or "Specific Agent". You can limit it to agents on shift and set a maximum number of open tickets per agent.
"Send response"Sends an automatic reply to the customer. You can add formatting, canned responses, Help Center articles and variables {{ }}.
"Set priority"Sets the priority: "Low", "Medium", "High" or "Urgent".
"Set tags"Adds one or more tags to the ticket.
"Set status"Sets the status: "Open", "Pending" or "Closed".
) --- ## **How conditions work together** A routing rule uses AND logic: it's triggered only when **all** of its conditions are true. For example, a rule with the **"Email"** channel and the keyword `refund` only applies to email tickets that contain **"refund"**. A chat ticket with **"refund"** doesn't trigger it. Inside **"Subject contains"** and **"Message contains"**, keywords work as OR: the rule applies if **any** keyword matches. For example, to route tickets that mention **"refund"** **or** **"chargeback"** in the subject, add both keywords to one rule: **Rule****"Subject contains"****Actions****Billing – refunds**`refund`, `chargeback`Assign team: BillingTo get OR logic between different conditions, for example the subject **or** the message, create similar rules with a different condition in each one. See the example below. --- ## **How to create a routing rule** [embed](
) [embed](
Requirements:
Create the teams, tags and customer segments your rules use. See How to create and manage teams, Tags and tag groups and How to configure customer segments.
) 1. Go to ["App Configuration > Ticket Management > Routing"](https://app.atlas.so/configuration/ticket-routing) and click **"Add rule"**. 2. Enter a descriptive **"Name"**. ### **Conditions** 3. Set **"Escalated by Zeus"**: - **Enabled:** The rule is evaluated only after a Zeus Agent escalates a ticket. - **Disabled:** The rule ignores tickets escalated by a Zeus Agent. 4. Select the customer **"Segment"** the rule applies to. To create one, click **"Add customer segment"**. 5. Optionally, configure **"Subject contains"**. Add keywords by pressing Enter or typing a comma and a space, for example `refund` and `chargeback`. The rule applies if the ticket subject contains any of them. Python regular expressions are supported. 6. Optionally, configure **"Message contains"**. Add keywords the same way. The rule applies if the message contains any of them. 7. Select the **"Channels"**. Only tickets created through these channels are evaluated. 8. In **"Business hours"**, choose **"During business hours"**, **"Outside business hours"** or **"All hours"**. To set your hours, click **"Set up business hours"**. 9. Optionally, in **"Custom fields (preview)"**, click **"+"** and select the ticket fields and values. The rule applies to tickets created with **any** of the selected values. Only list-like fields are supported for now. ### **Actions** 10. Click **"Add action"** and select one or more actions. Each action opens its own settings: - **Assign team:** In **"Select Team"**, choose the team that handles the ticket. - **Assign agent:** Choose the **"Distribution method"**: **"Round robin"**, **"Least busy"** (fewest assigned open tickets) or **"Specific Agent"**. Then select the **"Agents to assign"**. Optionally, turn on **"Restrict to on-shift"** and **"Enable maximum tickets per agent"** (enter the maximum number of open tickets). - **Send response:** Sends an automatic reply to the customer. Write the **"Message"**. You can add formatting, canned responses, Help Center articles, mentions, variables `{{ }}` and emojis. - **Set priority:** Select **"Low"**, **"Medium"**, **"High"** or **"Urgent"**. - **Set tags:** Select the tags to add to the ticket. - **Set status:** Select **"Open"**, **"Closed"** or **"Pending"**. 11. Click **"Create routing rule"**. The rule starts evaluating new tickets immediately. [embed](
Important:
•  Order matters. Atlas applies only the first matching rule, so place your most specific rules at the top of the list and broader rules below them.
•  In "Subject contains" and "Message contains", add keywords by pressing Enter or typing a comma and a space. The rule applies if any keyword matches. Both fields support Python regular expressions. To match a literal comma followed by a space, write ,\ (comma, backslash, space).
•  Before you turn on "Restrict to on-shift", set up the shift and its agents in "App Configuration > Shifts > Scheduling". Put all agents who should receive tickets in one shared shift. Separate overlapping shifts for individual agents prevent on-shift routing from working.
) To remove an action from the rule, click **"Remove"** in its section. --- ## **Example: Route password issues to Technical Support** These rules send email tickets from visitors about passwords to the Technical Support team during business hours, tag them and set them to Pending. Because all conditions in a rule must be true, matching the subject **or** the message needs one rule for each. **Setting****Rule 1: Password – subject****Rule 2: Password – message****Escalated by Zeus**DisabledDisabled**Segment**VisitorsVisitors**Subject contains**`password`—**Message contains**—`password`**Channel**EmailEmail**Business hours**During business hoursDuring business hours**Team (action)**Technical SupportTechnical Support**Tags (action)**Account LoginAccount Login**Status (action)**PendingPendingA visitor emails on Tuesday at 10:30 AM, during business hours, with the subject **"Password reset needed"**. The ticket meets every condition in Rule 1, so Atlas: - Routes it to the Technical Support team. - Adds the Account Login tag. - Sets the status to Pending. If the subject were **"Can't log in"** but the message said **"I forgot my password"**, Rule 1 wouldn't apply and Rule 2 would. [embed](
Important:
If any condition in a rule isn't met, that rule doesn't apply. For example, the ticket arrives by chat, is escalated by Zeus, arrives outside business hours or doesn't contain the keyword.
) --- ## **How to edit a routing rule** 1. Go to ["App Configuration > Ticket Management > Routing"](https://app.atlas.so/configuration/ticket-routing). 2. Click the rule, or click the ellipsis icon on its row and select **"Edit"**. 3. Make your changes and click **"Update routing rule"**. [embed](
Warning:
The previous configuration can't be restored after you update a rule.
) --- ## **How to change the order of routing rules** 1. Go to ["App Configuration > Ticket Management > Routing"](https://app.atlas.so/configuration/ticket-routing). 2. Move a rule up or down in the list. Atlas evaluates rules in this order, from top to bottom. --- ## **How to delete a routing rule** 1. Go to ["App Configuration > Ticket Management > Routing"](https://app.atlas.so/configuration/ticket-routing). 2. Click the ellipsis icon on the rule's row and select **"Delete"**. 3. Click **"OK"** to confirm. [embed](
Warning:
Deleted routing rules can't be restored.
) --- ## **FAQs & Troubleshooting** ### **Why wasn't my routing rule applied?** A rule applies only when all of its conditions match. Check that the ticket: - Belongs to the selected segment. - Came through a selected channel. - Arrived within the selected business hours. - Contains at least one of the **"Subject contains"** or **"Message contains"** keywords. - Has one of the selected **"Custom fields (preview)"** values, if you set any. - Matches the **"Escalated by Zeus"** setting. Also check the rule order. If a rule higher in the list matched first, the rules below it are skipped. ### **Can a rule apply when only one of its conditions is true?** No. Rules use AND logic, so all conditions must be true. For OR logic, create similar rules with a different condition in each one. ### **Can I add several keywords to "Subject contains" or "Message contains"?** Yes. Add each keyword by pressing Enter or typing a comma and a space. The rule applies if any keyword matches. To match a literal comma followed by a space, write `,\` (comma, backslash, space). ### **What happens when several routing rules match a ticket?** Atlas checks rules from top to bottom and applies only the first rule that matches. The rest are skipped. ### **What happens when no routing rule matches?** The ticket keeps your default settings. ### **Why isn't the ticket assigned when "Restrict to on-shift" is on?** Tickets go only to agents who are on shift right now. Check that the shift is set up in ["App Configuration > Shifts > Scheduling"](https://app.atlas.so/configuration/shifts/scheduling), that the agents are assigned to it, and that all of them share one shift. ### **Does a routing rule apply to existing tickets?** No. Rules evaluate only new tickets received after the rule is created or updated. ### **Can I deactivate a routing rule?** No. If you no longer need a rule, delete it.