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 to resolve a CMN-103 error when calling the Analytics API
Tags: analytics and reporting
Sep 29, 2023 at 4:32pm   •   0 replies  •  0 likes
Byrne Reese

The RingCentral Analytics API has one of the most complex request formats among all RingCentral APIs. If there is the smallest error made in formatting this request, then the API will return an HTTP 400 Bad Request with an error code of CMN-103.

The precise fix is impossible to document in this article, as everyone's code and apps are different. But the following can help you troubleshoot:

  1. Start with a code sample you know works. Then make modifications incrementally, testing each change you make as you go.

  2. Pass only the request parameters you require. Most of the parameters in an Analytics API request are optional. By passing in only the elements you require, you minimize the number of error you may unintentionally introduce.

With that advice in hand, if you are looking for a fully-formed request payload that you know will work, then try the following:

 {
   "grouping": {
     "groupBy": "Users"
   },
   "timeSettings": {
     "timeZone": "America/Los_Angeles",
     "timeRange": {
       "timeFrom": "2022-08-25T21:57:12.252Z",
       "timeTo": "2023-01-10T21:57:12.252Z"
     }
   },
   "responseOptions": {
     "counters": {
       "allCalls": {
         "aggregationType": "Sum"
       },
       "callsByDirection": {
         "aggregationType": "Sum"
       },
       "callsByOrigin": {
         "aggregationType": "Sum"
       },
       "callsByResponse": {
         "aggregationType": "Sum"
       },
       "callsSegments": {
         "aggregationType": "Sum"
       },
       "callsByResult": {
         "aggregationType": "Sum"
       },
       "callsByCompanyHours": {
         "aggregationType": "Sum"
       },     
       "callsByActions": {
         "aggregationType": "Sum"
       },
       "callsByType": {
         "aggregationType": "Sum"
       },
       "queueOpportunities": {
         "aggregationType": "Sum"
       }
     },
     "timers": {
       "allCallsDuration": {
         "aggregationType": "Sum"
       },
       "callsDurationByDirection": {
         "aggregationType": "Sum"
       },
       "callsDurationByOrigin": {
         "aggregationType": "Sum"
       },
       "callsDurationByResponse": {
         "aggregationType": "Sum"
       },
       "callsSegmentsDuration": {
         "aggregationType": "Sum"
       },
       "callsDurationByResult": {
         "aggregationType": "Sum"
       },
       "callsDurationByCompanyHours": {
         "aggregationType": "Sum"
       },
       "callsDurationByType": {
         "aggregationType": "Sum"
       }
     }
   }
 }



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