Setting up a TaskRouter Workspace: Add and Configure Workers

Workers represent the people or processes that perform Tasks. In our example, Workers represent human agents handling incoming voice calls. We plan to intelligently route calls by matching the language skills of our Workers to the language requirements of incoming callers. Specifically, both of our Workers will be capable of handling requests in English, but only one in Spanish.

With your Workspace open in the TaskRouter web portal, click 'Workers' then 'Create Worker'.

Worker #1

Our first Worker Alice will be capable of both English and Spanish language Tasks.

Worker attributes are described using JSON. Add a "languages" field to Alice's Attributes object and set its value to an array as below.

Alice's Worker Attributes Expression: {"languages": ["en","es"]}

Worker #2

Rinse and repeat. Create another Worker named 'Bob' who is exclusively capable of handling Tasks in English.

Bob's Worker Attributes Expression: {"languages": ["en"]}

Excellent. We have two Workers with attributes that reflect their respective skills.

Next: Add Task Queues »

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.