0
votes

I'd love some advice on my twilio setup for a problem I'm trying to solve.

Overview

A client can call our twilio number and have one of three cases to handle: - is our client and has a question - should be transfered to CC queue (2ppl), - wants to buy our services - should be transfered to Sales queue (7ppl), - has some other case - should be transfered to a different queue, lets call it Other (1 person)

Current solution

The client calls:

  • welcome message
  • we gather his digit input
  • enqueue a call to the appropiate queue
  • assign a task to an available worker with the conference instruction

Problem with the current solution

If there are no workers in the office to handle the call the client will wait forever until he hangs-up by himself. The wroker who answers doesn't know the clients phone number so he isn't able to fallow-up if neccesary.

Questions

  • After the client picks a queue i would like to check if I have any workers in the office in that queque (not in Offline mode). If everybody is on offline mode redirect to voicemail and a an email is sent to a specified email address with the caller phone number and voicemail recording url.
  • After the worker picks-up (accepts the reservation) send him a message with the clients phone number.
  • If no worker answers within a specified amount of time (for example 5 minutes) the call gets redirected to voicemail and a an email is sent to a specified email address with the caller phone number and voicemail recording url.
  • 2

    2 Answers

    2
    votes

    Twilio developer evangelist here.

    Answers in order, parts 1 and 3 need to talk about voicemail which I'll cover at the bottom:

    1. You can use a skip_if expression to skip a queue if there are no available workers.
    2. I assume this is using the reservation.conference instruction in the JavaScript SDK. You can actually inspect the reservation object at this stage too, check out reservation.task.attributes for all the task attributes, which should include the call attributes. You can use this to show your agent on screen or send them a message some other way.
    3. For this, you should set a timeout on your queue. When the timeout fires the task should drop through to the next queue in the workflow.

    Voicemail

    For parts 1 and 3 we are ejecting a task from one queue, but it needs to go somewhere else to be dealt with. You want to send the calls to voicemail, which doesn't require an agent to deal with it. Currently, the best way to deal with this is direct the task to a queue that has one bot worker in it. The job of the worker is to redirect incoming reservations straight to some TwiML. You achieve this by instantly responding to an assignment callback with the redirect instruction.

    To create voicemail, you can combine <Say> and <Record>. Make sure you set the recordingStatusCallback attribute to a URL in your application, you can then use the results to email the link to the voicemail recording.

    Let me know if this helps at all.

    0
    votes

    thank you for yout time to answer my questions. Below please find my reply: 1. It seems that this does not work in console - I find this information in the documentation "skip_if cannot be configured through the console - it must be posted on the workflow API". As I am not using the workflow API this is probably not a solution for me. 2. I using this tutorial: https://www.twilio.com/docs/quickstart/php/taskrouter/twiml-dequeue-call but instead of using dequeue instruction i use conference. I don't quit get how to "inspect the reservation" - maybe you have a tutorial on that? While looking for other solutions I came up with workspace event calback, but I am not sure if this would work. 3) How can I do that in the console?