×

Business Monitoring Dashboard Using Bulk Call Details API & Heartbeat API

Voice
  • Voice
Any
  • Any
Automation & 2 more
  • Automation
  • Number Masking
  • virtual number
8700 views

Overview

Exotel is a diversified platform. The same platform is used by multiple business domains for their customer communication. It is essential for a company to monitor the usage of a product and measure the performance of the internal teams. 

Through Exotel APIs, a customer can build a custom dashboard that can provide a bird view on the performance of internal teams. The dashboard is updated real time & the data storage would be seamless. 

About Bulk Call Details API & HeartBeat: 

Bulk call details API provides all the data of all calls made/received in a particular time span. It doesn’t require any parameters except the authentication key & token. 

Heartbeat API notifies the ‘health’ of an Exophone in real time based on which actions can be taken at customer end. 

We would be using Passthru applet that shares the information of the call flows configured in your account. The passthru applet sends the events in the call flow. The data shared by the passthru applet is dependent on the place of the applet in the call flow

Prerequisites

  • An active Exotel account.
  • The authentication Key and Token.
  • Integration to be completed by the customer development team using API Documentation.

Flow Diagram

How It Works

Step 1: The user needs to build a synchronous cron to trigger bulk call details API. The response should be populated in a  table.

var request = require('request');
var options = {
    url: 'https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Calls'
};
function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}
request(options, callback);
{
    "Metadata": {
        "Total": 1027,
        "PageSize": 1,
        "FirstPageUri": "/v1/Accounts/<your_sid>/Calls.json?PageSize=2&DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&SortBy=DateCreated:desc",
        "PrevPageUri": "/v1/Accounts/<your_sid>/Calls.json?PageSize=2&DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&SortBy=DateCreated:desc&Before=MTU3Nzk4NjAwNixhZmQ4MGJhNzI1MzA5YmU2MjM0MTA2YjY5ZGVmMTQxMg==",
        "NextPageUri": "/v1/Accounts/<your_sid>/Calls.json?PageSize=2&DateCreated=gte%3A2020-01-01+00%3A00%3A00%3Blte%3A2020-01-03+00%3A00%3A00&SortBy=DateCreated:desc&After=MTU3Nzk4NDQwNywwNmQ4ZmI0MDdlZWY5N2YxZmI0OTllNjZjOTI5MTQxMg=="
    },
    "Calls": [
        {
            "Sid": "b6cfaf5f5cef3ca0fc937749ef960e25",
            "ParentCallSid": "",
            "DateCreated": "2016-11-29 15:58:45",
            "DateUpdated": "2016-11-29 16:00:09",
            "AccountSid": "Exotel",
            "To": "0XXXXX20000",
            "From": "0XXXXX30240",
            "PhoneNumberSid": "0XXXXXX4890",
            "Status": "completed",
            "StartTime": "2016-11-29 15:59:10",
            "EndTime": "2016-11-29 15:59:27",
            "Duration": "17",
            "Price": "1.500",
            "Direction": "outbound-api",
            "AnsweredBy": "human",
            "ForwardedFrom": "",
            "CallerName": "",
            "Uri": "/v1/Accounts/<your_sid>/Calls/b6cfaf5f5cef3ca0fc937749ef960e25",
            "RecordingUrl": "https://s3-ap-southeast-1.amazonaws.com/exotelrecordings/<your_sid>/b6cfaf5f5cef3ca0fc937749ef960e25.mp3"
        }
    ]
}

The following parameters are stored from the response of this API

Parameter Name

Sid

DateCreated

DateUpdated

AccountSid

To

From

PhoneNumber

PhoneNumberSid

Status

StartTime

EndTime

Duration

Price

Direction

AnsweredBy

Uri

RecordingUrl

ConversationDuration

Leg1Status

Leg2Status

Legs

Step 2: The user needs to implement Passthru applet in the call flow to gather the App ID parameter. 

?CallSid=4e26dc0068c3cb9b5a687fd07675157n&CallFrom=09821429913&CallTo=08047112906&Direction=outbound-dial&ForwardedFrom=null&Created=Fri%2C%2023%20Jul%202021%2018%3A38%3A49&DialCallDuration=0&RecordingUrl=null&StartTime=2021-07-23%2018%3A38%3A49&EndTime=1970-01-01%2005%3A30%3A00&DialCallStatus=null&CallType=call-attempt&DialWhomNumber=&ProcessStatus=null&flow_id=386016&tenant_id=85458&From=09821429913&To=08047112906&CurrentTime=2021-07-23%2018%3A39%3A20

Step 3: The company receives the timely heartbeat from the platform. The response is stored in a new table

{
    "timestamp": "2018-08-22T15:19:23Z",
    "status_type": "OK",
    "incoming_affected": null,
    "outgoing_affected": null,
    "data": {}
}

Step 4: The user needs to attribute the business tags against each number in a GUI built.

Step 5: User should join all the tables using the call reference ID.

Step 6: Populate the data in GUI with Business attributes. The chats or the graphs can be customised based on the business requirements. For example:

  • Compare pickup rates of agents belonging to different groups.
  • Checking the service up-time in a specific region.
  • Monitoring the call completion for a specific business team.
  • Incoming call trends during the day/month on various teams.

Case Study

Urban Company Case Study - How Urban Company solved their last mile delivery of their services, safeguarding the privacy of their customers and service partners. They built Monitoring tools to switch the usage of our solutions.

Advantages

  • Real Time visibility of team’s performance.
  • Real time monitoring of the product which is being used.

Industry application

The Monitoring dashboard can be used by any industry. 

Resources

Solution Pricing

Exotel doesn’t charge for integration. The tech efforts should be taken care of by your development team.

Last modified Date

December 19th, 2021