Integration of 1C with Bitrix 24. Full integration with the need to change Bitrix 24
(0)
UAH 16 000
Buy
Full description

Data exchange between 1C and Bitrix24

(Using the HTTP Service)

 

In this implementation, the initiator of the exchange is always Bitrix24!

The HTTP service 1C receives commands from Bitrix24 and provides a response in the JSON format.

Let's consider more in detail all commands:

There are two branches of the path

http://hostname/{Publication name}/hs/exch/IN (POST) - Download (+ change / mark to delete) data in 1C

http://hostname /{Publication name}/hs/exch/OUT (GET, POST) – Downloading data from 1C (data retrieval)

IN – only POST

JSON, format : {"ENTITY":"XXX"; "XXX":"ADD"; "1С_ID":"XXXХХ"; "BX24_ID":"XXXХХ"; ... Other data}

1. When adding: all the data necessary for synchronization (see dressing tables below);

{"ENTITY":"XXX"; "ACTION":"ADD"; "1С_ID":"XXXХХ"; "BX24_ID":"XXXХХ"; ... Other data}

When adding ID 1C will be equal to the void.

2. When editing: the request includes all the data necessary for synchronization (see dressing tables below);

{"ENTITY":"XXX"; "ACTION":"UPDATE"; "1С_ID":"XXXХХ"; "BX24_ID":"XXXХХ"; ... Other data}

3. When deleting (in 1C mark for deletion): the query has the following form:

{"ENTITY":"XXX"; "ACTION":"DELETE"; "1С_ID":"XXXХХ"; "BX24_ID":"XXXХХ";}

OUT – GET (getting the list of changed objects)

JSON, example:

Inquiry:

GET http://HostName/{Name publications}/hs/exch/OUT

response (all changed / added objects):

{

    "result": [

        {

            "ENTITY": "INVOICE",

            "_1C_ID": "1381668b-e798-11e5-a58e-00266cf15e2d",

            "BX24_ID": "",

            "DESC": "Buyer's order PL000000001 from 11.03.2016 16:55:33"

        },

        {

            "ENTITY": "COMPANY",

            "_1C_ID": "9f349220-cefb-11df-9990-0013726517ec",

            "BX24_ID": "112233",

            "DESC": "Name of counterparty 1"

        },

        {

            "ENTITY": "COMPANY",

            "_1C_ID": "ca816ade-f4a6-11e0-9e00-0013726517ec",

            "BX24_ID": "",

            "DESC": " Name of counterparty 2"

        }

    ],

    "CODE": "200",

    "DESC": "Data successfully received."

}

 

Where

For array elements:

ENTITY – The essence of Bitrix24 (Entity ID)

                There is an exchange for the following entities:

Integration-of-1C-with-Bitrix-24 10

_1C_ID – Unique identifier for the 1C object

BX24_ID – ID of Bitrix24

DESC – Description of the object

Elements outside the array:

CODE, DESC – Query result code and description.

a.        If the data is successfully updated:

The response with the following content is sent:

{…"CODE":"200";"DESC":"Data successfully updated."}

 

b.        When an error occurs:

The response with the following content is sent:

{…"CODE":"400";"DESC":"Error! Data was not updated."}

 

 

OUT – POST (Getting object data)

JSON, example:

Inquiry:

       {

            "ENTITY": "COMPANY",

            "_1C_ID": "9f349220-cefb-11df-9990-0013726517ec"

        }

ответ:

{

    "ENTITY": "COMPANY",

    "_1C_ID": "9f349220-cefb-11df-9990-0013726517ec",

    "BX24_ID": "112233",

    "CODE": "200",

    "DESC": "Data successfully received.",

    "COMPANY_SHORT_NAME": "Company name",

    "ASSIGNED_USER": "Responsible User Name",

    "COMPANY_TYPE": "",

    "ACTIVITIES": "Building company",

    "COMMENTS": "",

    "FULL_NAME": " Full Company Name",

    "ACCESS_GROUP": "Kiev",

    "DATE_FIRST_IMPLEMENTATION": "0001-01-01T00:00:00Z",

    "LOST_CUSTOMER": false,

    "CREDIT_LIMIT": false,

    "CONDITION_CREDIT_LIMIT": "",

    "CREDIT_LIMIT_USD": 0,

    "TERM_DAYS": 0,

    "OPERATING_MODE": "",

    "FULL_NAME_COMPANY": "Full Company Name",

    "INN": "",

    "CERTIFICATE_NUMBER": "",

    "EDRPOU": "",

    "CONNECTED_WEB": true,

    "EMAIL": "test@test.com",

    "PHONE": "+380 (050) 123-45-67",

    "ACTUAL_ADDRESS": "12345",

    "INDEX_ACTUAL": "12345",

    "FILE_NAME": "Description of the bonus system.txt",

    "FILE_TYPE": "Other ",

    "FILE_VALIDITY": "0001-01-01T00:00:00Z",

    "FILE_REGISTRATION": "2017-05-28T00:00:00Z"

}


 Setting the exchange on the 1C side

 

To configure the exchange, the following metadata objects are used:

Рис.1. Планы видов характеристик

Fig.1. Data to set up the exchange.

«Directories Bitrix24 »(+ Directory" Values ​​of directories Bitrix24 "). It is possible to adjust the correspondence of the reference type values ​​(directory, enumeration, ...) to the values ​​in Bitrix24. This is done for those cases when the string representation of the values ​​of the directory (enumeration) does not (always) correspond to its counterpart in Bitrix24.

Example:

Рис.2. Настройка соответствия значений справочного типа (справочник, перечисление, …) к значениям в Битрикс 24

Fig.2. Configure the correspondence of the reference type values ​​(directory, enumeration, ...) to the values ​​in Bitrix 24.

Metadata structure - Represent metadata involved in the exchange with Bitrix24 as a reference..

Example:

Рис.3. Структура метаданных – Представление метаданных, участвующих в обмене с Битрикс24, в виде справочника.

Fig.3. Metadata structure.

Exchange entities with 1C - Bitrix 24 entities, and adjusting them to 1C.

Example:

Integration-of-1C-with-Bitrix-24 4

Fig.4. Metadata Essentials.

There is a connection not only of the metadata requisite with the corresponding field of the Bitrix24 entity, but also of categories, and the associated directory and data register with the possibility of setting the selection.

Example:

Integration-of-1C-with-Bitrix-24 5

Fig.5. The association of metadata with the category, the associated reference book and the information register, with the possibility of setting the selection.


Registers of information.

Bitrix24 - Storage of Bitrix24 object identifier in 1C.

Integration-of-1C-with-Bitrix-24 6

Fig. 6. Storing an object identifier.

Bitrix Upload Protocol 24 - Fixing Exchange Errors. If necessary, you can record, including successful operations.

Example:

Рис.7. Фиксация ошибок обмена.

Fig.7. Fixing Exchange Errors.

Matching the values ​​of the Bitrix directories24 - Setting the correspondence of reference values ​​to the values ​​in Bitrix24.

Example:

Рис.8. Настройка соответствия справочных значений значениям в Битрикс24

Fig.8. Configure the correspondence of reference values ​​to the values ​​in Bitrix24.





Cost of work: from 16000 UAH


Developer: NCT

www.nct.ua
office@nct.ua



  • Comments
  • Facebook
Loading comments...