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

# Triage, route, then dispatch

> Split dispatch into two Flows: one skill works out where a ticket belongs and moves it there, and a second step assigns it.

Some desks separate "where does this belong?" from "who takes it?". A routing skill reads each new ticket and moves it to the right board, tier, or queue. A second step, which can be another agent, an Auto-assign profile, or a person, assigns it from there. Two small skills are easier to test and change than one skill that does everything.

## How the two stages work

This example uses an intake board, **Triage**, and two destination boards, **Service Desk** and **Projects**, each with a status **Ready to be Assigned**.

| Stage | Runs when | Does | Writes |
| - | - | - | - |
| 1. Route | Board is **Triage**, Status is **New** | Routing skill classifies the ticket | Board and status **Ready to be Assigned**. Never an owner |
| 2. Dispatch | Board is **Service Desk**, Status is **Ready to be Assigned** | A dispatcher picks a tech | Owner |

1. A new ticket lands on **Triage**.
2. Stage 1 runs the routing skill. It moves the ticket to **Service Desk** and sets **Ready to be Assigned**.
3. The status change is written to the PSA. When the PSA sends that update back, Thread checks the ticket against your Flows again, and stage 2 matches and assigns it.
4. If the routing skill can't tell where the ticket belongs, it leaves it on **Triage** with a note for a person.

Each stage is its own Flow, so each runs once on a ticket. The routing skill must not set an owner. If it does, an Auto-assign profile in stage 2 will skip the ticket.

## Variations

| Decision | Options |
| - | - |
| **Where stage 1 routes to** | A board. A tier status on the same board. A service line or queue. A client's pod (see [Pod and client dispatch](https://docs.getthread.com/inbox/dispatch-scenarios/pod-and-client-dispatch.md)). |
| **Who does stage 2** | Another agent Flow ([Agent dispatch](https://docs.getthread.com/inbox/dispatch-scenarios/agent-dispatch-on-a-shared-board.md)). An Auto-assign profile dispatching from the status stage 1 sets. A person working a View of that status. |
| **How stage 1 decides** | Ticket content only. Ticket content plus client and contact details. A "master" skill whose instructions tell it to use other shared skills in order, such as determine queue, then route. The agent can load another shared skill by name during the run. |
| **Where it starts** | Every new ticket. Tickets from one source, such as the client portal. Tickets the Triage Agent has finished with. |

## Before you start

* Each destination has a status that means "ready to assign", and stage 2 is set up to dispatch from it.
* You've listed the destinations and how to tell them apart.
* Both skills are **shared** skills.

## Set up the two stages

**1. Build the routing skill**

Tell it the destinations and how to choose, to change only the board and status, never the owner, and to leave a note when it isn't sure.

**2. Create the stage 1 Flow**

Conditions: the intake board and status. Action: **Agent Builder → Run a Skill**, with the update ticket and add note tools checked. Turn it on.

**3. Set up stage 2**

Create the dispatcher Flow, or an Auto-assign profile whose dispatch status is the one stage 1 sets.

**4. Test the hand-off**

Push a few tickets through and confirm stage 2 picks each one up after stage 1 moves it.

## Rules for two-stage dispatch

* **Stage 1 never sets an owner.** An owned ticket is invisible to Auto-assign.
* **Each Flow runs once per ticket.** If stage 1 fails, nothing re-routes the ticket. Keep a View of tickets still on the intake board.
* **Board before status.** The update ticket tool applies a board change before the status, so a status from the new board is valid in the same call.
* **"Succeeded" means it ran.** Check where the ticket ended up, not just the run history.


## Related topics

- [Agent dispatch](https://docs.getthread.com/inbox/dispatch-scenarios/agent-dispatch-on-a-shared-board.md)
- [Dispatcher](https://docs.getthread.com/start-here/roles/dispatcher.md)
- [What is Thread?](https://docs.getthread.com/get-started/what-is-thread-an-overview.md)
