News & Announcements User Community Developer Community

Welcome to the RingCentral Community

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

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
Analytics API Data Source
Tags: analytics and reporting, rest api
Oct 15, 2021 at 10:13am   •   6 replies  •  2 likes
David Radabaugh


I'm trying to use the analytics API to create some useful performance metrics for our users, but the data isn't matching what I would expect so it would help to understand where it's coming from.

For example, I have an API call that uses callsByResponseType, but when I evaluate the results against the call log, they don't match. For example, I have someone who, according to the analytics API, answered 22 call queues last month. However, looking at the call log I can see at least 40 that they answered.

I'd like to figure out how the API calculates those totals so I can figure out what's causing the discrepancies.

Thank you!

6 Answers
answered on Nov 2, 2021 at 10:16am  

Hi David, can you please respond to the email (sent by Tanvi) with more information about your request as we need that about your account to investigate and resolve this issue Thanks!

answered on Oct 28, 2021 at 1:15pm  

Thanks for sharing the code snippets David. Please note the time discrepency in the two API calls - Call Performance Analytics one starts at 06:00:00.000Z vs Call Log one at 00:00:00.000Z. Can you make both of them same and compare the results again? We are also investigating this on our side and I'll reach out to your privately for some more information.

answered on Oct 28, 2021 at 1:39pm  

Hello Suyashi. Matching the times does not change the results. Users do not receive calls during those hours.

on Oct 28, 2021 at 3:23pm   •  0 likes

Ok, noticed the dates are also different. Can you run the code by changing it to match the date like Sep1 to Oct1 at the same time for both the APIs and report if you still see a significant discrepency?

answered on Oct 26, 2021 at 2:38pm  

Hi David, thanks for the patience, after some investigation here is what I have found regarding your problem. One cannot match calls by response types to total calls because outbound calls do not have responses & that gap will always cause discrepancy as such calls will not get counted.

Regarding your use case for being able to see the number of calls each user picked up directly from a queue- the API can provide that information. Please see the latest API Docs for the same :

answered on Oct 27, 2021 at 7:58am  


I'm aware that outbound calls do not have responses. My concern is that the numbers from the Analytics API do not seem to match the numbers in the call log.

For example, according to the analytics API, one user answered 22 calls from queues. However, according to the rest API call log (which I have filtered to exclusively inbound calls), he has answered at least 37 queue calls.

I want to know why there is a discrepancy between the call log and the analytics API.

call to the call log

        private static string callLog(string _bToken)
            var client = new RestClient("" + user_acc + "/call-log?dateFrom=2021-09-01T00:00:00.000Z&dateTo=2021-09-02T00:00:00.000Z&perPage=2000&direction=Inbound");
            client.Timeout = -1;
            var request = new RestRequest(Method.GET);
            request.AddHeader("Content-Type", "application/json");
            request.AddHeader("Accept", "application/json");
            request.AddHeader("Authorization", _bToken);
            var body = @"";
            request.AddParameter("application/json", body, ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
            return response.Content;

call to the analytics API

        private static string analyticsResp(string _bToken)
            DateTime dt = DateTime.Now;
            string startOfMonth = new DateTime(dt.Year, dt.Month, 1, 7, 0, 0).ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffZ");
            string curDT = dt.AddDays(1).ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffZ");
            var client = new RestClient("");
            client.Timeout = -1;
            var request = new RestRequest(Method.POST);
            request.AddHeader("Content-Type", "application/json");
            request.AddHeader("Accept", "application/json");
            request.AddHeader("Authorization", _bToken);
            var body = @"{" + "\n" +
            @"  ""grouping"": {" + "\n" +
            @"    ""groupBy"": ""Users""" + "\n" +
            @"  }," + "\n" +
            @"  ""timeRange"": {" + "\n" +
            //@"    ""timeFrom"": """ + startOfMonth + @"""," + "\n" +
            //@"    ""timeTo"": """ + curDT + @"""" + "\n" +
            @"    ""timeFrom"": ""2021-09-01T06:00:00.000Z""," + "\n" +
            @"    ""timeTo"": ""2021-10-01T00:00:01.000Z""" + "\n" +
            @"  }," + "\n" +
            @"  ""responseOptions"": {" + "\n" +
            @"    ""counters"": {" + "\n" +
            @"      ""callsByResponseType"" : {" + "\n" +
            @"          ""aggregationType"": ""Sum""" + "\n" +
            @"      }" + "\n" +
            @"    " + "\n" +
            @"    }" + "\n" +
            @"  }" + "\n" +
            request.AddParameter("application/json", body, ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
            return response.Content;

answered on Oct 15, 2021 at 10:41am  

Hi David, This is a great question and certainly you can get similar metrics from both of these APIs. I'm curious what your HTTP POST JSON Body looks like to understand how you are setting up the query. The data should be same if all things are equal. Do note that the Analytics API is mostly high level where it shows aggregate information. Btw are you in our beta team ? I can tag you and our PMs to discuss this further, otherwise we can communicate here. You can also email me and we can setup a 30 min meeting if needed.


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

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

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