This is the first post of the Ringostat service on the Megamind. Since this is the “younger brother” of Habr, we decided not to talk about 100,500% ROI and advertising budgets in our debut material, but to start with a technical article on how to integrate call tracking with other systems through the API.In recent years, the number of various kinds of software, which is designed to optimize the activities of a business, has increased significantly. Now you can collect a variety of information, analyze financial and economic indicators, measure moods, consumer inquiries and preferences, and many more useful indicators. These are all cool “things”, but only if all this information is gathered in one window, in a simple and clear interface. Because logging in 5-10 virtual offices every morning and looking at updated data and analytics, on the one hand, is not convenient, on the other - time consuming.
Service companies also come to understand this. Multifunctional systems and portals, single trading and procurement platforms are being developed for managing corporate communications. For online promotion and monitoring of performance indicators, dashboards and statistics aggregators are used. On the one hand, most services seek to leave the possibility for mutual integration by API, or else they are preparing closer interaction or full integration.
')
How API integration works
I will try to explain in our experience what the API is. The
Ringostat service can be integrated with a CRM system or other external systems and third-party web applications using WebHook, a mechanism for sending notifications about certain events that are received and fixed by the call tracking service.
There are five such WebHooks in the system:
- call initiation;
- each step forwarding;
- the call is answered;
- call completed;
- completed call evaluation menu.
The API allows you to link services to each other or to a specific database, up to excel tables. Thanks to the API, you can in the CRM system:
- automatically create a contact by caller number;
- automatically show the client's card when calling, if the contact with that number already exists;
- set the task to the manager if the call was missed;
- upload conversation record to CRM;
- supplement the client's card with data on the source of the call;
- and much more.
In order to configure the transmission of events from the service to your CRM or another third-party web service, you must register the URL (web address) to which the request to send the corresponding notification will be sent (the address of the CRM system or intermediary service).

What information do you need to fill out? For example, in our service, the editing form consists of four fields and a list of transmitted parameters:
- name - the name of the CRM / web service, for example “ExampleCRM”. This is necessary for the convenience of recognizing this integration in your personal account;
- URL - the web address for which the HTTP request should be made (for example, examplecrm.com/index.php?param1=abc¶m2=def ): the required URL can be found in the documentation for integrating your system with external applications or contact a specialist who made the setting;
- the moment of sending data is the moment when the request should be sent;
- method of sending data - set in accordance with the method specified in the documentation on the integration of your CRM.

In the case of our call tracking, you can also foresee the moment when the information should be transmitted:
- Before the call - used to obtain preliminary data about the upcoming call. For example, the keyword or channel of advertising on which the user passed.
- After the call, practically all parameters related to the calling client are transferred, as well as information about the call itself. For example, the caller's number, region, duration, call status, call recording, etc.
- After the call evaluation menu - used to transfer the category and value of the call, as well as the name / id of the manager who took the call
- At the time of lifting the handset - is used for notification of the call only responsible manager.
- Forwarding step - transmits the block of the configured forwarding scheme that will be used in a specific call distribution scenario.
Parameters passed:
- parameter name - here you should specify the name of the parameter that will be added to the URL. The correct name of the parameters with which your system can work is indicated in the relevant documentation or requires clarification from the support service;
- parameter value - select the data in the drop-down list that you want to transmit with a particular event, and which are supported by your system.
API can transfer a large number of different data types. Specifically, our service can transmit up to 25 different parameters. Information about integration can also be found in
the Ringostat knowledge base .

Do not forget about the security of the connection
In order for a third-party application to be sure that the data is sent by the service to which you are connected sometimes, as is the case with our call tracking, the URL is protected by a special key. For additional protection, it is possible to limit the list of IP addresses from which a notification can come via WebHook.
If an unsuccessful attempt to send a notification to your CRM / web application, a corresponding message will be sent to your email address so that you can check the connection, reconfigure it, or contact the technical support service.
Why is integration so important?
The ability to exchange data between services is a very important feature. Imagine, a developer specializing in IP telephony systems has created an excellent product that is in high demand in the market. But his clients want not only to receive calls, but also to analyze their sources. Need call tracking. Instead of looking for such a service with an interface that suits you, you can simply configure the data exchange using the API.
At the next stage, you want the calls to also be combined with the history of work with a specific client, his inquiries through online forms, purchases and concluded deals. Of course, for this you need to configure integration with corporate CRM.
Probably you can find one service where all this is provided, but is it profitable? More attractive in terms of efficiency and control over the result is the division of labor between different Saas-services. Because each of them then seeks to bring to perfection one single supplied service, and not to compensate for the shortcomings of some functions by others. API is a glue that can be used to glue systems together. If all of them are combined, they will be more effective than separately.