How can I use Twilio queues without agents having to dial in? - twilio

I'd like to have a support queue and a sales queue that call an available agent when there's someone in the queue. The way queue functionality is described in the Twilio docs, it seems that the only way to connect an agent and a caller is to have the agent call into the queue. Well, that's no good for a queue that would be empty for most of the time -- how would they know when to dial in?
Is there a way for an agent to be called and then connected to the queue when someone is waiting?

Twilio developer evangelist here.
This is the exact use case for the Twilio TaskRouter API. From the docs:
Twilio TaskRouter is a system for distributing tasks such as phone calls, leads, support tickets, and other work items to the people and processes that can best handle them. Example applications for TaskRouter include:
Distributing calls to call center agents. TaskRouter supports common features required in call center environments, such as skills-based routing and task prioritization.
Prioritizing and assigning CRM cases to agents in order to make sure they're handled within service level. TaskRouter lets you specify overflow rules for tasks, allowing you to vary assignment rules based on time spent in queue and case content.
Distributing leads to inside sales teams. TaskRouter's business rules allow you to control prioritization so that your team is always working on the most important opportunity.
Check out the quickstart guide for TaskRouter which takes you through creating a workspace and workers and creating tasks for the workers from phone calls.

Related

Twilio TaskRouter - how to include certain Unavailable workers to pick up tasks?

In our Twilio application we would like to use TaskRouter to distribute incoming calls. Suppose we would like to handle the following scenario:
All Workers login to front-end application and have their status set to Available. If there are any incoming calls, Workers receive them in the UI.
Some Workers have this custom attribute: {"work_hours": [600, 1600], "phone_numbers": ["+1...", "+1..."]}. If for some reason this Worker becomes Unavailable during their working hours set between "work_hours" attribute, we would still like to have incoming calls forwarded to their personal phones from "phone_numbers" attribute.
If the above fails, we would like to forward the incoming call to Voicemail.
Basically, my question is whether it is possible to include Unavailable workers to Workflows and Task Queues? The above scenario would most likely require 3 Task Queues: one for all Available Workers, one for Unavailable but with "work_hours" attributes where taskrouter.currentTime is between those hours and one for Voicemail.
Twilio Solutions Architect here!
I think that you may already found a solution for your problem, but in case someone else is having this problem, here's my solution:
The best way to do this is actually creating a new Activity on TaskRouter of type Unavailable with Work Hours that is is an available Activity. With that state created, you can set the worker availability to this state when they are on this use case, and with the Task Router Workflows, you can have specific queues for these agents and using the routing strategies, bring a task to this queue if necessary.
Regarding to call the agents on their personal phone numbers, you can create a conference between the original call and the agent's phone number and have them connected.
This is a bit tricky, but is completely possible.

Implementing warm transfers programmatically with Taskrouter

I'm trying to implement warm transfers programmatically with taskrouter (transfer to internal queue, transfer direct to agent).
As I understand, when using the flex UI buttons to transfer, the assigned task gets reset back to reserved and a new reservation is created for the new worker to accept and join the conference.
When implementing cold transfers, the "Enqueue" Twiml can seamlessly handle task creation and worker assignment, however it also completes the initial worker reservation, which is not suitable for warm transfers.
How can I implement a warm transfer that does the following?
Reset task assignment status to reserved
Create a new reservation linked to the new worker
On reservation acceptance, join the already existing conference
Thanks
Twilio developer evangelist here.
This flow is best described in a visual form and there is a diagram below:
The important thing here is that you do not work with the original task, but create a new one that can be assigned to a worker or queue. Once that reservation is the accepted, direct the new agent into the existing Conference where the warm transfer can then take place.

Real time data on calls in queue

How can I see in real time (by the second) how many calls are in queue to be answered by an agent? Our current software shows if people are in queue to be answered by an agents which allows us to make sure all agents are helping out at that time. When testing, nothing in the dashboard in Twilio is informing me that callers are waiting to be answered by an agent. Ideally the same information would also be required for incoming calls into the IVR
Take a look at this TaskRouter API:
REST API: TaskQueue Statistics
https://www.twilio.com/docs/taskrouter/api/taskqueue-statistics

