I have my application integrated with Datadog for monitoring purpose. At the same time I want the notifications/calls to be sent to the team if any of the metric fails to achieve the desires value. I used Webhooks integration in Datadog for this purpose. In the webhooks configuration I have set the URL (Twilio request) and I do get a call on my number. Now I am looking for an scenario wherein if the user doesn't pick the call for say 30secs then try calling the second number. How do I achieve this?
Just use a find me Twimlet. Enter up to 10 numbers and a timeout between moving on to the next number. Twilio will do the rest.
https://www.twilio.com/labs/twimlets/findme
If you are looking for a more full featured paid solution I'd recommend PagerDuty. DataDog has an integration for PagerDuty. Any monitor that gets triggered that mentions #pagerduty-myteamname(as example) in the monitor message will cause PagerDuty to page the on call person. If that person does not acknowledge the page you can configure it to go through list of people to contact next until it is acknowledged by someone.
Related
I'm trying to figure out how I can implement a retry policy in a Twilio Studio Flow. I see that they have an example, but it only has a delay of no more then 10-seconds.
I want something that can use to retry when my webhooks service is down. I did setup the sample from the Twilio docs but it only seems to work when you want a delay of no more then 10-seconds. But I need it to pause for an hour or two. So say the HTTP Post step fails because the webhooks service is offline, I want it to pause for an hour and try again. Then pause for 2, then 3, then 4, etc. and try again. The point being, I don't want to lose the user's response.
What I am trying to do is not lose any of the user responses from a survey if my webhooks application goes down. We saw this happen in production for a couple of hours and we lost survey response from 200 users.
If this is not possible, is there a way I can reach back out to Twilio logs and get access to the responses that failed while the webhooks service was down? I recall running into something where you can pull back the logs, which could then be used to identify the ones that failed.
This kind of logic isn't really built into Studio. Ten second waits are typically the most you will see due to both Twilio Functions & the http request widget timing out at this point.
If you wish to include this kind of wait then you will need some sort of workaround where you go into a send & wait for reply widget (which ignores responses from your customers with some additional logic) and has a timeout set to the amount of time you want to wait. You can then transition to the webhook request again and re-attempt.
Alternatively, you can create a utility which uses the Execution resource to find all the failed flows for a given time period so you can choose how best to move forward.
We have set-up our Flex, and stuck on one of the last steps. We are a small office, and have a main number that clients call us on. If they ask for a specific employee, more importantly, if the specific employee is required to answer the client issue, and they are marked UNAVAILABLE, it doesn't appear we have access to send the call to voicemail (the transfer button is grayed out).
Is there a work around? A way to direct call the VM? Do we need to tweak our flow? If not, it appears we need to be logged in 24/7 to have access to VM's. A fairly inefficient and expensive option.
OK, I think I know what the issue is. A call comes through to one agent in Flex, but they need to transfer it to the other agent. If the other agent is also available, they can transfer the call no problem. If the other agent is not available, you would like to transfer the call to that agent's voicemail, but there's no way to do that right now.
The issue is that Flex is built around available agents and doesn't have voicemail built in. You've added voicemail as part of the Studio Flow, but this is not integrated to the Flex interface at all.
I would solve this with a Flex plugin that does a couple of things:
Add a button to the agent transfer list for unavailable agents to send to their voicemail.
That button would trigger a request to a Twilio Function, sending it the Call's Sid and the agent you want to transfer to.
The Function could then use the calls API to update the call, redirecting it to the existing voicemail handlers that you have for your agents.
I'm afraid I don't have example code for this plugin, but there is great documentation on building Flex plugins that you can follow to get up to speed.
Requirement
Our business requires us to expand the functionality of the transfer feature that is already built in to
Twilio Flex.
What exists today
Today's functionality (out of the box) is partially what we need with the Actions.TransferTask functions. The issue with this is that when we choose an agent to cold transfer to, and they're not available, the call gets put back in to a queue and picked up by the next available agent. This seems completely counter intuitive to how I would expect it to work as I would expect that call to go to voicemail if the agent is unable to pick up.
What we tried
We have logged a support ticket with Twilio to no avail. Any attempts to use the StartConferenceCall won't work because we're on an active call. Twilio functions' Dial doesn't seem to work as I don't seem to have access to my current call. (Dial is meant for calls that are about to happen?) But Dial seems to be the only process that allows digits to be passed. Therefore, conferences & participants don't seem to be the answer either.
What we do have though is a phone number that will end up in our primary work flow and if the incoming number is the aforementioned number, we skip the voice prompts, accept digits and redirect to the agent. This part works.
What we need
We're looking for a Twilio function or plugin Action (or some other method that I'm unaware of) that can cold transfer a call to another agent with no over flow to a queue (let it get picked up by voicemail).
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.
Twilio developer evangelist here.
Answers in order, parts 1 and 3 need to talk about voicemail which I'll cover at the bottom:
You can use a skip_if expression to skip a queue if there are no available workers.
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.
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.
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?
Is there a way to set a date and time for a Twilio SMS send request, or do I need to program that at the application level?
Twilio Evangelist here.
You need to build this into your own application. There are a load of different ways to do it, either with cron, or I like the Heroku Scheduler, but it depends on your tech stack. Let me know what you're using an I can add details of some other approaches in an edit.