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

# Lead routing

> Three decisions that determine which sales rep gets a new inquiry, and the diagram that shows the path they produce.

When a new inquiry comes in, somebody has to get it. **Automations → Routing** is where you decide who, in three steps that run in order.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/trytrama/sQ8l24qMqxeYvsQa/images/automatizaciones/reparto-light.png?fit=max&auto=format&n=sQ8l24qMqxeYvsQa&q=85&s=0a89d5b4c7e14291395204d1a35d3413" alt="Routing tab, with the three decisions on the left and the resulting path on the right" width="1456" height="817" data-path="images/automatizaciones/reparto-light.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/trytrama/sQ8l24qMqxeYvsQa/images/automatizaciones/reparto-dark.png?fit=max&auto=format&n=sQ8l24qMqxeYvsQa&q=85&s=e0b719617745d599482c676b2a6a8d99" alt="Routing tab, with the three decisions on the left and the resulting path on the right" width="1456" height="817" data-path="images/automatizaciones/reparto-dark.png" />
</Frame>

```mermaid theme={null}
flowchart TD
    A([An inquiry arrives]) --> B{Have they bought before?}
    B -->|No| POOL
    B -->|Yes| C{What you chose in step 1}
    C -->|Stays with their rep| D[Goes to whoever handled them]
    C -->|Only if they cover it| E{Does that rep cover<br/>specialty and language?}
    C -->|Routed from scratch| POOL
    E -->|Yes| D
    E -->|No| POOL

    POOL{{Step 2 · who's eligible}}
    POOL -->|Language or specialty first| P[Candidate pool]
    POOL -->|Both, no exceptions| X{Does anyone cover both?}
    X -->|Yes| P
    X -->|No| Z[Stays unassigned]

    P --> Q{Step 3 · which one}
    Q -->|Lightest| R[Lowest active load]
    Q -->|Round robin| S[Longest without one]

    D --> F([Rep assigned])
    R --> F
    S --> F
    Z -.rescued within the hour.-> F
```

The panel on the right isn't an illustration — it's the path your current settings produce. Change an option and the path redraws.

## 1. A returning customer writes again

Evaluated first, and if it applies, routing stops here.

* **Stays with their rep** — the new inquiry goes to whoever handled them before. It **ignores specialty**: whoever sold them a cruise gets their Disney inquiry too.
* **Only if they cover the topic** — stays with their rep only if that rep also covers the specialty and the language. Otherwise it goes to the pool.
* **Routed from scratch** — prior relationship doesn't count. They may end up with someone who doesn't know their history.

## 2. Who's eligible

How specialty and language combine to form the candidate pool.

| Option                  | What it does                                                                                  |
| ----------------------- | --------------------------------------------------------------------------------------------- |
| **Language first**      | Looks for a specialist who also speaks the language; if there's none, it prioritizes language |
| **Specialty first**     | Same, the other way round                                                                     |
| **Language only**       | Ignores specialties. If nobody speaks the language, it goes to the whole team                 |
| **Specialty only**      | Ignores language. If nobody covers the topic, it goes to the whole team                       |
| **Both, no exceptions** | Requires specialty *and* language. **If nobody qualifies, the inquiry stays unassigned**      |

Each rep's specialties and languages are set in [Team](/team/managing).

## 3. Which one of them gets it

* **Whoever's lightest** — looks at active load, today's leads, and what they've let go cold. Open quotes count as load.
* **Round robin** — goes to whoever hasn't received one in longest. Doesn't look at load at all.

<Warning>
  If an inquiry ends up unassigned, a process rescues it within the hour. It won't sit there forever — but it will sit there for up to an hour, which is a reason to be careful with "Both, no exceptions".
</Warning>
