News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
How do we get results from the assorted call log & analytic APIs that tie out with the Performance Reports in the UI?
Tags: analytics and reporting
Sep 22, 2022 at 3:08pm   •   1 replies  •  0 likes
Rob DiCecco

I've been beating my head against the wall trying to tie out data from the API to our UI performance reports to no avail. Whether I look at the Timeline data, the Aggregate (queue) data, or the Detailed Call Logs, I can't ever seem to get the same answer via the API that I see in the interface. Even going so far as looking at a single call (Session ID) and comparing that to the call details in the Performance Report, I see different durations in the API returned call data from what appears in the UI.

For this example, I'll focus on just the aggregation fetch, summarized at the queue level vs. the Queue view in the Performance Report for a single queue. Even putting aside duration, I don't see the same call counts. Filtering the Performance Report to 9/13 and focusing on the Advanced Solutions Team (one of our queues,) the Performance Report shows 67 inbound calls, 62 answered, with 5 abandons, 23 holds, 11 refused calls and a 92.5% Service Level. The API JSON return shows – 66 inbound calls, 62 answered calls (one thing that matches,) 14 abandoned calls, 23 calls placed on hold (the other item that matches,) and 62 calls within Service Level & 4 out of service level. Interestingly, 62 calls in SL out of 66 total, would be a 93.9% Service Level while 62 calls within Service Level out of the total shown in the UI of 67 would in fact be a 92.5% service level.

I've included a screenshot of the UI Performance Report I'm using below. The API call and the relevant portion of the JSON response are below as well. What on earth am I doing / interpreting wrong?

API Call -

URI - https://platform.ringcentral.com/analytics/calls/v1/accounts/~/aggregation/fetch?page=1&perPage=200

Body:

{

"grouping": {

"groupBy": "Queues"

},

"timeSettings": {

"timeRange": {

"timeFrom": "2022-09-14T04:00:00.000Z",

"timeTo": "2022-09-15T03:59:00.000Z"

},

"timeZone": "America/New_York"

},

"callFilters": {

"directions": [

"Inbound"

]

},

"responseOptions": {

"counters": {

"allCalls": {

"aggregationType": "Sum"

},

"callsByDirection": {

"aggregationType": "Sum"

},

"callsByOrigin": {

"aggregationType": "Sum"

},

"callsByResponse": {

"aggregationType": "Sum"

},

"callsSegments": {

"aggregationType": "Sum"

},

"callsByResult": {

"aggregationType": "Sum"

},

"callsByQueueSla": {

"aggregationType": "Sum"

},

"callsByActions": {

"aggregationType": "Sum"

},

"callsByType": {

"aggregationType": "Sum"

}

},

"timers": {

"allCallsDuration": {

"aggregationType": "Sum"

},

"callsDurationByDirection": {

"aggregationType": "Sum"

},

"callsDurationByOrigin": {

"aggregationType": "Sum"

},

"callsDurationByResponse": {

"aggregationType": "Sum"

},

"callsSegmentsDuration": {

"aggregationType": "Sum"

},

"callsDurationByResult": {

"aggregationType": "Sum"

},

"callsDurationByQueueSla": {

"aggregationType": "Sum"

},

"callsDurationByType": {

"aggregationType": "Sum"

}

}

}

}

JSON Response for the Advanced Solutions Team:

