Call integration in less than 10 dev hours
Written by Mark Vletter on 4th July 2018
The VoIPGRID platform has two great APIs to easily make telecommunication an integrated part of your CRM or customer contact system. In this post, we’ll explain how you can get the most out of one of these APIs, named call notification, in very little time.
The notification API
The notification API sends push messages to other systems on the status of incoming and outgoing calls. There are 4 types of messages:
- Call setup (ringing)
- Call answer (in progress)
- Call transfer
- Call end
By following the status of the call you can build all kinds of integrations or entirely new systems. The most commonly requested feature is to open the customer information of the person contacting you when they call your company. You can be very fancy here but for the first version of this integration, we’ll keep things very simple and you will still get 80% of the functionality.
The easiest flow for call integration
The flow we’ll be building will look like this:
- A customer calls a company
- The user of the system (agent) clicks on a button in the CRM or another system you log communications in
- The information of the caller is displayed on the screen
For this flow we will need to know a few things:
- The fact that there is an incoming or answered call
- The number of the person calling (caller)
- The number of the phone that the user is using to answer the call (agent)
Building the basics
A calls database table
To register the information for this flow we will have to create a new database table named “calls”. In this table we will store:
- call_id: the ID of the call
- timestamp: date/time field
- status: the status of the call
- caller_number: the CLI of the person calling you
- destination: the internal numbers of the extensions or user IDs that are ringing or who have answered the call
article continues below the image
Adding the internal number to the agent profile
The second thing we need to do is enhance the profile information of the agent, so it contains the internal numbers of the phone/user that the agent is using.
From API call to a database entry
The Ringing API call will make a request to a URL of your choosing which has all the JSON you need to store the basic call info in your database.
You will store the:
- and all the destinations which are in the ringing call
The “In-progress” API call will update that database entry which will only change the status and the caller_number.
Now that you have translated the API calls to your database we can get the proper information out.
The caller info button
The last step will be adding a button to your system. When an agent clicks this button, you should:
- Search the call database
- Find the latest call for the destination matching the extension you have registered in the Agent profile
- If you find a match do a search on the caller_number on the account and contact information in your CRM and if you matching information in the system…
- Display the relevant customer information
And that is how you integrate call information in less than 10 dev hours in your CRM or contact system. Your customers and users will love you for it.
Do you want to integrate our notification API into your system? Leave a message in the comments so we can help you.