Twilio API Stats Calls to Retrieve Agent Average/Max/Total Hold Times? - twilio

Is there a REST statistics API call that can be made that would retrieve the average, max, etc. hold times for Twilio tasks, queues, or workers/agents?
I see statistics that can show a participant being on hold at the current time, but not for reportable statistics on hold times.

Twilio developer evangelist here.
I believe you are looking for the TaskQueue Statistics API.

Related

number of requests supported per second by watson assistance, dialog flow and amazon lex

I have been consulting and I have not been able to find out how many requests per second each one can receive without affecting its operation since in the different web pages of these services they give me data per month.
thanks to whoever can help me....
Here are the details pertaining to AWS Lex's limitations.
When using the PostContent or PostText operations in text mode, the maximum number of concurrent conversations with a bot is 2 for the $LATEST alias and 50 for all other aliases. The quota applies separately for each API.
You can read more about it here: https://docs.aws.amazon.com/lex/latest/dg/gl-limits.html#gl-limits-runtime
The processing time would depend on whether you have Lambda functions attached to your Lex bot and how long they take to execute.

YouTube Data API is counting too many requests

For the last few weeks, the YouTube Data API (v3) is showing a significant increase in requests. In fact, we hit the 50k quota limit every day, which means that requests in the afternoon/evening tend to fail with a quota exceeded error:
However, this usage count is not correct. We use a single API key for making requests to the YouTube API, and the Google Cloud API counter only shows ~2k uses per day for that API key.
All requests to our server endpoint that calls the YouTube API also pass through Cloudflare, which similarly shows <2k requests per day.
We just make a single request to www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&... – is it possible that these requests count as multiple queries? Or is there any other reason that could explain the incorrect query counts? Thanks!
This is a recurrent issue with the YouTube Data API quota system, that is caused by confusing terms used within Google's cloud console.
You have to acknowledge that YouTube's Data API quota system is not accounting for the number of queries one is making. Instead, the API attaches to each kind of its endpoint a quota cost, and, thus, is accounting for the sum of quota cost of all endpoint calls one is making.
Moreover, inspecting the quota costs page I mentioned above (or the official doc page of the endpoint for that matter), you'll see that the Search.list API endpoint is quite expensive: 100 units of quota cost.
Consequently, to reach a quota cost of 50000 units, your app has to issue only 500 calls to Search.list (this amounts on average to approximately one call at every three minutes per day).

Can I use a Twilio Flow to call a group of sales team numbers, wait for one to answer, THEN call the new lead and connect the two?

I'm new to Twilio and don't write code, but it seems like this can be done in Studio, I'm just not seeing how yet.
So far, I've used Studio to make a very basic flow that calls a sales lead, then connects the call to sales agents. Basically, a new sales lead submits a Google Form with their phone number on it, then, using webhooks by Zapier, that number gets sent to the Rest API that triggers the Flow. I use a "Make Outgoing Call" widget to call the lead, a Say/Play widget to ask the lead to wait while being connected, then a "Connect Caller to" widget to connect the lead to the first agent that answers (of several called at the same time). It works great, but we would rather reverse it so that the list of agents is called first. Once an agent answers, then Twilio calls the new lead (contact.channel.address) and connects the two.
Is there a way to do this in Studio? The "Make Outgoing call" widget only calls the contact.channel.address and I'm not seeing any way around this. Maybe there's a different widget or app that I need to use?
Thanks,
Steve
Unfortunately, there isn't a straightforward way to do this using all Studio Widgets.
The Multiple Numbers (Simulring) approach tends to be problematic in practice, since the sales agents often have voice mail enabled on their mobile devices and even if you set a dial timeout to cancel the call leg before their voice mail picks up, sometimes their devices are out of cell coverage or turned off/on do not disturb, etc and go right to voicemail, which will result in the sales lead being connected to the sales agents voicemail rather than a live sales agent.
Reversing the flow, where the sales agents are called first requires a variation of the Make Outgoing Call Widget which you've seen is not supported in Studio. The Make Outgoing Call Widget uses the Twilio Voice Calls API and would also a problematic in your use case since by default, each Twilio account has 1 Call Per Second, so unless the dialed sales agent list is randomly shuffled, the first agent on the list would have the greatest opportunity of answering the call as the other sales agents are queued and released at 1cps; you still have the Voicemail issue which you could possibly address using Answering Machine Detection/AMD Logic or Human Detection/Alternatives to AMD. You also need to handle the Simuluring logic in your code (since it is built into the Dial verb but not a part of the Twilio Voice Calls API), calling multiple parties/sales agents and then cancelling outstanding attempt call legs when a sales agent successfully answers the call.
One possible option, but not practical in Studio, is to use SMS to alert the agents of the sales lead and a messaging service (Copilot w/Scaler for higher SMS throughput - understanding the carriers can filter Long Codes and Toll Free). One Toll Free, which should not be used with Scaler would give you 3 messages per second throughput, and the first agent to respond to the SMS gets called by Twilio and then complete the connection to the sales lead.
So this is a build effort.

Twilio Conference vs Call

In Twilio, when creating an outbound Call we don't have ability to add third person later. But we can do it when using a Conference. Calls are a bit cheaper than conferences. So it looks strange, why should anyone bother with creating outbound Calls and not start Conference directly?
To summarize: is there any advantage of using Call vs Conference for "regular" (two person) outbound calls? Besides small cost factor.
For two person is not difference, the difference through the documentation is for big groups of call members. The difference between both is to keep latency down that is the main difference with other services.
Conference
Allows for audio conference calls with up to 250 participants. The calls are automatically hosted in the closest of the six geographic regions Twilio currently offers to keep latency down.
For calls with more than 250 participants Twilio’s new “Epic Conference” service can now handle an unlimited number of participants.
But, I concrete:
is there any advantage of using Call vs Conference for "regular" (two person) outbound calls? No, is'nt any advantage., the main feature is for big groups.

How are Outbound Call Rates calculated

How are outbound call rates calculated? Is there an API we can Query?
On Twilio Website I can pick "making calls from Canada -> [Select a country]" but if I'm asking Twilio to initiate a call, how does it work?
Is it assuming my calls are all initiated from Canada (because of my account's origin)?
Is it a flat rate?
I am not sure about an API query, but they do have csv files that contain the voice pricing. I upload the csv files into my application so that I can determine the costs myself. You can though use the usage api, which will allow you to get the costs after the call, though I prefer being able to calculate the costs server side as well.
they charge for each leg of a call, so if you are using the Twilio client to call a mobile number for example, you will be charged for the outbound leg of the client and also the leg to the mobile number. I believe the client leg price is a flat rate, at this moment you can see the client pricing here, https://www.twilio.com/client/pricing, after that you will add the number price, in your case Canada, pricing can be found here, https://www.twilio.com/voice/pricing/ca
I believe this would be a starting point at the current prices, for a 1 minute call using the Twilio client to a Canada local number.
Client => $ 0.0025
Local Number => $ 0.015
Total (1 minute) -> $ 0.0175
The billing is also per minute, so they will always round up to the nearest minute, https://www.twilio.com/help/faq/voice/how-do-you-round-minutes-for-billing
Here is another SO link regarding calculating pricing, Twilio total call duration does not match with billing minutes
I hope this helps.

Resources