SDR Management Game Changer: FRONTSPIN API
SDR Management Game Changer: FRONTSPIN API
FOCUS: FRONTSPIN API
Let’s begin!
Metrics are the heartbeat of any business operation, and phone calls are no exception.
In today’s competitive landscape, simply making and receiving calls isn’t enough; Tracking metrics from your phone caller app offers invaluable insights into customer behaviour, call quality and team performance.
Think of it like this: It’s not just about who’s calling who – it’s about maximising efficiency, improving customer satisfaction, and driving growth. When you understand your call data, you empower your business to make smarter decisions. So, let’s get you hooked up to that API and start tracking those game-changing metrics!
We need to prepare the requirements for our task at hand. We will use only things we have lying around the house:
REQUESTS LIBRARY DOCUMENTATION:
• https://pypi.org/project/requests/
PANDAS LIBRARY DOCUMENTATION:
PLOTLY LIBRARY DOCUMENTATION:
DOTENV LIBRARY DOCUMENTATION:
• https://pypi.org/project/python-dotenv/
Let’s assume you know what you are doing but a little more information won’t hurt.
Think of an API as a restaurant’s menu for your computer.
1. You, the customer, don’t need to know how the kitchen prepares the delicious pasta carbonara; you just need to know what to order from the menu. Similarly, an API (Application Programming Interface) gives you a list of possible “dishes” or functions you can request from a software application.
2. You don’t have to understand all the coding “cooking” that goes on behind the scenes.
3. You place your “order” by making a request, and then the API serves up the data you asked for, hot and fresh, right to your software’s table.
Bon appétit for programmers!
How to connect to Frontspin API
We are going to copy that key and put it in a .env file or a config file for storing it securely ensuring it looks like the following:
To get the metrics from the API we have to make a GET request to the following endpoint https://app.frontspin.com/api/integration/recording passing into the request header the API key generated from the site.
We will also pass the parameters listed below to delimit the date range of the call history we want to get which are listed in the API documentation located here.
• startDate: The start date for recordings (default: today minus 3 months)
• endDate: The end date for recordings (default: today)
The parameters are date type with the following format “YYYY-MM-DD”. As an example, if we want to get the sixth of January of the ghost year of 2020 (being this a laboral day) we should input 2020-01-06. The response for that request will return a json type content looking like so
Let’s build the function to make such a request with Python. and for that, we need to import the necessary libraries.
The function above can be used as follows:
Your df is now a spiffy data frame, where each row represents a unique phone call. With this tabular setup, you’re all set to slice, dice, and visualize those crucial metrics to get some insights.
Metrics Visualizations
Written by Rafael Sanchez | Illustrations and Layout by Acer Amansec | October 20, 2023