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

# Routing Rules

> Decide who receives an inbound message on a channel, by time, team, load, or skill.

## Overview

Every channel (email, SMS, phone, chat and Slack) can carry **routing rules**
that decide who picks up an inbound message. Without rules, everything on a
channel goes to its single owner or assignee. With them, a channel can hand
mornings to one team and nights to another, spread work evenly across a rota,
or send a Spanish-language enquiry to the people who can answer it.

Rules live on the channel: **Settings → Channels → *your channel* → Routing
Rules**.

### Reusing one set of rules on several channels

A rule written on a channel belongs to that channel. When you want the same set
of rules on more than one. Three support numbers that should all follow the same
hours, say. Group them and attach the group instead: **Settings → Channels →
Routing**.

A group can be attached to a **channel**, a **team**, a **sending pool**, or a
whole **channel type** ("every phone number"), and a channel picks up the rules
from every group that reaches it. Nothing changes for rules you have already
written. Each one is its own group of one until you decide otherwise.

## How rules are evaluated

Rules are evaluated **top to bottom**, and the first one that matches wins. A
rule matches when both halves hold:

1. **Its conditions match right now**: day of week, time of day, and an
   optional date range, all read in your workspace's timezone.
2. **It can name someone available**. The person it picks has to clear the
   rule's availability gates (below).

If a rule matches the clock but nobody clears its gates, that rule is **skipped
and the next one is tried**. If no rule produces anyone, the message falls back
to the channel's normal assignment, exactly as it would if no rules existed.
Routing never leaves an inbound message unassigned.

<Info>
  A rule with no conditions at all always matches. That is the **catch-all**. Put it last, and it acts as a
  configurable default that overrides the channel's static assignment.
</Info>

## Who a rule picks

| Action               | Picks                                                                                                                                               |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Assign to User**   | Always the same person.                                                                                                                             |
| **Assign to Team**   | **The team decides.** Whether it shares work evenly, by load, or on shifts is set once on the team itself. A rule naming it does not override that. |
| **Round Robin**      | Rotates through a list of people you choose.                                                                                                        |
| **Least Busy**       | Whoever currently holds the fewest open conversations, across every channel they work.                                                              |
| **On-Call Schedule** | Whoever the rota names right now. See [On-call](/team/on-call).                                                                                     |

Round-robin position is remembered **per team**, not per rule, so a team that
answers phone through one rule and email through another takes one shared turn
order across both, rather than keeping two independent ones over the same
people. Bookings on that team turn the same order, so someone who has just taken
a call is behind the others for the next meeting too.

## Assigned, or offered

Naming someone is one decision; how they get it is another, and the two are set
separately.

|            | One person                                | Several people                                                 |
| ---------- | ----------------------------------------- | -------------------------------------------------------------- |
| **Assign** | It's theirs, in their inbox.              | , not offered; work can't be split.                            |
| **Ask**    | Their phone rings, or they're offered it. | All of them are offered it, and whoever replies first owns it. |
| **Nobody** | It sits in the shared inbox unassigned.   | Same.                                                          |

By default one person is **assigned** and several are **offered**, you only
need to set this when you want something else.

**A phone call is always an ask.** Nobody can be made to pick up, so a voice rule
offers "ask" or "straight to voicemail" and never "assign". When several people
are asked, you choose whether they ring **all at once** or **one at a time**.
One at a time stacks up, so four people at 20 seconds each means the caller hears
80 seconds of ringing before it gives up. The rule editor shows you that number
as you set it.

An offered conversation belongs to nobody until someone replies. The first reply
claims it, and a claim never takes it away from a colleague who got there first.

An **on-call schedule** is the option to reach for when the rota is a property
of your team rather than of one channel: it hands off on a schedule, anyone can
book cover, and every rule pointing at it follows along. Outside its coverage
hours it names nobody, so the rule is skipped and the next one takes over.

## Availability gates

Three optional gates decide whether a candidate is a valid answer. They apply to
whichever action the rule uses.

