TaskRouter | Jul. 01, 2024
Route tasks directly to a worker, task queue, or workflow
TaskRouter now enables you to route tasks directly to a specific worker or task queue. This can be helpful when:
A customer only wants to speak to one specific worker.
A customer sends an email with a technical question the worker who received it is unable to answer. However, the worker knows a specific worker or task queue who can help that customer.
You need to route tasks based on additional criteria beyond what is supported in TaskRouter’s workflows. For example, this can be helpful when you want to check task queue depth and route to a different task queue based on wait times.
To route a task to a person, task queue, or workflow, specify the worker, task queue, or workflow in the RoutingTarget parameter.
If you want to make sure that you don’t route a task to a worker who doesn’t currently have capacity, set the new IgnoreCapacity parameter to false. This parameter only applies when routing a task to a worker; it does not apply when routing to a task queue or workflow.
By default, the IgnoreCapacity parameter is set to true when routing to a worker, meaning that the worker will receive the task even if they don’t have capacity. For example, a customer who calls to speak to a specific worker can be routed to that person and leave a voicemail if they’re not available, rather than be routed to a different worker.
For more information about routing tasks, see our Task Resource documentation.