0

There is one task Assigned to WORKER A, however after spending sometime, WORKER A realized, this can not be handled by own and needs to be transferred to WORKER B.

How can we achieve this using Twilio Task Router?

Vinit Prajapati
  • 1,593
  • 1
  • 17
  • 29

1 Answers1

2

First you have to understand how is the lifecycle of a Task.

  1. When the task is created. the first state is pending.
  2. Then, Twilio will look for a worker who has capacity to get this Task.
  3. The task is now reserved.

When a Task is reserved, this task could not be assigned to a new agent, because it violates the Task LifeCycle. (https://www.twilio.com/docs/taskrouter/lifecycle-task-state)

If you are going to solve this problem, you have two options:

  1. If you want a Flex solution for the twilio flex plattaform you can use a plugin available (https://www.twilio.com/docs/flex/solutions-library/chat-and-sms-transfers)

  2. If you want to solve it with a backend solution. you have to first:

  • delete or complete the Task.
  • Create a new one with the same Task attributes to preserve the data in the conversation.
  • Create a new channel to communicate the worker with the task user.
  • Assign the task to the workerSid (WorkerB). Remember that, you have to handle if the worker B has no capacity to recieve a new Task
Fabio Zapata
  • 121
  • 8
  • 1
    Here is sample by twilio that also have this feature implemented https://github.com/vernig/twilio-taskrouter-agent-frontend – Bilal Mehrban Jun 25 '21 at 06:47