<AccordionGroup>
  <Accordion title="Only assign to agents who are online">
    A teammate counts as online while they have Custral open **and** have not set themselves Away from the account menu
    at the bottom of the sidebar. Presence is a heartbeat, so signing out takes effect immediately and closing a laptop
    takes effect within about a minute; Away takes effect at once and leaves them signed in.
  </Accordion>

  <Accordion title="Max open conversations">
    Skips anyone already holding that many open conversations. Their load is counted across every channel, not just this
    one.
  </Accordion>

  <Accordion title="Required skills">
    Skills are free-form tags on a member: `spanish`, `billing`, `tier-2`. Set them on **Settings → Team → *member* →
    Skills**. A rule requiring several skills only considers people who hold **all** of them; matching ignores
    capitalisation.
  </Accordion>
</AccordionGroup>

<Note>
  Gates narrow who a rule can pick; they never stop a message being delivered. If a rule's whole rota is offline or at
  capacity, Custral moves on to the next rule and finally to the channel's default assignee.
</Note>

## Seeing what your rules actually do

The Routing Rules panel shows, for the last 30 days:

* how many messages each rule assigned, and to whom (hover the count),
* how many were routed by a rule at all versus falling back to the default,
* how many fell back **because nobody was available**, the number to watch if a
  rule looks dead.

A rule reading "No assignments in 30 days" is either never matching the clock or
always gated out, and the fallback line tells you which.

## Using it

<Steps>
  <Step title="Open the channel">Go to **Settings → Channels** and open the channel you want to route.</Step>

  <Step title="Add a rule">
    Choose **Add Rule**, name it after the shift or audience it covers, and set the days, times, or date range it
    applies to.
  </Step>

  <Step title="Pick who receives the work">
    Choose an action and its target: one person, a team, a rota, or least busy.
  </Step>

  <Step title="Set availability, if it matters">
    Require online agents, cap open conversations, or require skills. Leave them off for a rule that should always
    apply.
  </Step>

  <Step title="Order the rules">
    Use the arrows to put the most specific rule first. Add a catch-all last if you want a default other than the
    channel's owner.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Everything still goes to the channel owner">
    Check the rule is **enabled**, and that its conditions match the moment mail actually arrives. Times are evaluated
    in the **workspace** timezone, not the reader's. The panel's summary line tells you how many messages fell back to
    the default.
  </Accordion>

  <Accordion title="A rule shows no assignments">
    Either its conditions never match, or its gates never pass. If the fallback line reports messages that fell back
    "because nobody was available", the gates are the cause. Loosen the online requirement or raise the cap.
  </Accordion>

  <Accordion title="A skill rule never matches">
    Skills have to be set on the **member**, not on the rule alone. Open **Settings → Team → *member* → Skills** and
    confirm the tag is there; a rule requiring two skills needs both on the same person.
  </Accordion>

  <Accordion title="Round robin looks uneven">
    Rotation skips anyone gated out, so an agent who is often offline or at capacity receives less. Hover a rule's
    assignment count to see the split per person.
  </Accordion>

  <Accordion title="A rule targets someone who left">
    Members who are no longer in the workspace are ignored, and the rule falls through as though it named nobody. Edit
    the rule to name a current member.
  </Accordion>
</AccordionGroup>

## Next steps

* [Chat Routing](/comms/chat/routing): how routing applies to the widget.
* [Sending Pools](/comms/voice/pools): the outbound counterpart: which number
  sends, rather than who receives.
* [On-call](/team/on-call): shifts, cover, and who is on right now.
* [Inbox Overview](/comms/inbox/overview): where routed messages land.


## Related topics

- [Receiving SMS](/comms/sms/receiving.md)
- [Chat Routing](/comms/chat/routing.md)
- [On-Call](/team/on-call.md)
- [Change Log](/product/updates.md)
- [Assemble a support inbox](/recipes/support-inbox.md)
