yc_tech | 2018-04-05 07:54:29 UTC | #1
We are using Purecloud Analytics API to find the no. of attempted outgoing calls by user. This information is given by the nOutboundAttempted parameter, which is not returned in the query result. This is the query body:
{ "interval": "2018-03-02T00:00:00/2018-04-01T00:00:00", "groupBy": [ "userId" ], "filter": { "type": "and", "predicates": [ { "dimension": "mediaType", "value": "voice" }, { "dimension": "direction", "value": "outbound" } ] }
We are doing a simple aggregate query using this endpoint : api/v2/analytics/conversations/aggregates/query/
The result has metrics such as tTalk, tHeld, tAnswered, tAcw, tHandle, etc. but we need the nOutboundAttempted metric which is not returned.
Kindly note that the query body has filters, which will filter outgoing voice calls. The nOutboundAttempted parameter is not returned even when all filters are removed.
tim.smith | 2018-04-05 14:56:04 UTC | #2
Per the metrics documentation nOutboundAttempted is documented as "The number of oubound calls attempted by the Dialer." This statistic will not include manually dialed calls. Analytics results do not include metrics for which there is no data.
yc_tech | 2018-04-07 10:57:58 UTC | #3
Thanks for the clarification @tim.smith
We need to find the no. of attempted outgoing calls made by each agent within a time interval. Is there any other metric which gives this information?
tim.smith | 2018-04-09 13:09:26 UTC | #4
Yes, any of the metrics that you are getting back that happen once per call are suitable to identify the number of calls the agent handled. Look at the count statistic to get a count.
yc_tech | 2018-04-10 06:08:19 UTC | #5
@tim.smith, I checked that, there is some difference in the counts returned from the API call and the count of calls shown in the interactions screen in our mypurecloud account. We checked the counts for one agent named Sachin.
This is the count returned from the API:
{ "metric": "nError", "stats": { "count": 7 } }, { "metric": "nStateTransitionError", "stats": { "count": 1 } }, { "metric": "tHandle", "stats": { "max": 1051140, "min": 623, "count": 79, "sum": 9099321 } }, { "metric": "tHeld", "stats": { "max": 61465, "min": 61465, "count": 1, "sum": 61465 } }, { "metric": "tHeldComplete", "stats": { "max": 61465, "min": 61465, "count": 1, "sum": 61465 } }, { "metric": "tTalk", "stats": { "max": 1051140, "min": 623, "count": 78, "sum": 9037856 } }, { "metric": "tTalkComplete", "stats": { "max": 1051140, "min": 623, "count": 78, "sum": 9037856 } }
The count of tHandle shown here is 79, and tTalk is 78. However, in the interactions screen, the total count of outbound calls for the same agent in the same time interval is 150. This is the query body:
{ "interval": "2018-04-09T00:00:00.000Z/2018-04-10T00:00:00.000Z", "groupBy": [ "userId" ], "filter": { "type": "and", "predicates": [ { "dimension": "mediaType", "value": "voice" }, { "dimension": "direction", "value": "outbound" } ] } }
In the interactions screen, we have used the same filters as mentioned in the query body, still we are getting more no. of calls.
tim.smith | 2018-04-16 14:11:47 UTC | #6
Your filter is probably a bit different than what's being used in the view. If you can pick a short interval and compare the detail results, you can figure out which conversations are being included in one result set and not the other and refine your filter appropriately.
system | 2018-05-17 14:20:59 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2704