"Bitriks24" is a complete set of tools for organizing the work of the company. Here you will find everything you need to create communications within the team, to manage tasks and projects, to work with various documents, CRM, communications, and much more. Often there are situations when standard cloud service tools fail to solve a particular business problem. Using the
open API, clients and developers can easily adapt the “cloud” to their specific tasks, customizing business logic.
If desired, the toolkit can be expanded using self-developed applications, which are divided into two types:
- internal (cloud)
- external (server)
Many of our partners create their own applications for Bitrix24. Someone does this only for their own needs, someone makes it publicly available for free, and someone can earn money from it. One of our partners once also became interested in the development for Bitrix24, and achieved impressive results in this - its applications are already used by more than 30 thousand Bitrix24 portals. And if you also planned to develop an application for your needs, then recommendations and advice from our partner may be useful to you.
Internal applications always work inside the Bitrix24 interface. External can work both inside and outside the interface. Both types of applications use
REST API for their work, therefore they have equal opportunities for data processing and use.
')
If you want to develop your own application for "Bitrix24", then choosing the type - external or internal - you need to be guided by the tasks and the means necessary for this.
Internal applications
Internal applications in their work use HTML + JavaScript + CSS. You cannot use tools such as PHP, mySQL and cron. But this does not mean that you can create only simple applications like the “
Production calendar ”. You are free to use in your application any JavaScript framework, for example, jQuery. It is possible to connect remote libraries: for example, using Google Charts you can create a variety of graphical reports, like in the
Diagrams and Charts application. The most interesting thing in it is the publication of the created chart in a live tape. It looks like this:
<script> fields = {POST_TITLE: varTitle, POST_MESSAGE: varMessage}; BX24.callMethod('log.blogpost.add', fields, function(result){ if(!result.error()){
This message will be received by all portal users.
In the case of using the server application in PHP, the above code may look like this:
<? $arFields = array( "auth" => $auth, "POST_TITLE" => $imTitle, "POST_MESSAGE" => $imMessage, "SPERM"=> array('U'=>explode(',', $user)) ); $url = 'https://' . $domain . '/rest/log.blogpost.add.json'; $res = file_get_contents($url . '?' . http_build_query($arFields)); ?>
This message will be received only by those users specified in the SPERM parameter.
Of course, the scope of internal applications is very wide and is not limited to these examples. With their help, you can perform all sorts of data operations. For example, select all transactions for the counterparty for a certain interval, calculate their amount and, depending on it, set the value of the user field “Discount percentage”.
Generally, a bunch of REST API + HTML + JavaScript gives the widest scope for creativity when creating internal applications for Bitrix24. Easier to list restrictions. For example, you cannot use a database to collect information, you cannot use cron to launch an application or its functions on a schedule, fail to respond to CRM events or implement an exchange with an external service.
If you need something from the above, you will need to create an external (server) application.
External (server) applications
An application of this type is scripts that reside on the developer's server. When implementing such applications, the developer can use all the tools available to him (libraries, databases, special services, ...) to solve the problems posed.
Server applications can be divided into two subtypes:
- working inside the Bitrix24 interface;
- working in the external environment.
There is a small requirement for server applications - to keep logs of REST API calls for resolving technical support issues.
From the point of view of the implementation of internal logic, there is no fundamental difference between these subtypes. They differ only in the way they connect to Bitrix24 and extend data access.
Applications running inside the interface are easier to connect. In principle, as such, the connection procedure and no, you just need to install the application. To work with the data he needs to periodically update the access key, which is carried out automatically.
Applications running outside the Bitrix24 interface require certain actions to connect and extend access keys. Both of these processes are described in the REST API
documentation .
The application must be external if you need, say, to use PHP to generate files. As an example, the "
Document Designer ". This application creates documents in .PDF and .DOCX format based on data from CRM and a custom document template. In such a scheme, Bitrix24 is a “server”, and the application is a “client”.

One of the features of the "Document Designer" is to send files by e-mail with the linking of the shipment to the CRM entities. You can do it like this:
<script> files = [ {fileData: [fileName, base64_string]} ]; arEmail = [ {VALUE: 'email@email.ru'} ]; BX24.callMethod( "crm.activity.add", { fields: { "OWNER_ID": ownerId,
Another example of an external application is integration with the MoiSklad service. It uses the REST API “Bitrix24” and the REST API of the “Moysklad” service. The application can work automatically with the cron scheduler. In this case, we have two "servers" ("Bitrix24" and "MoySklad") and one "client" - the application.
It allows you to create accounts that are tied to CRM and can participate in the further exchange with 1C: Enterprise with standard Bitrix24 tools. Sample code for creating a report:
<? $arFields = array('auth'=>$auth); $arFields['fields'] = array( 'ORDER_TOPIC' => $orderTopic, "STATUS_ID" => "P", "UF_COMPANY_ID" => $companyId, "UF_DEAL_ID" => $dealId, "PAY_SYSTEM_ID" => 1, "PR_LOCATION" => 1, "PERSON_TYPE_ID" => 1, "DATE_INSERT" => date('c', $bg), "DATE_BILL" => date('c', $bg), "INVOICE_PROPERTIES" => array('LOCATION' => 1), 'PRODUCT_ROWS' => array( array( "ID" => 0, "PRODUCT_ID" => $productId, "PRODUCT_NAME" => $productName, "QUANTITY" => 1, "PRICE" => $productPrice ) ) ); $url = 'https://'.$domain.'/rest/crm.invoice.add.json'; $res = PostUrl($url, $arFields); ?>
PostUrl is a helper function that sends a request to the server.
As examples of external applications that work outside of Bitrix24, you can cite
Business Card Scanner and
Widget for Android . They both work on mobile devices, but the data for their work is taken from Bitrix24. As an analogy, you can give a client proxy scheme. In this case, the “client” is the mobile device, “proxy” is the application itself, and the “server” is the Bitrix24 portal.

Server
For an external application, you will need your own server, where your scripts, databases, etc. will be placed.
It is preferable to have your own server, physical or virtual. First, you can manage and use all available resources. Secondly, you will have the opportunity to install all the necessary modules and software versions. Virtual hosting does not always allow to achieve the desired result and ensure the speed of work and the necessary uptime.
All data used by the server application is stored in a special object of the type “Storage” within each Bitrix24 portal. The application does not collect any personal user data. To work with it, only the portal administrator e-mail is used, which is not related to the working data. Therefore, you can freely place the application with Western providers, while not violating the
law 152-FZ .
As an application server, you can use VPS running Unix. The size of the RAM must be at least 512 MB. Hard drive the more the better. Be sure to set up a backup and be sure to a different drive.
Pay
special attention that the SSL certificate must be installed on the server. It is very important to install all the certificate chains in order to avoid errors when the application is running. As a certificate provider, the simplest RapidSSL for 14.5 euros / year is sufficient.
Development platform
The server application, of course, can be developed in PHP + MySQL.
For our partners and developers, we recommend using the familiar
“1C-Bitrix: Site Management” platform. This method has several advantages:
- Using all the features of the site management system, for example, cloud backup. Also, the advantages of the site management system should include a multi-level security protection against all sorts of threats.
- The ability to use the module "Technical Support" for the organization of quality user support.
- Using the newsletter module to notify customers about the release of new features of the application.
In conclusion, it remains to recall that on the portal "Bitrix24" are already
available for download a lot of ready-made applications, the vast majority of which are free. If you do not find an option that meets your needs, you can always write your application. I hope this post will help you with this.