Visualize Your Business Communications History

Not just a picture, a graph is also worth a thousand words, right? If you want to view your business communications history on a chart rather than looking at a tedious table of rows and columns, go ahead to read this article as I am going to show you how to access your company’s call log dataset, process the data and display the information on graphs.

RingCentral call log:

Under RingCentral communications services, every customer’s account has its own call log dataset which is a collection of essential metadata of inbound and outbound voice calls and faxes. The essential metadata might not contain everything you would need to fully analyze your business communications. However, it does provide sufficient data that helps you understand the trend and pattern of your company’s communications history. The call log data also contains basic billing information and the information about the binary content of a recorded call.

RingCentral account’s call log can be viewed from the on a table view.

Typical RingCentral Call Log dashboard

And the call log dataset and recorded calls can also be downloaded manually by clicking the Download button on the console panel.

Download Call Log or Recorded Calls

Alternatively, the company’s call log database can be accessed programmatically using the call-log API. Accessing the database via the call-log API is the most convenient way to retrieve interested call log dataset to sync with your own database or to process the data the way we want to. There are two access levels to inquire call log dataset from the database:

  1. allows users with the admin role to access the entire company account’s call log database. This is the endpoint to read call log at the account level: ‘/restapi/v1.0/account/{accountId}/call-log’. .
  2. lets a user access his/her own call-log data. This is the endpoint to read call log at extension (user) level: ‘/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-log’.

If you are interested in learning from the code, please check out the following projects in different programming languages:

Or click on one of the links below to browse the step-by-step tutorial:

The call-log API’s response data can be optimized by specifying . For instance, the following query parameters will result in reading only inbound voice calls dataset from a period of time between Oct. 1st 2017 and Nov 30th 2017.

The view query parameter can be specified as “Simple” or “Detailed” to fetch basic or extended call log information, respectively.

Read call log with the call-log API:

A success response from the call-log API is a JSON object with an array of call log records. Every record item contains basic or extended metadata about a call depending on the view query parameter value.

Here are some most useful information of a call/fax we can query using the call-log API:

“direction” is the direction as Inbound or Outbound of a voice call or a fax.

“duration” is the call duration in seconds of a voice calls or a fax.

“type” is the communication type as a Voice call or a Fax call

“from” contains the caller’s phone number and name (if existed). And other information such as the location (city, state) if it can be determined from the phone number.

“to” contains the callee’s phone number and name (if existed). And other information such as the location (city, state) if it can be determined from the phone number.

“result” every voice and fax call event ended up in a final status. For example a missed call will have the result value of “Missed”. Or if an incoming call was redirected to voicemail, the result value of that call would be “Voicemail”.

“action” contains detail information about type of call. such as Phone Call, PSTN Call, VoIP Call, Ring Me, RingOut, Ingoing Fax, Outgoing Fax etc.

“startTime” show the date and time when a call/fax transaction has been made.

“message” contains information of a voicemail or a fax content.

Note: Even a user with an admin role can read call logs of all users under the company’s account using the account level endpoint, the admin user, however, cannot access individual user’s message info, which contains the content of a voicemail or a fax of that user.

“recording” this information exists if the call was recorded. It contains metadata of a recorded call and the link to the recording binary content.

Below is the typical call record data from the call-log API’s response.

Now let’s see what and how we can visualize the raw call log data on charts.

Display communications types and directions:

All we need to do is to count the number of voice calls, fax calls and detect the direction of the calls to calculate the number of inbound and outbound of those calls.

Provide a glance at voice calls by direction and total duration:

In the same loop as shown above where we count the number of voice calls and fax calls, we detect the duration of the calls, sum them up according to the type and direction.

Similar to voice calls, we provide a glance at fax calls with direction and duration as well.

Display total voice calls and call results:

We count and detect call result, group them for different type and direction so that we can display them separately.

Display total inbound voice calls with results:

Display total outbound voice calls with results in a separate graph:

Display total inbound and outbound faxes with results in separate graphs:

Display calls density:

More interestingly, we can detect the timestamp of each inbound and outbound call or fax, then create a graph to show the call density around the clock. This would give us an overall picture of how the business communication activity of a company or of an employee (if the data was read at the user extension level) is distributed hourly during a day. As the timestamp of a call from the call-log database is in GTM time, we will need to convert GTM time to the local time zone to reflect the local business time.

On the graphs below, we display the density of inbound and outbound calls in a 24-hour scale. We can see that around 9am is the company busiest time of the day as this company has 61 inbound calls and 57 outbound calls between 8:00am and 10:00am.

We can also detect how inbound calls are handled by displaying inbound calls and missed calls in parallel graphs. In this company’s telephone communication, we found a high number of missed calls around 12pm. If we compare the number of inbound calls and the number of missed calls at the same time slot, perhaps, it tells us that they tend to get high rate of missed call during common lunch time.

Another interesting figure to look at is the number of missed calls versus voicemails. In this company’s telephone communications, we see the number of voicemails is low compared to the number of missed calls at the same time slot around 12pm. We may learn that people tends not to leave voice messages during common lunch time. Maybe calls during lunch time are not very critical ones?

Last but not least, we can track calls with location to see where calls were made. The map chart below maps geographic locations of all inbound and outbound calls of the company. Of course, we can map locations of inbound calls and outbound calls on separate maps too.

There are more useful data such as billing information and call recording, which could be used for analyzing and predicting call costs or recorded call conversation analysis.

This much demo for now. You can process the data the ways you want and feel free to further develop the demo app from the tutorial to make it useful for your business.

Node.js / JavaScript:

Learn more about our Developer Program here:

RingCentral Developers

Cloud Business Communications