Data exchange between 1C 8 application solutions is something without which it is not possible to build a full-fledged enterprise information space.

  • Why are data exchanges needed and how to use them?
  • Types of exchanges between 1C.
  • How to configure data exchange between 1C databases?

You will find out the answers to these questions below.

There are usually two reasons for introducing exchanges:

The organization has a branch network

In this case, you simply need to set up the exchange between different branches. For this purpose, there is a mechanism in the 1C 8.3 Enterprise system. With which you can flexibly configure the exchange of information. For example, for branches you can disable the visibility of documents for other branches and at the same time the central office will see documents of all branches. Another example is setting up an exchange between the 1C Retail databases of an office and stores.

Separation by type of accounting

As a rule, this means that the organization maintains different records in different information databases. This separation allows you to filter information that is “unnecessary” for another type of accounting for various information bases. Example: so-called “Management accounting” will be entered into the “Trade Management” database, where all transactions are reflected, and management sees the full picture of events, and only the documents necessary for accounting and tax accounting are uploaded to the regulated accounting database “Enterprise Accounting”.

What are the exchange mechanisms between 1C databases?

Data exchanges can be classified in two ways: the mechanisms used and the transport used for the exchange.

1C data exchange mechanisms

Typically, two mechanisms are used for exchange:

  • Distributed information base(RIB)— a mechanism that allows you to set up data exchange between branches. The mechanism implies that absolutely identical database configurations are exchanged. The mechanism can transfer database configuration changes. The mechanism is implemented at the technology platform level.
  • A universal mechanism for exchanging between configurations— the mechanism is developed by 1C for applied solutions. It is universal and based on . Data exchange is carried out using xml rules, which are created in a special configuration - . By using this mechanism You can implement both one-time exchange and constant exchange between 1C configurations. The mechanism is implemented at the configuration level; you can integrate it into your configuration from the technological configuration.

Transport for data exchange

Transport can be a fairly wide range of technologies. Let's consider the main ones implemented in the universal exchange mechanism 1C 8.2:

Get 267 video lessons on 1C for free:

  • Local or network directory- the simplest transport. One information security creates a file on disk, the second reads it and adds its own file.
  • FTP resource— exchange is similar to exchange through a catalog. The difference is that the exchange is carried out via the FTP protocol.
  • Postal messages or E-mail- the exchange takes place within means Email. Configurations are sent to each other mail messages and regularly check the email address for new messages.
  • Direct connection (COM)— the exchange is carried out through a direct connection of one database to another using funds.
  • Internet (Web service)— the transport is a web service. One infobase connects to , the web service connects to the second infobase and transports the message. To carry out such transport you must have.

How to set up data exchange between 1C databases?

For the basics of setting up data exchange in 1C using the “1C Data Conversion” configuration, see the example in the video:

1C data exchange according to schedule in 1C 8.2

If you need to configure automatic uploading on a schedule, just configure .

For client-server version

In the “Data exchange settings” directory, on the “Automatic exchange” tab, you need to create a new scheduled task, where you specify the schedule:

For file option

In the “Data exchange settings” directory, on the “Automatic exchange” tab, you need to create a new routine task, where, on the “Exchange by events” tab, specify the events on which the exchange will be launched. For example, when a specific user starts:

Instructions for setting up data exchange between 1C and an online store on the CS-Cart or Multi-Vendor platform.

To do this, run the “1cv8.exe” file, in the window that opens, select the database with which the exchange will be made, and click on the “1C:Enterprise” button.

After launch, you must select a user and enter a password (if the user has a password).


If the user and password are entered correctly, the “Demo Base” window will open.


You also need to enter your online store username and password.

To check the connection, click the “Test connection” button. If all parameters are filled in correctly, the message “Connection successfully established” will be displayed. Otherwise, you need to check the correctness of the entered address and access parameters.

If the connection test fails, the exchange will not work.

“Upload to directory on disk” - to upload data to a file.

If this destination is selected, then you must specify the path to the directory where the data will be uploaded.

Select change control:
  • “Full unloading” - unloading of all goods and orders that meet the unloading conditions.
  • “Upload only changed objects” - unloads objects that have changed since the last successful unload.
“Use periodic data exchange”

To automatically exchange data, enable “Use periodic data exchange” and configure the exchange schedule so that the exchange starts automatically when necessary.


Note

Admin panel → Top Menu→ Modules → Managing modules → “Russian localization - Export, import to 1C”

After installing the module, open its settings.