{

"key": "466272027",

"info": {

"extensionNumber": "835",

"name": "Advanced Solutions Team"

},

"timers": {

"allCalls": {

"valueType": "Seconds",

"values": 24336.79

},

"callsByDirection": {

"valueType": "Seconds",

"values": {

"inbound": 24336.79,

"outbound": 0

}

},

"callsByOrigin": {

"valueType": "Seconds",

"values": {

"internal": 817.415,

"external": 23519.375

}

},

"callsByResponse": {

"valueType": "Seconds",

"values": {

"answered": 24034.051,

"notAnswered": 302.739,

"connected": 0,

"notConnected": 0

}

},

"callsSegments": {

"valueType": "Seconds",

"values": {

"ringing": 3762.024,

"liveTalk": 14263.727,

"hold": 7451.89,

"park": 0,

"transfer": 212.3,

"ivrPrompt": 0,

"voicemail": 43.445,

"vmGreeting": 11.307,

"setup": 8.798

}

},

"callsByResult": {

"valueType": "Seconds",

"values": {

"completed": 19045.405,

"abandoned": 5040.912,

"voicemail": 250.473,

"missed": 0,

"accepted": 0,

"unknown": 0

}

},

"callsByQueueSla": {

"valueType": "Seconds",

"values": {

"inSla": 24034.051,

"outOfSla": 302.739

}

},

"callsByType": {

"valueType": "Seconds",

"values": {

"direct": 0,

"fromQueue": 20188.136,

"parkRetrieval": 0,

"transferred": 4148.654,

"outbound": 0

}

}

},

"counters": {

"allCalls": {

"valueType": "Instances",

"values": 66

},

"callsByDirection": {

"valueType": "Instances",

"values": {

"inbound": 66,

"outbound": 0

}

},

"callsByOrigin": {

"valueType": "Instances",

"values": {

"internal": 3,

"external": 63

}

},

"callsByResponse": {

"valueType": "Instances",

"values": {

"answered": 62,

"notAnswered": 4,

"connected": 0,

"notConnected": 0

}

},

"callsSegments": {

"valueType": "Instances",

"values": {

"ringing": 144,

"liveTalk": 62,

"hold": 23,

"park": 0,

"transfer": 11,

"ivrPrompt": 0,

"voicemail": 1,

"vmGreeting": 1,

"setup": 14

}

},

"callsByResult": {

"valueType": "Instances",

"values": {

"completed": 51,

"abandoned": 14,

"voicemail": 1,

"missed": 0,

"accepted": 0,

"unknown": 0

}

},

"callsActions": {

"valueType": "Instances",

"values": {

"parkOn": 0,

"parkOff": 0,

"holdOn": 14,

"holdOff": 0,

"blindTransfer": 0,

"warmTransfer": 8,

"dtmfTransfer": 0

}

},

"callsByQueueSla": {

"valueType": "Instances",

"values": {

"inSla": 62,

"outOfSla": 4

}

},

"callsByType": {

"valueType": "Instances",

"values": {

"direct": 0,

"fromQueue": 58,

"parkRetrieval": 0,

"transferred": 8,

"outbound": 0

}

}

}

}

1663881438114.png

1 Answer
answered on Sep 23, 2022 at 7:15am  

It is so hard to read your question. No paragraphs.

All I could easily see is the different time range between the comparations.

From your API call

"timeSettings": {

"timeRange": {

"timeFrom": "2022-09-14T04:00:00.000Z",

"timeTo": "2022-09-15T03:59:00.000Z"

},

"timeZone": "America/New_York"

},


And from your UI dash board

screen-shot-2022-09-23-at-71110-am.png


I don't know how you expect to see the same result.


 0
on Sep 23, 2022 at 7:52am   •  0 likes

Thanks Phong, keen eye :) You are right, the date shown in my sample is wrong, it's actually from a later run testing to see if a different day got any closer (it didn't.) The call that returned the sample response JSON is for the correct date -

"timeSettings" : {
"timeRange" : {
"timeFrom" : "2022-09-13T04:00:00.000Z" ,
"timeTo" : "2022-09-14T03:59:00.000Z" }

...


The API requires Zulu time (at least as I understand it) hence the peculiar 04:00:00.000 thing.




on Sep 23, 2022 at 7:55am   •  0 likes

I think the UI dashboard detects and uses your local time zone set in your computer. You use that time zone in the API call to make sure that the date and time ranges are the same.

on Sep 23, 2022 at 8:18am   •  0 likes

I've tried that adjusting the stated time range in the API call too, to no avail.

Even if I change the call to reflect -

"timeSettings" : {
"timeRange" : {
"timeFrom" : "2022-09-13T00:00:00.000Z" ,
" timeTo" : "2022-09-13T23:59:00.000Z" },
"timeZone" : "America/New_York"
}


I get exactly the same results (we don't really get any call volume at the extreme fringes of the day anyway.)

I tried to copy-paste the response here, but it won't let me even once I edit it for length...


on Sep 23, 2022 at 9:28am   •  0 likes

Is this a copy/paste from the actual request params? There is a long space in the key.

" timeTo":

on Sep 23, 2022 at 9:46am   •  0 likes

I manually edited the paste a little to make it view a bit better in the response window here. It's not throwing an error or anything.




A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us