Routing
Routing decides which person on your team gets each escalated call or chat. It is made of three TaskRouter parts, each with its own section on the Routing page:
- Activities: the states a person can be in, such as Available, Break or Offline.
- Task queues: lines that tasks wait in, each with a rule for who is eligible to take them.
- Workflow: the rules that decide which queue each new task goes into.
The page appears under Contact Centre once human escalation is turned on.
The page header carries a Live view of Twilio badge. The activities, queues and workflow on this page are the ones in your Twilio TaskRouter workspace, not a separate copy. Adding, editing or deleting one here changes it in Twilio straight away, and changes made in the Twilio Console show up here.
Before You Start
- Role: the Organisation Admin role.
- Human escalation turned on, with Twilio connected and the Workspace SID and Workflow SID saved on Twilio Resources. Until Twilio is connected, the page is read only and its buttons say "Save the Twilio connection before managing routing settings."
Activities
A TaskRouter activity is a state a person can be in, and it decides whether they can be given work. People choose their activity from the status menu in the workspace app. See Twilio's activity docs.
Each activity is a card showing its name, a Routing or Not routing badge, and its role.
Adding or Editing an Activity
- In the Activities section, select Add activity, or select edit on an existing card.
- Enter a Friendly name. This is what your team sees in the workspace app, for example "Available", "Training" or "Lunch".
- Set Available for routing. On means someone in this state can be given a task. Off leaves them in the state without interruptions.
- Choose a Role mapping: Available, Break, Lunch, Offline or Custom. The role is what the state counts as in reporting.
- Select Add or Save.
Activity changes save straight away. They are not part of Save changes.
The Available Role
The workspace app treats the activity with the Available role as the state in which someone takes tasks. People set their status from the status menu in the workspace app, and choosing an available state is what tells Twilio they are ready for work. See Signing In and Status.
When human escalation is on and no activity has the Available role, the page shows "No activity is marked as available, so no task will ever be assigned." Until one exists, nobody on your team can go available in the workspace app, and every call or chat your agents hand over waits with no one to take it. This applies to the whole environment, however many people are signed in.
To fix it:
- In the Activities section, select edit on the activity your team uses for taking work, or select Add activity to create one.
- Set its Role mapping to Available.
- Check that Available for routing is on for the same activity.
- Select Save. The warning disappears once the change is saved.
- Ask your team to choose that status in the workspace app.
An activity card with No role is highlighted, because the role is the one part of an activity that Agentic sets rather than Twilio. Give every activity a role so reporting can count it.
Task Queues
A task queue holds tasks until someone eligible is free to take them. Each queue has a rule, called the target workers expression, that decides who is eligible. See Twilio's task queue docs.
Each queue is a card showing its name, its expression and its task order. The queue the workflow sends unmatched tasks to carries a Default target badge. When nobody is available to take work, cards show No one eligible.
Adding or Editing a Queue
- In the Task queues section, select Add queue, or select edit on an existing card.
- Enter a Friendly name. The queue is listed under this name here and in Twilio.
- Enter the Target workers expression.
1==1matches everyone, which is the right choice when anyone on the team can take any task. - Set Max reserved workers: how many people one task can be offered to at the same time. One is the usual answer.
- Choose the Task order: FIFO hands out the oldest waiting task first, LIFO the newest.
- Select Add or Save.
Queue changes save straight away, and adding a queue here adds it in Twilio.
With no queues, the section reads "No queues in this workspace". The workflow can only route a task into a queue, so anything it routes has nowhere to go until there is one.
Workflow
The workflow is the set of rules every escalated task passes through. It is made of filters, which are checked from top to bottom, and the first filter that matches sends the task to its queue. See Twilio's workflow configuration docs.
The Workflow section has these settings, which save together with Save changes:
| Setting | What it does |
|---|---|
| Friendly name | Optional. The name shown in the Twilio Console. |
| Reservation timeout | When Twilio offers a task to someone, it reserves the task for them. This is how many seconds Twilio waits for them to accept before offering it to the next target in the filter. |
| Configuration | The workflow's filters, written in Twilio's JSON format. It is sent to Twilio exactly as written. A badge shows Valid or Invalid JSON, and Format tidies the layout. |
| Assignment callback | One of the four webhook URLs, shown here for reference. It is managed with the other three on Twilio Resources, and you can push it from here if it is out of date. |
Checking Queue IDs in the Configuration
The configuration refers to queues by their Twilio ID, which starts with WQ. Under the configuration, the page checks every queue ID against the queues in the Task queues section:
- "All 2 queue SIDs match queues that exist in this workspace" means every filter points at a real queue.
- "1 queue SID doesn't match any queue in this workspace, so tasks matching that filter won't reach anyone" means a filter points at a queue that does not exist, usually one that was deleted. Replace the ID with one from the Task queues section.
- "The queue is valid, but no one matches its expression" means the queue exists but nobody is currently eligible for it.
These are warnings rather than errors. Twilio accepts the configuration, so you can still save it, but tasks that match a broken filter will not reach anyone.
Sidebar Markers
The Routing entry in the sidebar carries a marker when routing cannot work:
| Marker | What to do |
|---|---|
| "No activity has a role, so nobody can go available in the workspace." | Give your activities roles, including one Available. |
| "There are no queues, so inbound tasks have nowhere to route." | Add a task queue and point the workflow at it. |
| "Nobody is available in the workspace, so no task can be assigned." | Nobody on your team is in an available state right now. Ask them to set their status in the workspace app, see Signing In and Status. |
What Happens Next
Once there is an Available activity, a queue and a workflow that points at it, escalated tasks can reach your team. Next, set how many tasks each person can hold at once on Capacity.