The “Module Settings” window contains the following tabs:

  • General settings,
  • Settings parameters and options
  • Delivery options
  • Setting price types
  • Order limit

General settings

The “General Settings” tab contains the following fields:


Exchange with the company A field with a list of companies in which you must select the company with which the exchange will be made.
Use in product name

A parameter that determines what data will be written to the product name:

  • Name
  • Full name
Use in product article

Determines what data will be recorded in the product article field:

  • Item number
  • Item code
Use manufacturer The item manufacturer will be unloaded. The manufacturer will be added to the “Brand/Manufacturer” product description.
Hide products with zero balance. Products with zero quantity will be hidden.
Add tax to goods.

Taxes used in 1C will be added to goods.

Tax upload settings are available on the page:

Note

Modules → 1C → Prices and taxes from 1C.


To set up tax uploading, you need to specify the correspondence between taxes in CS-Cart and the interest rate in 1C.

Use page title Parameter that determines whether the page title “Item name” will be used
Source of promotional text

Parameter that determines what data will be written to the promotional text:

  • Full name
  • Description
  • Item property
Property name The name of the property, the value of which will be written in the “Promotional text” field if the “Item property” value is selected in the “Promotional text source” parameter.

Setting parameters and options

The “Setting parameters and options” tab contains the following settings:


Option name

Name of the uploaded option for a combination of item characteristics (for standard display of item characteristics)

Default value: “Options”.

Create a combination with zero quantity. Product combinations with zero balance will be created.
Methods for displaying characteristics from 1C

You must select a method for displaying item characteristics.

  • The standard method is to create an option based on combinations of characteristics.
  • “By object properties” - options are created for each characteristic of the item.

Delivery options

The “Delivery Options” tab configures the loading of additional item details (in one field you can specify several details for each type of item with new line) and contains the following settings:


Include separately the cost of order delivery for 1C Delivery will be defined as a separate item.
Weight details in 1C Pageable
Display weight as a characteristic A characteristic will be created based on the weight of the product to filter products by characteristics.
Free shipping Uploaded additional item details. The type of the attribute value in 1C is Boolean.
Show free shipping as a feature A product characteristic will be created using the “Free delivery of goods” parameter.
Cost of delivery Additional nomenclature details. The value type of the attribute in 1C is Number.
Number of pieces per box Additional nomenclature details. The value type of the attribute in 1C is Number.
Box length Additional nomenclature details. The value type of the attribute in 1C is Number.
Box width Additional nomenclature details. The value type of the attribute in 1C is Number.
Box height Additional nomenclature details. The value type of the attribute in 1C is Number.

Types of prices

The “Setting price types” tab is designed to allow you to upload several types of prices and contains the following fields:


Select setting Use this feature for unloading several prices (Base price, Recommended price, Wholesale prices).

Uploading multiple prices is implemented using prices for user groups. You can set your own price for the product for each user group (Wholesale, Retail, Gold client).

To configure uploading prices and matching prices to user groups in CS-Cart, go to the “Prices and taxes from 1C” page.

Note

Top menu → Modules → 1C → Prices and taxes from 1C.

If there is a need to upload several types of prices into one price, then they can be added in the settings, separated by commas.

The “Prices from 1C” window contains the following fields:

  • “Price from 1C” is the price that will be available for the specified group of users;
  • “Base price” is the default price of the product for all user groups;
  • “Recommended price” is the recommended price of the product in the “Pricing/Availability” section.

To check the entered price names (agreements), the module provides testing of uploaded prices. For testing:

Data exchange between 1C and CS-Cart

Data exchange between 1C and CS-Cart can be carried out in one of the following ways:

    Automatic start

    For automatic start exchange, it is enough to set up a schedule for automatic data exchange in the form of a data exchange node.

    Manual start

    To start data exchange, open the created exchange node and click on the “Data synchronization - Execute data exchange” button, the exchange process will start, after which a corresponding message will be displayed.


To analyze the results of the exchange, the 1C: Enterprise log is used.

To view data upload events in the create window of this node exchange, you must click the “Data Synchronization - Data Upload Events” button, the “Registration Log” window will open.


In the “Registration Log” form, to view the exchange history, log lines are opened and the information contained in them is analyzed. For quick view exchange protocol for a log line, just click on the “Comment” field and the “Event” window will open:


To view and delete objects registered for uploading, in the window of the created exchange node, click on the “Data synchronization - Show registered changes” button. The form displays groups (types) of objects: Products, Files and Orders. If you need to cancel (delete) the registration of a specific object, you must select it and click on the [x] button:

