Stephanie Fubara

Bitrix-Billing system integration

The integration described in this article was done for our long-time Clients - CEDIS (a Montenegro power supply company). The company has close to 2000 employees with 500 active users in their Bitrix24 portal.
For large companies especially, much thought has to be put into selecting company systems.

Why is Bitrix24 perfect for such companies as CEDIS?

  1. Control - There are many CRMS, but not one of them offers you the possibility of having your own local copy of the service. With Bitrix24 on-premise, companies have control over data, access to source code on their own servers and additional tools, such as helpdesk and e-learning, as well as integration and customization options.

  2. Possibility to adapt to growing needs -
    Most times, It’s difficult to foretell what the needs of a company will be in 5, or even 2 years. When the company grows, the systems they used from the onset turn out to be inadequate in dealing with the new needs - More clients, more employees and users of the system, more departments (each having its specifics, features and requirements), etc.
    Usually, this results in companies changing the systems they use or introducing additional systems.
    Bitrix24 on the other hand allows for growth - features, users, data in general. 

In CEDIS’ case, their system has grown by over 70% between 2018 and January 2021. Aside from this, we’ve made 5 major modifications to their corporate portal.

  1. Endless possibilities for customization and improvement -
    The default features of Bitrix24 are enough to handle the basic needs of any company. For startups and small companies, this could be enough. For big companies and enterprises, it isn’t.
    Since Bitrix24 already provides the source code for their product, it then becomes easy for the company to modify the system according to their requirements. 

This activity must be done with caution, and only by someone trained to do so correctly.
INTERVOLGA has all the required competencies for modifying Bitrix24. We

  1. train developers on how to implement Bitrix24 correctly

  2. have a wealth of experience working on 1000+ projects.

  3. possess all possible Bitrix24 competencies, certified by Bitrix Inc.

For this client, it is important to adapt Bitrix24 to the needs of an electricity distribution company. 

Some of the customizations and modifications we have carried out in the corporate portal include 

  1. integrating Bitrix24 with Active Directory

  2. Restricting access to fields and comments

  3. Digital signature for Bitrix24 documents

  4. Calculating time that deals spend in stages

  5. Marking deals in deals list according to certain conditions 

  6. Bitrix- Billing system integration (which will be described in today’s article)

With all these modifications it is important to

  1. maintain the updatability of the corporate portal - It must be possible to receive and install updates from Bitrix Inc.

  2. ensure optimum server performance - performance must not be degraded. 

Both of these conditions are upheld for all our projects. 

Bitrix- Billing Connection

Task description - 

The client has a billing system for its customers. Some of the customers in the billing system exist in Bitrix, while others do not. There are also some fields in the billing system, which do not exist in Bitrix.

Our tasks were 

  1. To develop an integration between Bitrix24 and the billing system of the company for the regular exchange of information. In other words, Billing information should be available within Bitrix24 in real time

    1. For the Billing contacts which exist in Bitrix24, it was necessary to synchronize them once, such that the Bitrix contact is updated with the fields from the Billing system. 3 different fields are used for synchronization differs based on different conditions.

    2. For Billing contacts that do not exist in Bitrix24, it was necessary to create a new contact with the data from Billing.

  2. To modify the contact page to enable the creation, search, and display of contacts from the billing system in Bitrix24.


To implement the solution, we 

  1. created a MySQL database and a user with access to this database.

  2. created a table with fields ( field_A, field_ B… field_N)  from the billing system.

  3. connected the MySQL database to Bitrix24. To do this, we specified the defined connection data in .settings.php. file

  4. added the possibility to work with the Billing database (table) data from Bitrix24.

  5. modified the Bitrix deal creation page by adding a search functionality for contacts in Bitrix24 and the Billing system, and a create contact button from the deal card.

On click “Search Contacts”, the search fields appear, as well as 2 buttons 

“create” and “search”

Contact search can be done by Citizenship id, Customer id, Account number, Delivery point, Billing company id, or Customer name individually or a combination of two or more of these fields. Search results from Bitrix and the Billing system are displayed

When there are 2 or more search criteria, only those contacts in Bitrix and the billing system which meet ALL the criteria should be displayed.

When a Bitrix contact is selected,  it is attached to the deal and disabled from the search results.

On selecting on a contact form Billing results, a Bitrix contact creation page opens, with the data filled in from the billing system

In the next search, we can see the newly created contact now appearing in Bitrix24 contacts and can be attached to a deal

To avoid duplicate data, we did the following:

1. Added the CONTACT_ID column to the table with data from the billing system.

2. During the initial data synchronization, filled in the CONTACT_ID for all records for which a match was found and the synchronization process was applied.

3. When searching, displayed only those records from the table with data from the billing system for which the CONTACT_ID field is not filled. 

4. When creating a Bitrix 24 contact based on the data of a record from the billing system, we specified this record CONTACT_ID to mark this record as already used. 

Interactions with previous modifications

  1. As stated earlier, we had previously implemented a field permissions module  “intervolga.fieldperms”. It was a requirement that the rules set by the fields permissions module should be applied when creating a new contact using the “Create” button we added to the deal page.

  1. Creating Bitrix contact from Billing contact -  When a Billing contact is selected and the contact creation page appears,  some fields are already filled in from the billing system. However, these fields are still editable.
    We had to ensure that when the "Save" button is pressed ( to trigger saving the contact to Bitrix24), only the data from the Billing should be saved. The user’s inputs are discarded for auto-completed fields.
    All other user changes to fields which are not auto-completed will be saved.


  1. The integration between Bitrix24 and the clients Billing system was established successfully. Billing information is available within Bitrix. 

  2. The Bitrix-Billing system is compatible with our field-permissions module - View and edit access to fields from the billing system is restricted according to Bitrix24 user groups.

  3. Server performance remains optimum

Most importantly, the client is satisfied with our work.

INTERVOLGARU is a competent Bitrix Integrator, with all possible competencies - Implementation, Customization, Integration, Business Processes.
For questions and enquiries about this implementation, please send us a message 

  • 21.09.2021