Prevent worker from receiving voice tasks by updating their voice channel capacity

I'm currently using task router to route calls to my workers and I want to temporarily prevent certain workers from getting assigned voice tasks. I thought by updating the worker channel capacity for voice to 0 or marking the voice worker channel as unavailable would mean that while the worker remains a part of the queues (based on their custom attributes), if there are any voice tasks coming in, they would not be assigned to that worker. That does not seem to be the case, my worker still receives reservations for voice tasks.
I tried to update my queue to only include workers that have voice capacity by adding this check to the Queue expression '... AND worker.channel.voice.configured_capacity > 0', however when saving the queue in the Console, I get an error saying 'Worker channel capacity expressions not allowed in TargetWorkersExpression on TaskQueue' which leads me to believe that this is not the right thing to do.
The only other solution I can see is to add the worker channel capacity check mentioned above to the target expression at every step of my workflow but that would be harder to maintain.
I can't help but feel that there's something I've missed or misunderstood about how the worker channel capacity works or what it is used for. For what is worth, multitasking is disabled for my workspace.
Twilio developer evangelist here.
Adjusting the capacity when you are not using multitasking won't make a difference.
I would recommend using a custom attribute on the worker and then filtering based on that within the target workers expression instead.

Best way to build my call center using Twilio

I am working on building a call center using Twilio.
Parts of problems are tackled in questions and some answers are old. Given that what I am trying to do is one of the most common usecases, I am trying to use this question to build a tutorial so that people know what is the state of the art way to build this.
Usecase detail is below:
Call Tree:
Customers will call the Twilio number through phone.
Based on phone no identification high priority customers will be sent to Agent handling flow
Other customers have a call tree which they have to navigate, which will support them. Some customers might end up on Agent handling flow.
Call Center: Agent handling flow is as follows:
Agents are handling calls using their desktop computers. They are on the support page which has a Twilio phone call widget as a pop up window.
All agents can handle all calls.
There are two types of queues. High priority and Normal.
All available agents ring at the same time. Anyone can pick and then other agents are moved to the next caller if available.
If not agent available wait for some time, including giving an IVR option for voicemail.
After wait timeout send to IVR.
Following is based on my understanding. Please let me know if there is a better way.
Call Tree will work as per the following tutorial: https://www.twilio.com/docs/tutorials/walkthrough/ivr-phone-tree/node/express
Call Center Agent handling flow will work as follows:
Once workspace
n Workers
2 Task Queues - High priority and Normal
One Workflow which decides based on the task priority which queue to assign to.
My current queries are as follows:
What is the cleaned way of implementing wait for an agent for 1 minute and if agent is not available in 1 minute send to voicemail. Is this part of workflow?
What is the best way implement call receiving in browser. Webrtc?
Is there an HTML widget available for the implementing call receiving in the browser. This would include features like setting agent online/offline, receive call, end call, escalate to supervisor
Help with this will be really appreciated and will help avoid wild goose chases.
Andy , you should look at Twilio taskrouter .
1 You can use task reservation timeout to achieve your requirement 1 . Create a task for an incoming call , taskrouter can direct the call to the matching agent and if the reservatoin timeout is set to 1 minute , the task can be redirected to either a different agent or an IVR as you require
2 You can use Twilio Client , Twilio's WebRTC . You can set incoming/outgoing capabilities as required and can easily integrate with Taskrouter to handle incoming/outgoing calls.
[3] You can build a dialler easily to implement Twilio Client , here's a tutorial to help you progress : https://www.twilio.com/docs/quickstart/client/javascript . You can find a starter up implemented in C#,Java,nodejs,php,python and ruby.
Additionally, you will find this call centre blueprint useful :) https://github.com/nash-md/twilio-contact-center .

Resources