The technology of distributed information bases (RIB) allows you to create a geographically distributed system based on 1C Enterprise configurations. This allows you to have something in common information space even with those departments that do not have a reliable communication channel, combining high autonomy of nodes with the ability to quickly exchange information. In our articles we will look at the features and practical implementation of this mechanism on the 8.2 platform

First of all, let’s ask ourselves: why autoexchange? Modern technologies, combined with inexpensive and fast internet, allow you to organize remote work without any difficulty. The choice of methods is as wide as ever: RDP, thin and web clients, network aggregation with VPN help- there is something to think about. However, all these methods have one significant drawback - a strong dependence on the quality of the communication channel.

Even with ideal operation of the local provider, it is impossible to guarantee 100% availability of the communication channel. Problems with the backbone provider, lack of power supply, physical damage to the communication line and many other factors make this task insurmountable. At the same time, the inaccessibility of the information base at a remote warehouse or retail store leads to quite significant losses. And finally, let’s not forget that there are places (for example, industrial zones on the outskirts of cities) where providing a high-quality communication channel is expensive and/or problematic.

The RIB mechanism allows you to get rid of these shortcomings; each department has its own copy of the information base with which you can work autonomously even in the complete absence of communication with outside world. And the small amount of transmitted information allows you to use any communication channel, including the mobile Internet, for exchange.

RIB on platform 8.2 is not something fundamentally new, representing further development URIB platform 7.7, only now this technology has become more accessible and simpler. Unlike the RIB component, which had to be purchased separately, the RIB is an integral part of many standard configurations and works completely in user mode, allowing you to do without the Configurator even at the setup stage.

At this point it would be time to move on to the practical part, but we will have to make one more digression. The fact is that the transition to the 8.2 platform, which seems to have already happened, in fact led to the emergence of two types of configurations: based on a managed application, “native” for the 8.2 platform, and adapted from 8.1, continuing to use outdated technologies and mechanisms. Since a significant part of the configurations (Enterprise Accounting, Payroll and HR Management) are adapted or transitional, they cannot be discounted, so the first part of our article will be devoted to these configurations (essentially the 8.1 platform), while in the second we will examine setting up auto-exchange for configurations based on a managed application (platform 8.2).

Let's consider a practical task: setting up automatic exchange via FTP for the Enterprise Accounting 2.0 configuration. Despite the fact that RIB allows you to exchange using email or file shares, we recommend using FTP as the simplest and most reliable method of communication. You can read how to set up your own FTP server, or you can use the FTP service of any hosting provider.

First of all, we need to configure exchange nodes. To do this, launch the configuration with administrator rights and select Transactions - Exchange Plans.

In the list that appears, select Full plan or By organization, if records are kept for several companies in one database and the exchange needs to be made only for one of them. In the window that opens, there is already one node - the central one, we need to edit it by indicating the code and name.

Then we will create another node for the branch, filling it in the same way (to add, click the green circle with a plus). Next step will create an initial image for this node, which represents a ready-made information base in file mode. To do this, click right click mouse on the desired node and select from the drop-down list Create a starting image.

Now let's move on Service - Distributed Information Base (DIB) - Configure RIB nodes.

In the window that opens, click the button Add and configure new exchange, indicating the remote host, exchange type (via FTP) and server connection parameters.

Bookmark Automatic exchange allows you to set up an exchange schedule, exchange by events (start and end of work, etc.), these settings are made for the user on whose behalf the exchange will be performed, so make sure he has rights to exchange data.

Don't forget to specify the host prefix for document numbering (otherwise you will get various documents with the same numbers) in Tools - Program Settings, here you can also configure some other exchange parameters. On the same tab, you should select a user to perform exchange tasks; if you do not do this, the schedule will not work. Please remember that exchanges will only be made if this user logged into the program.

This completes the configuration of the central node; now you need to make similar settings for the peripheral node, connecting the initial image as an existing information security system. After which you can start exchanging data. To control you should use Communication monitor, it allows you not only to monitor the success of the upload/download, but also shows any collisions that have arisen or delayed movements (if the user who made the exchange does not have enough rights to perform any actions in the database). The presence of this tool allows you to quickly and effectively solve various types of problems that arise during autoexchange.

At this point, the exchange setup can be considered complete and you can begin working in distributed mode. It is worthwhile to dwell specifically on updating or making changes to the configuration. These actions are only available on the central node; all changes made will be automatically propagated to the peripheral nodes during the next exchange. To make changes automatically, the peripheral database must be in exclusive mode, otherwise you will need to run Configurator and execute Updating the Database Configuration manually.

