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

# Ticket routing

> Assign new tickets in your helpdesk to the right available agent, by round robin, by skill, or by your own rules

Ticket routing assigns new tickets in your helpdesk to an agent automatically. IrisAgent only picks agents who are working right now, are not out of office, and have room for another ticket. You choose how it picks between them: share tickets evenly, match tickets to agents' skills, or write your own rules.

Only an IrisAgent **admin** can change routing settings and agents.

> [!NOTE]
>
> If you don't see a **Routing** section in **Settings**, routing isn't turned on for your helpdesk yet. Contact IrisAgent support.

## Open ticket routing

1. Open the user menu and choose **Settings**.
2. In the **Routing** section, find the **Ticket routing** card and click **Configure**.

The page shows whether routing is on and how it assigns tickets, then a table of your helpdesk's agents. Click **Routing settings** to change how tickets are assigned, and use the table to set up each agent. Click **← Settings** to go back.

## Set up your agents

IrisAgent only routes tickets to agents who are set up for routing. An agent who isn't shows **Not set up for routing** under their name.

1. Click the edit icon on the agent's row (**Set up for routing** for a new agent).
2. Choose their **time zone**, **working days**, and **working hours**. A new agent starts with Monday to Friday, 9:00 AM to 5:00 PM, in your browser's time zone.
3. Optionally, add **out of office** periods. Click **Add period** and choose a start and end date. For a single day, choose the same date twice.
4. Add their **skills**. Type a skill name, optionally choose a level, and click **Add**. Skill names can't contain a comma or a hyphen; use an underscore instead, such as `tier_2`.
5. Turn the **Enabled** switch on to route tickets to this agent, or off to stop.
6. Click **Set up** (or **Update** for an agent already set up).

### Edit several agents at once

1. Tick the checkbox on each agent's row.
2. Click **Edit selected**.
3. Tick each field you want to change: **Route tickets to these agents**, **Time zone**, **Working days**, **Working hours**, **Skills**, or **Out of office**. Fields you leave unticked keep each agent's own value.
4. For **Skills** and **Out of office**, choose **Add to each agent's** list or **Replace each agent's** list.
5. Click **Save**.

Agents who weren't set up before are set up with the values you chose.

## Choose how tickets are assigned

Click **Routing settings**, then:

1. Turn on **Route tickets automatically**.
2. Under **How should tickets be assigned?**, choose a mode (see below).
3. Set **Max open tickets per agent** (1 to 255). An agent with this many open tickets from the last 30 days gets no new ones until they close some.
4. Optionally, set **Tag routed tickets with**. IrisAgent adds this tag to every ticket it assigns in your helpdesk, so you can report on routed tickets.
5. Click **Save**.

| Mode | How it picks an agent |
| - | - |
| **Round robin** | Every ticket goes to the available agent with the fewest open tickets, so work is shared evenly. |
| **Skills-based** | A ticket tagged with one of your routing skills goes only to agents with that skill. Other tickets go to any available agent. The agent with the fewest open tickets gets it. |
| **Custom strategies** | You write the rules: which tickets each strategy handles, which skills an agent needs, and how to pick between agents. |

### Skills-based routing

Under **Routing skills**, add the ticket tags from your helpdesk that should act as skills, such as `billing` or `spanish`, then give agents the same skills in the agents table.

* A ticket with the tag `spanish` only goes to agents with the skill `spanish`. A ticket with both `spanish` and `billing` needs an agent with both.
* Skill names match regardless of capitals, so `Billing` on an agent matches the tag `billing`.
* Skill levels on agents are ignored in this mode.

## Custom strategies

A strategy is one rule. Strategies are tried from the top: the first strategy whose filter matches a ticket decides who gets it. Use the arrows to change the order, **Add strategy** to add one, and **Remove** to delete one. Each strategy needs a different name.

For each strategy, set:

**Which tickets.** A filter expression. `true` matches every ticket. You can use `Priority`, `Status`, `RawTag` (the ticket's tags), and `TimeOfCreation`. For example:

```
Priority == "urgent" && "billing" in RawTag
```

IrisAgent checks the expression when you save and tells you if it isn't valid.

**Skills an agent needs.** Click **Add skill** and enter a ticket tag. When a ticket has one of these tags, only agents with the same skill can get it.

**Pick the agent by.** One or more sort rules, applied in order. The first rule picks; each next rule breaks ties.

| Sort rule | Options |
| - | - |
| **Open tickets** | **Fewest first** (the default) or **Most first** |
| **Skill level** (enter the skill name) | **Lowest level first** or **Highest level first** |

A strategy can have up to 64 sort rules.

**Rank agents again for each ticket.** Turn this on when a sort rule uses a skill whose level comes from the ticket, so agents are re-ranked for every ticket instead of once per run.

### Skill levels

A required skill can ask for a level, such as `billing` at level 2. Levels only work on **leveled tags**: tags IrisAgent has been set up to read a level for from each ticket. On any other tag, the level options aren't offered.

* If a strategy asks for a level on a tag that isn't leveled, or a level the ticket can never have, IrisAgent won't save it. Such a rule would never be checked and would let every agent match. Choose **No level**, or tick **Ignore skill levels**.
* Tick **Ignore skill levels** to match an agent who has the skill at any level.
* To set up leveled tags, contact IrisAgent support.

## Which agent gets a ticket

For each new ticket, IrisAgent:

1. Finds the strategy for the ticket (in Round robin and Skills-based mode there is one built-in strategy).
2. Keeps only agents who are **Enabled**, inside their working days and hours in their own time zone, not out of office, and below **Max open tickets per agent**.
3. Keeps only agents with every skill the ticket needs.
4. Ranks the rest by the sort rules and assigns the ticket to the first agent in your helpdesk.

If no agent qualifies, the ticket is left unassigned in your helpdesk.

## Turn routing off

Click **Routing settings**, turn off **Route tickets automatically**, and click **Save**. New tickets are no longer assigned by IrisAgent. Tickets already assigned keep their agent, and your agents and strategies are kept for when you turn it back on.

## Related pages

* [Ticket assignment (round robin) in the IrisAgent Helpdesk](https://docs.irisagent.com/helpdesk/Ticket-Assignment.md)
* [Ticket tagging](https://docs.irisagent.com/configuring-ai-and-automation/Ticket-Tagging.md)
* [Workflows](https://docs.irisagent.com/configuring-ai-and-automation/Workflows.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.