When developing 1C 8 exchange rules, the ability to programmatically redefine the behavior of exchange rules is widely used - the handler mechanism. Event handlers significantly expand the functionality and are an indispensable tool for setting up exchange rules in cases where interactive configuration capabilities are not enough.

Handlers and algorithms are written in the language of the platform in which they will be executed during the exchange.

If this is a 1C: Enterprise 7.7 platform, then the handler code is integrated into the upload or download processing code. Accordingly, each handler or algorithm is separated into a separate function and is available for debugging during exchange.

If uploading or downloading occurs on the 1C: Enterprise 8 platform, then the handler code is not integrated into the data exchange processing code, but is uploaded to the exchange rules file. During the data exchange process, the code of handlers or algorithms is taken from the rules file and executed directly in the context of the “Run” statement. To debug the code of handlers and algorithms, you can use the “Universal XML Data Interchange” processing.

If you exchange data between the Trade Management 10.3 and Enterprise Accounting 2.0 configurations, then after updating one of the configurations, you need to update the exchange rules.

Let's consider the case when the exchange was configured from the Trade Management configuration and configured through a direct connection to the receiver base, i.e. accounting department You need to download new rules through the data exchange settings in Trade Management. It is highly recommended to make a base before doing this.

Let's get started with 1C Trade Management 10.3. Select the item “All data exchange settings” from the Tools menu => Other data exchanges.

Select the “All exchanges” section. Find your data exchange in the list, right-click and click “Edit”. If you try to change the exchange settings from the “Data exchange with 1C: Accounting 8” section, then when you try to change, the data exchange setup assistant will be launched, which we do not need.

In the window that appears, we see that the exchange occurs according to the exchange rules, which can be saved and loaded. The rules for uploading to the exchange database are the rules by which information is uploaded from Trade Management to Accounting, and the rules for uploading from the exchange database to the current database are the rules by which information is loaded from Accounting to Trade Management.

Let's load the upload rules into the exchange database. Click “Load rules from file”. Attention, if you have atypical configuration and you use non-standard exchange rules, i.e. developed specifically for your modified configuration, then you should contact specialists to create new rules based on existing ones.

Do not under any circumstances replace them with standard rules. If you are not sure that you have standard configurations, just in case, save the existing rules with the “Save rules to file” button.

Since the latter came out much later than the update for Trade Management, we are looking for exchange rules in the catalog of 1C update templates for Accounting. You can find the update template directory as follows. Launch 1C and click “Settings”. In the window that appears, we see the path to the directory of configuration templates and updates.

Let's move on this path. Next: 1C => Accounting and select the folder with the name of the latest installed release of Accounting. If the rules need to be taken from the “1C: Trade Management” configuration update, the folder will be called Trade. For the “1C: Retail” configuration - Retail. It contains the “Data Exchanges” folder.

Next “Exchange with configuration Trade management, ed. 10.3". In it we see the RULES FOR BP-UT CONVERSION and RULES FOR UT-BP CONVERSION. Since we need rules for unloading from UT, select “UT-BP CONVERSION RULES” and click open. We do the same for the rules for uploading from the exchange database to the current database, just select the BP-UT CONVERSION RULES file and click open.

In the folder “Exchange with configuration Trade management, ed. 10.3” is the Sharing.htm file. If you have never read it, be sure to read it. It contains the following useful information:

  • Sharing purposes
  • general description
  • Migration from previous versions of two-way communication
  • Preliminary actions
  • Procedure for setting up data exchange between configurations
  • Data synchronization
  • Collaboration of the “Trade Management” and “Enterprise Accounting” configurations
  • Examples of user scenarios
  • Correspondence table of uploaded documents UT - BP (revision 1.6, edition 2.0) Correspondence table of uploaded documents BP (revision 1.6, edition 2.0) - UT
  • Features of uploading documents and reference books
  • Conformity table for uploaded BP documents (revision 1.6, revision 2.0) - UT
  • Transfer of documents “Invoice for payment to the buyer” and “Buyer’s order”
  • Transfer of cost of write-off of goods
  • Monitoring the results of data exchange

We check the rules using the check buttons. And click OK. The new rules have been saved. We start data exchange and check its operation.

How to set up two-way data exchange between the Trade Management 10.3 and Enterprise Accounting 2.0 configurations is written in my other article.