Data exchange between the 1C ZUP 8.3 program and Accounting 8.3 is necessary to reflect transactions for settlements with employees in accounting. If you keep personnel records and calculate salaries in the 1C ZUP 8.3 program, then read here how to download data from 1C ZUP 8.3 to 1C Accounting 8.3.

With a small number of employees, personnel records and payroll calculations can be carried out in the accounting program 1C 8.3 Accounting. But if your organization has a need for larger-scale and detailed accounting of salaries and personnel, then for this you will need additional program 1C 8.3 Salary and personnel management. Keeping records in two programs is not very convenient, but 1C solved this problem. Now the exchange of data between 1C 8.3 databases from ZUP 3.1 to Accounting 3.0 occurs automatically. But for this you need to set up synchronization between 1C 8.3 Accounting and ZUP. How to do this yourself, without involving technical specialists, read in this article. How to set up data exchange between 1C 8.3 databases from ZUP 3.1 to accounting 3.0 in a few steps, see below.

Step 1. Set up synchronization in 1C ZUP 3.1

Go to 1C ZUP 8.3 in the “Administration” section (1) and click on the “Data synchronization” link (2). A window for setting up the exchange will open.

In the window that opens, check the box next to “Data synchronization” (3) and click on the “Data synchronization settings” link (4). The settings window will open.

In the window that opens, click the “Set up data synchronization” button (5) and click on the link “Enterprise accounting, edition 3...” (6). A window will open to continue the setup.

In the new window, select “Specify settings manually” (7) and click the “Next” button (8). A window will open for you to fill in the exchange parameters.

In the window that opens, you need to specify some system exchange parameters. First you need to select a connection option in another program. In our example, this is “Direct connection to a program on this computer...” (9). This method is used if the 1C 8.3 Accounting program is located on one computer or in one local network with 1C 8.3 ZUP. Next, you need to specify the connection parameters in another program. In our example, there are two possible options:

  1. On this computer or on a computer on the local network
  2. On the 1C:Enterprise server

In our example, we select the second option (10) and fill in the “Server cluster” (11) and “Infobase name” (12) fields. Read where to get the data for these fields in the next step (Step 2).

Next, select “1C:Enterprise Authentication” (13) and enter the user (14) and password (15) that you use to log into 1C 8.3 Accounting. The data has been entered, now check the connection by clicking on the “Check…” button (16). If the test is successful, after a while the message “Connection test completed successfully” will appear. If something goes wrong, you will see an error message with brief description problems.

In the next step we will tell you where to get the data on the server cluster and database name, and in the third step we will return to setting up synchronization.

Step 2. Where in 1C 8.3 to get data on the cluster and infobase name

When you log into 1C you see the launch menu. In this menu, click once on the database with which you are setting up synchronization, on 1C 8.3 Accounting (1). Next, click the “Change” button (2). The database editing window will open.

In this window you see data on the server cluster (3) and the infobase name (4).

Now let's go back to setting up synchronization.

Step 3. Continue setting up synchronization in 1C ZUP 3.1

In the first step we stopped at checking the connection. If everything went well, click the “Next” button (1). A window will open for further synchronization settings.

In the new window you see rules (2) for uploading data from 1C ZUP to 1C Accounting. To change these settings, click on the “Change” link (3). The exchange rules setting will open.

In this window, you can specify the start date of the exchange (4), select organizations for exchange (5). You can also choose the method for generating transactions in 1C 8.3 Accounting:

  • “with details by employee” (6);
  • “summary by employees” (7).

To save the settings, click the “Save and close” button (8). To move on to the next setting, click “Next” (9). A window for further settings will open.

In this window you see the rules (10) for uploading data from 1C Accounting to 1C ZUP. If necessary, you can change them by analogy with the previous setting by clicking on the “Change” link (11). To continue, click the “Next” button (12). A window will open with general information on setting up synchronization.

If there are no errors, a window will open with a message about successful data synchronization (15). The program will prompt you to synchronize by default (16). To do this, click the “Next” button (17). A window will open with data matching information.

In the new window you can see directories for which there is unsynchronized data (18). Since you will be synchronizing information from two different information bases - 1C ZUP and 1C Accounting - from the date specified in the settings, it is necessary that certain directories in both databases have the same values. Such reference books include, for example, “Individuals”, “Organizations”, “Methods of reflecting salaries in accounting”. In this window you see directories (18) for which the data does not match. The program will automatically create the missing directory elements in both databases. To do this, click the “Next” button (19). The following window will open to synchronize data.

In the window that opens, the program informs you about the composition of the data that will be sent. To view a report that shows a list of this data, click on the link “Composition report...” (20). To complete the exchange, click “Next” (21). The exchange procedure will start, it will take some time.

Once the data exchange is complete, a window will open indicating that synchronization is complete (22). In this window you can configure the so-called “exchange schedule”, i.e. temporary rules according to which data exchange between two databases will automatically take place. To configure these rules, click the “Configure” button (23). The data synchronization script opens.

In the script window, click on the “Set up routine task schedule” icon (24). The exchange schedule setting will open.

In this setting, you can set at your discretion the time interval at which programs should exchange data. For example, in the “Repeat after” field (25) you can set the number of seconds after which the exchange will be repeated. To save the setting, click “OK” (26).

You have successfully configured synchronization between databases and started exchanging data. You can change exchange settings and control the synchronization process in the “Data Synchronization” window. You can access it through the “Administration” section (27) by clicking on the “Data synchronization” link (28).

) based on 1C 8.3, data exchange with Accounting 3.0 is very different from version 2.5. In version 2.5, the exchange took place according to the rules of exchange through an XML file at the initiative of the user. In version ZUP 3.0, we are no longer talking about exchange, but about data synchronization.

Now you don’t need to upload and download every time, you only need to configure synchronization between databases once. Moreover, it became possible to configure a synchronization schedule, without excluding forced data exchange.

So, let's look at the instructions on how to set up data synchronization between 1C ZUP 3.0 and Enterprise Accounting 3.0.

Uploading data from 1C ZUP 3.0

Let's launch the ZIK 3.0 configuration , go to the “Administration” menu and select “Data synchronization settings”.

And here many stumble upon the first “pitfall” - the flag Data synchronization unavailable! And the reason is simple: there are not enough rights to configure synchronization. To access the settings, it is not even enough Full rights. Only a user with the role can configure synchronization System administrator. In this case, you should contact a 1C specialist or your system administrator or assign yourself this role. Let's look at how to do this (those who have the checkbox available can skip the next part of the article).

To enable a role System administrator let's take advantage Configurator. IN Configurator you need to go to the menu Administration, then submenu Users and select the user who will configure the synchronization. Then in the window that opens, go to the tab Others and check the box next to the role System administrator.

Click OK and exit the configurator. Restart the ZIK 3.0 configuration and make sure that the checkbox Data synchronization now available. Let's install it.

Now you can proceed to setting up synchronization settings. To open the start setup window, click on the link Data synchronization. In the window that opens, set a prefix for numbering documents and directories (for example, “ ZK"), transferred to the Accounting Department. On the list Set up synchronization select data Enterprise Accounting, edition 3.0.

The Settings Assistant window will open. Here the program will ask you to do backup copy database before starting settings. I advise you not to neglect this procedure. We will make the settings manually, and not from a file created in another program, which we will indicate with the appropriate selection.

Get 267 video lessons on 1C for free:

Click Next. In the next window we indicate that we intend to connect directly to the Accounting 3.0 database and where it is located. If the database is located on the same computer or on a computer on the local network, you need to specify the path to it.

If the path is not known, you can find it as follows. We launch 1C 8.3 and select in the launch window the Information base from which the exchange will take place. At the bottom of the window the path to the database will be indicated; you need to copy it without quotes and paste it into the field Information base catalog in the synchronization settings window.

If the Infobase is located on the 1C Enterprise Server, the necessary data for the connection can also be found in the launch window.

When connecting to a database on the server, two parameters are required:

  • Server cluster
  • Infobase name

In the launch window, place the cursor on the name of the Infobase, and connection parameters will appear at the bottom of the window.

After you have set all the necessary parameters, press the button Check connection. If everything is correct, you should see the following picture:

Click Next. The program will check the connection again and prompt you to select Organizations, for which data should be uploaded to Accounting (link Change data upload rules), in one window and Organizations, which will be used to upload from Accounting to ZUP 3.0 (next window).

And then I came across the second pitfall. When the button is pressed Next I got this error message:

It turned out that in the configuration Enterprise accounting, with which we are going to synchronize, you also need to check the box Data synchronization. We go to the Accounting information database (again, be sure to use a user with System Administrator rights), then the Administration menu, select Data synchronization settings. Check the box Data synchronization. Accounting can be closed and returned to ZUP.

Uploading to 1C Accounting 8.3

After clicking the Next button, a window will appear asking you to perform synchronization. You can immediately press the button Ready and synchronize immediately, but I first unchecked this checkbox to find out what else the program would offer me, namely the promised exchange schedule.

Click Ready and we get to a window where you can view and change all previously made settings, as well as set up a schedule.

Setting up the schedule did not cause any particular complaints. After pressing the button Tune The settings window appears. Check the box Automatically according to schedule and follow the link to the window Schedule. After setting, click OK. The schedule can be configured for each Information base its own for both uploading and loading data.

It remains to mention one more important point. The first time you synchronize, you need to do a data mapping. This is necessary to avoid duplication of elements of reference books or documents. This is mainly true for reference books.

Site setup

1C integration module settings are available on the modules page:

To set up integration with 1C, you must specify the following parameters:

  • The size of the one-time downloaded part of the file (in bytes) - it is recommended to specify at least 1,024,000 bytes.
  • The server IP address can be left as default.
  • To use a password, you need to check the box and specify the login and password, then to use the login and password you will need to specify in 1C on the connection setup page.
  • Specify whether to create a backup copy of the database.
  • To exchange orders, you need to specify the statuses of orders that will be sent to 1C.
  • If you want the system to automatically create and assign brandy to products, you need to specify a property that will be recorded as a brand.
  • Indicate the status of orders that are imported into 1C. For example, "Processing"
  • If you want image resizing to automatically start when importing a catalog, then you need to check the appropriate box.
  • Debug mode for launched projects It is not recommended to enable it. It is intended for testing synchronization operation.
  • Enter the administrator's address to send him messages about synchronization errors.

Setting up 1C 7.x to establish a connection to the site

Connection setup

1. Launch 1C, on the Server tab, select the option “Data exchange with WEB site”, then “Set up data exchange with WEB site”.

2. In the window that appears, create new setting exchange with WEB site.

3. After this, we proceed directly to setting up a connection to the site. We select the type of data that will be exchanged with the site (products and orders), and the type of data exchange (in order for the data to be uploaded to the site, select “Upload to the site”; if you select “Upload to the catalogue”, the data will be uploaded to the specified directory ). To upload data to the site, you need to set the path to initialize the connection to the site, the user name must be set to the same as your name account in 1C (set by default).

The “Password” field does not need to be specified (if the “Use password to access from 1C server” option is checked in the administrative part of the site, then it must be unchecked).

After setting the configurations to establish a connection to the site, we check the connection:

Setting up goods unloading

Now you need to select the selection for uploading goods to the site and the catalog section in the Value column. Click on the “Next” button. At this stage, you need to specify the types of prices and product groups that will be uploaded to the site. If you check the “Upload pictures” checkbox, the attached images of the products will be uploaded along with the item. In addition, you can set additional selections. For example, you can set the selection by the field “Remaining greater than 0” and only those products that are in stock will be uploaded to the site.

With the help of selection, restrictions on the unloading of goods are established.

Settings for exchanging customer orders

At this step, you need to specify the settings for exchanging orders (the setting is displayed if the “Exchange orders” checkbox is selected at the first stage). When downloading customer orders from the site, new items of the nomenclature are identified by name, and counterparties in accordance with the established search method, which is indicated in the “Method of identifying counterparties” field. For example, you can search for counterparties by name or by TIN + KPP. In this case, if the counterparty is not found, then it is created. If there is no need to create new counterparties when loading orders from the site, then you can specify “Do not create” as the value of the “Method of loading counterparties” field and in the field that appears, select the counterparty that will be inserted into the downloaded orders. In addition, in the “Group for new item” and “Group for new counterparties” fields, you can specify the groups into which the unfound item and counterparties will be loaded. Specify the product group “Product” (new products will be recorded with this type of product). Specify the unit of measure for the new item. Items created will be recorded with this unit of measure. If necessary, fill in the new item group. This group contains goods and services created when downloading orders from the site. Specify the agreement under which “Sales Order” documents will be created. If this is required, then indicate the organization and manager on whose behalf these documents will be created.

Other settings

Data exchange mode with the site:

Now you can select an interval for periodic data exchange with the catalog on the site. Click “Done” to finish. You will be prompted to make your first data exchange with the directory.


If everything is done correctly, you will see a message similar to the following:

Setting up 1C 8.x to establish a connection to the site

Connection setup


The principle of exchange

Uploading product catalogs

Catalogs for publication on the site are uploaded in one package.

A. Start of the session


http://<сайт>/<путь>/1c_exchange.php?type=catalog&mode=checkauth.

  • word "success";
  • cookie name;
  • Cookie value.

Note.

B. Requesting parameters from the site

1. zip=yes
or
zip=no

2. file_limit=<число> , Where<число>

C. Uploading exchange files to the site

Then "1C:Enterprise" with queries with parameters like
http://<сайт>/<путь>/1c_exchange.php?type=catalog&mode=file&filename=<имя файла>
uploads exchange files to the site in CommerceML 2 format, sending the contents of the file or its part as a POST.

If the file is successfully written, the site management system displays the line " success".

D. Step-by-step catalog download

At the last step, upon request from "1C:Enterprise", a step-by-step download of the catalog is made upon request with parameters of the form http://<сайт>/<путь>/1c_exchange.php?type=catalog&mode=import&filename=<имя файла>

During loading, the content management system may respond with one of the following options.

1. If the first line contains the word " progress" - this means you need to send the same request again. In this case, the second line will return the current processing status, the amount of downloaded data, import status, etc.

2. If the response is a string with the word " success", this will mean a message about the successful completion of file processing.

Note.

Examples of upload files

Exchange of order information

Orders placed on the website are loaded into the 1C:Enterprise system.

Sequence of actions when working with an order

1. The order is placed on the website

2. When transferred to the 1C:Enterprise system, the category “Order from the site” is set in the order.
When placing an order in the 1C:Enterprise system, the number and date of the order with which it was placed on the website are recorded. The search for a counterparty is carried out by TIN or name, depending on the specified settings.

3. When loading an order, a search for an agreement with the counterparty is performed. The agreement is searched among existing agreements with the client, with the sign of conducting mutual settlements for orders (according to the Organization specified in the loading settings). If no agreement is found, a new one is created.

4. When loading an order, all its properties transferred from the site are loaded. Properties are searched in the 1C:Enterprise system by name. If there is no property with this name, then a new property is created with values ​​of type string or number.

5. The order can be modified in the 1C:Enterprise system, and its changes will be uploaded to the website

6. If the order is paid for or shipped in the 1C:Enterprise system, then the order states for payment and shipment are uploaded to the site only when the operation is fully completed (full payment and full shipment). Until this moment, the order is considered unpaid and unshipped.

7. If you try to change an order in the 1C:Enterprise system for which payment or shipment has been made, the order will not be loaded onto the website as changed. The user will receive a message about this.

8. After each order is uploaded to the site, the values ​​of its categories are determined on the site side (link to categories). These values ​​are set in the 1C:Enterprise system as they are assigned to the order on the website

A. Start of the session

Uploading the catalog begins with the 1C:Enterprise system sending an http request of the following type:
http://<сайт>/<путь>/1c_exchange.php?type=sale&mode=checkauth.

In response, the site management system transmits three lines to the 1C:Enterprise system (the line separator "\n" is used):

  • word "success";
  • cookie name;
  • Cookie value.

Note. All subsequent requests to the site management system from 1C:Enterprise contain the name and value of the Cookie in the request header.

B. Clarifying session parameters

In response, the content management system sends two lines:

1. zip=yes, if the server supports exchange in zip format - in this case, in the next step the files must be packed in zip format
or
zip=no- in this case, in the next step the files are not packed and are transferred each separately.

2. file_limit=<число> , Where<число>- the maximum allowed file size in bytes for transfer in one request. If the 1C:Enterprise system needs to transfer a larger file, it should be divided into fragments.

C. Receiving an exchange file from the site

Then a request like this is sent to the site
http://<сайт>/<путь>/1c_exchange.php?type=sale&mode=query.

The site transmits order information in CommerceML 2 format. If orders are successfully received and recorded, 1C:Enterprise sends a request of the form to the site
http://<сайт>/<путь>/1c_exchange.php?type=sale&mode=success

D. Sending an exchange file to the site

Then the 1C:Enterprise system sends a request of the form to the site
http://<сайт>/<путь>/1c_exchange.php?type=sale&mode=file&filename=<имя файла>
,
which uploads the exchange file to the server, sending the contents of the file as a POST.

If the file is successfully written, the content management system sends a line with the word " success". Additionally, the following lines may contain notes on loading.

Note. If an error occurred during any request, the first line of the response from the content management system will contain the word “failure”, and the following lines will contain a description of the error that occurred while processing the request.
If an unhandled error occurs at the core level of the product or sql query, then html code will be returned.

Synchronizing the CRM system “Client Base” with 1C will be useful if the work of one part of the users is carried out in 1C, and the other part in our CRM. This will allow you not to give users access to two programs at once and simply establish data exchange between programs. In order to use synchronization between 1C and CRM “Client Base”, you need to purchase the 1C module. You can do this by filling out an application on our website. The synchronization setup itself can be divided into two parts: Setting up 1C and the synchronization module, Setting up the CRM “Client Base”.

At the same time, the 1C program has the following requirements:

  • The version of the 1C:Enterprise 8.3 platform must be at least 8.3.4;
  • Work with the infobase must be performed in file or client-server mode;
  • Work with the infobase must be performed in managed application mode.

Setting up synchronization from the 1C side

After sending the application, you will receive an archive containing an executable file for synchronization, a file for setting up communication in .epf format, as well as several text files with code.

Preliminary steps for universal processing to function

Make an archive copy of the 1C:Enterprise 8.2 information database

Create new metadata objects in the configuration structure.

Go to the information database in the “Configurator” mode. If the configuration tree is not yet open, open it using the menu “Configuration - Open configuration”:

1.1.1. Create a constant “KBUpload Catalog_”. In the configuration tree, right-click on the “Constants” branch and select “Add”:


In the “Properties” window that opens, set the properties of the constant. Name: CatalogUploadKB_. Synonym: Upload directory "KB". Type: String. Length: 300:


Close the Properties window.

1.1.2. Create a constant “DownloadDirectoryFromKB_”. In the configuration tree, right-click on the “Constants” branch and select “Add”. In the “Properties” window that opens, set the properties of the constant.

Name: CatalogDownloadsFromKB_. Synonym: Download directory from "KB". Type: String. Length: 300.

1.1.3. Create the constant “UploadForKBEnabled_”. In the configuration tree, right-click on the “Constants” branch and select “Add”. In the “Properties” window that opens, set the properties of the constant. Name: UploadForKBEnabled_. Synonym: Upload for KBV is enabled. Type: Boolean.

1.1.4. Create a constant “LoadFromKBEnabled_”. In the configuration tree, right-click on the “Constants” branch and select “Add”. In the “Properties” window that opens, set the properties of the constant. Name: LoadFromKBEnabled_. Synonym: Loading from KBV is enabled. Type: Boolean.

1.1.5. Create a constant “UserNameToLoadFromKB_”. In the configuration tree, right-click on the “Constants” branch and select “Add”. In the “Properties” window that opens, set the properties of the constant. Name: UserNameToDownloadFromKB_. Synonym: Username for downloading from KB. Type: String. Length: 300.

1.1.6. Create a constant “File Reading Periodicity KB_”. In the configuration tree, right-click on the “Constants” branch and select “Add”. In the “Properties” window that opens, set the properties of the constant. Name: Frequency of Reading KB Files_. Synonym: Frequency of reading text files "KB" (in seconds). Type: Number. Length: 5. Accuracy: 0. “Non-negative” flag is cocked.

1.1.7. Create a reference book “TablesKB_”. In the configuration tree, right-click on the “Directories” branch and select “Add”:


In the window that opens, on the “Basic” tab, set the following properties. Name: TablesKB_. Synonym: KB tables. On the “Data” tab, set the following properties. Code length: 5. Name length: 100. Code type: String. Main presentation: In the form of a name. On the “Numbering” tab, enable the “Auto-numbering” and “Uniqueness control” flags. Code series: Throughout the reference book.
Close the directory window.

1.1.8. Create a reference book “Compliance with KB_Requisites”. In the configuration tree, right-click on the “Directories” branch and select “Add”. In the window that opens, on the “Basic” tab, set the following properties. Name: MatchingDetailsKB_. Synonym: Matching the details of "KB". On the “Data” tab, set the following properties. Code length: 20. Name length: 150. Code type: Number. Main presentation: In the form of a name. Right-click on “Details” and select “Add”:


In the properties window that opens, set the following properties. Name: TableKB. Synonym: KB table. Type: DirectoryLink.KBTables_. Index: Index. Do not change the remaining properties. Close the properties window. On the “Numbering” tab of the directory, set the following properties. Auto numbering: the checkbox is cleared. Uniqueness control: the checkbox is checked. Series of codes: Throughout the directory. Close the directory window.

1.2.9. Create the “Types of Conditions for KB_” enumeration. In the configuration tree, right-click on the “Enumerations” branch and select “Add”. In the window that opens, on the “Basic” tab, set the following properties. Name: Types of Conditions for KB_. Synonym: Types of conditions for "KB". On the “Data” tab, right-click on the “Values” branch and select “Add”:
You need to add 5 values:- Name: More. Synonym: More - Name: Less. Synonym: Less.- Name: GreaterOrEqual. Synonym: Greater than or equal to. - Name: Less than or Equal. Synonym: Less than or equal to- Name: Equal. Synonym: Equal. Close the enumeration window.


1.2.10. Create an information register “DataAboutObjectsKB_”. In the configuration tree, right-click on the “Information Registers” branch and select “Add”. In the information register window that opens, on the “Basic” tab, set the following properties. Name: DataAboutObjectsKB_. Synonym: Data about objects, information about the cat. uploaded to "KB". Frequency: Non-periodic. Recording mode: Independent. On the “Data” tab, right-click on the “Dimensions” branch and select “Add”:


You need to add 2 dimensions:

  • Name: Object. Synonym: Object. Type: String. Length: 100. Allowed length: Variable. The "Main selection" flag is set.
  • Name: UniqueIdentifier. Synonym: Unique identifier. Type: String. Length: 100. Allowed length: Variable. The "Main selection" flag is set.

Right-click on the “Resources” branch and select “Add”. You need to add 1 resource:

  • Name: Presence Sign. Synonym: Indicator of presence. Type: Boolean.

1.2.11. Create an information register “Checking Remote Objects for KB_”. In the configuration tree, right-click on the “Information Registers” branch and select “Add”. In the information register window that opens, on the “Basic” tab, set the following properties. Name: CheckDeletedObjectsForKB_. Synonym: Attribute for checking deleted objects (for "KB"). Frequency: Non-periodic. Recording mode: Independent.

On the “Data” tab, right-click on the “Dimensions” branch and select “Add”. You need to add 1 dimension:

  • Name: DateDay. Synonym: Date day. Type: Date. Date composition: Date. The "Main selection" flag is set.

Right-click on the “Resources” branch and select “Add”. You need to add 1 resource:

  • Name: Sign. Synonym: Sign. Type: Boolean.

Right-click on the “Details” branch and select “Add”. You need to add 1 property:

  • Name: User. Synonym: User. Type: String. Length: 100. Allowed length: variable.

As a result, the “Data” tab of this information register should look like this:


Close the information register window.

1.2.12. Create an enumeration “Types of Possible Tables_”. In the configuration tree, right-click on the “Enumerations” branch and select “Add”. In the window that opens, on the “Basic” tab, set the following properties. Name: Types of PossibleTables_. Synonym: Types of possible tables. On the “Data” tab, right-click on the “Values” branch and select “Add”. You need to add 4 values: - Directory. Synonym: Directory - Document. Synonym: Document - Register of Information, Synonym: Register of Information - Enumeration, Synonym: Enumeration

1.2.13. Create session parameter "TextDocKB_". In the configuration tree, open the "General" branch, then the "Session Parameters" branch. Right-click and select “Add”:
Set the properties of the session parameter: Name: TextDocKB_, Synonym: Text docKB, Type: String, the "Unlimited length" flag is set.

1.2.14. Create a session parameter “Record OTKB_Changes”. In the configuration tree, open the "General" branch, then the "Session Parameters" branch. Right-click and select “Add”. Set the properties of the session parameter: Name: Record OTKB Changes_, Synonym: Record OTKB Changes, Type: Boolean.

1.2.15. Create session parameter "ObjectKB_". In the configuration tree, open the "General" branch, then the "Session Parameters" branch. Right-click and select “Add”. Set the properties of the session parameter: Name: ObjectKB_, Synonym: Object to b, Type: AnyRef.

1.2.16. Create a session parameter “CharacterPerformedKB_”. In the configuration tree, open the "General" branch, then the "Session Parameters" branch. Right-click and select “Add”. Set the properties of the session parameter: Name: Attribute PostedKB_, Synonym: Attribute posted to b, Type: String, Length: 0, Allowed length: Variable, “Unlimited length” flag is set.

1.2.17. Adjust existing roles. In the configuration tree, open the “General” branch, then the “Roles” branch. For each role, perform the following actions: double-click on the role name, in the window that opens on the right in the configuration tree, select newly created objects (constants, directories and information registers) and set the rights: for constants - read; for reference books - reading, adding, changing; for information registers - reading, changing.

1.4 Add the required lines of code to the managed application module.

Right-click on the configuration name and select “Open Managed Application Module”:



At the beginning of the module, you need to insert text from the Text1.txt file, which is available in the archive with the synchronization module.

Find the “When the System Starts” procedure. To do this, go to the “Text” menu and select “Procedures and functions”:


In the list that opens, select the “When the System Starts” procedure and click the “Go” button:


As a result of this, the cursor is positioned at the beginning of the WhenSystemStart() procedure.

At the beginning of this procedure it is necessary insert text from the Text3.txt file.

At the very end of a regular application module you need insert text from the file Text5.txt.

1.5 Add the necessary lines of code to the general module “General Purpose KB_” In the configuration tree, open the “General” branch, and in it expand the “General Modules” branch:


Right-click on the “Common Modules” branch and select “Add”. Set module properties: Name: General Purpose KB_, Synonym: General purpose KB, “Server” flag is cocked, “Server Call” flag is cocked. Then double-click to open the module text and insert text from file Text6.txt

Close the module window.

1.6 Add the necessary lines of code to the general module “General Purpose KB_VS”. In the configuration tree, open the “General” branch, and in it expand the “General Modules” branch. Right-click on the “Common Modules” branch and select “Add”. Set the properties of the module: Name: General Purpose KB_VS, Synonym: General Purpose to b VS, The “Server” flag is set, the “External Connection” flag is set. Then double-click to open the module text and insert text from the file Text7.txt.

1.7 Create event subscriptions.

In the configuration tree, expand the “General” branch, right-click on the “Event Subscriptions” branch and select “Add”:


You need to add 5 event subscriptions:

  • Name: Changing Directory Details for KB_. Synonym: Changing the details of directories for "KB". Source: DirectoryObject. Event: BeforeRecording. Handler: General Purpose KB_VS.Changing Directory Details_BeforeRecording.
  • Name: Changing Document Details for KB_. Synonym: Changing document details for "KB". Source: DocumentObject. Event: BeforeRecording. Handler: General Purpose KB_VS.Changing Document Details for KB_BeforeRecording.
  • Name: Changing Directory Details for KBRecord_. Synonym: Changing directory details for KBRecord. Source: DirectoryObject. Event: OnWrite. Handler: General Purpose KB_VS.Changing Directory Details for KBRecord_WhenWriting.
  • Name: Changing Document Details for KBRecord_. Synonym: Changing document details for "KB" Record. Source: DocumentObject. Event: OnWrite. Handler: General Purpose KB_VS.Changing Document Details for KBRecord_WhenWriting.
  • Name: ChangeContentsofInformationRegistersForKB_. Synonym: Changing the contents of information registers for "KB". Source: Information RegisterSet of Records. Event: BeforeRecording. Handler: General Purpose KB_VS.Changing the Contents of Information Registers for KB_BeforeRecording.

Go to the “Configuration” menu and select “Save configuration”. Wait until saving is completed.

1.9 Update the database configuration.

Go to the “Configuration” menu and select “Update database configuration”. When prompted, click the “Accept” button. Wait for the database configuration update to complete.

1.10 Connect universal processing file

Copy the “Communication SettingsSKB83.epf” file to the infobase directory. It is necessary to open universal processing in the user mode of working from the infobase, provided that no other users are currently working with the infobase (when opened, universal processing tries to establish an exclusive mode of working with the database). You can open the processing through the “File - Open” menu, or you can connect it as an external processing.

Working with universal processing

Make an archive copy of the 1C:Enterprise 8.2 information database

Terminate all users from working with the infobase. Go to the information database in the “Configurator” mode. Through the menu “Administration - Upload infobase”, specify the path to the file. Wait for the message “Upload completed successfully.” As a result, the information base will be downloaded to a file with the .dt extension.

Setting up the structure for uploading/downloading information

The structure of uploaded/downloaded information is configured on the “Tables” and “Fields” tabs of universal processing:


On the “Tables” tab, a list of “KB” program tables is compiled that will be used in data exchange. Adding/editing/deleting tables is done using the command panel buttons located above the list. To save the list of tables, you must click the “Save” button located to the right of the list. Attention: to further configure the exchange structure, you must add at least one table to the list.

On the “Fields” tab, you configure the fields of the “1C” information base that will be synchronized:


Adding fields is done using the “Add” button to the right of the list. When you click the button, an additional window appears:


First, you must specify the type of metadata object: Directory, Document, Information Register or Enumeration, and then select a specific object in the “Metadata Object” list. After selecting an object, the “Details” list will be filled in automatically:


In the list of details, you need to check the boxes for those details that will be synchronized. Attention: the standard attribute “Deletion Mark” is marked automatically! The details of the tabular parts are highlighted in the list of names of the tabular part, framed by the symbols “/”:


After defining the list of synchronized fields, you must specify the corresponding “KB” table in the “KB Table” field and click the “Add” button:


The marked details will be added to the “Compliance of details” table. For each field, you must indicate the corresponding field number “KB”.

You can delete unnecessary fields using the “Delete” button to the right of the table.

The list of fields can be sorted by attribute name. To do this, use the “Sort” button to the right of the table.

In cases where it is planned to synchronize the details of the tabular parts of directories or documents, as well as the fields of information register records, for the correct functioning of the upload/download it is necessary to manually add the attribute "UniqueIdentifierKB_" to the structure of the corresponding metadata objects. To simplify things, universal processing will “tell you” where exactly this attribute needs to be added. For this after compiling a list of synchronized fields you need to click the “Report on adding details” button located to the right of the table.

A hint will appear in the message window at the bottom to which metadata objects you need to add the “UniqueIdentifierKB_” attribute.

To add details, you need to close the user mode of working with the infobase and start it in the “Configurator” mode. Then you need to make an archival copy of the information base. (see clause 2.1 of these Instructions)

If the configuration tree window is not open, open it using the menu “Configuration - Open configuration”:


Using the “File - Open” menu, open the universal processing file (Communication SettingsSKB.epf), which is located in the infobase directory:


In the universal processing window, you need to expand the “Tabular Parts” - “Matching Details” branch and select the “UniqueIdentifierKB_” attribute:


Next, in the configuration tree (in the left window), you need to find the required metadata object, expand it, expand the “Tabular parts” branch and expand the branch of the corresponding tabular part. Then use the mouse to move the attribute “UniqueIdentifierKB_” from the universal processing window to the required tabular part. It is necessary to “throw” the details not on the name of the tabular part, but on any of its details.

An example of transferring the “UniqueIdentifierKB_” attribute to the “Types of Activities” tabular part of the “Counterparties” directory:


And the result:


An example of transferring the attribute “UniqueIdentifierKB_” to the tabular part “Services” of the document “Sales of Goods and Services”:


And the result:


If you add the “UniqueIdentifierKB_” attribute to the information register, you need to expand the “Information registers” branch in the configuration tree, expand the branch of the corresponding register and expand the branch of its resources. Then use the mouse to move the “UniKID_KB_” attribute from the universal processing window to the “Resources” branch of this information register. You can “throw” the attribute both on the word “Resources” and on any resource of the “Resources” branch. An example of adding the attribute “UniqueIdentifierKB_” to the information register “Advances to Employees”:


And the result:


After adding the “UniqueIdentifierKB_” attribute to the required metadata objects, you must save the configuration through the “Configuration - Save configuration” menu. Then - update the database configuration through the menu “Configuration - Update database configuration”. Then close the Configurator.

Setting up initial export

If you need to upload not all the contents of a particular metadata object, you can set a condition by filling in the columns “Attributes of the type “Date”, “Condition” and “Condition value”. In the “Date type attribute” column, you can select a “Date” type attribute for this metadata object from the list. In the “Condition” column, select the type of condition: Equal to, Greater than, Greater than or equal to, etc. In the “Condition value” column, specify a value of the “Date” type. As a result of this setting, only those objects that meet the specified conditions will be unloaded during the initial export.

To start the initial export, click the “Export” button to the right of the table.

Important: Initial export may take for a long time! It is recommended to carry out this step by step, rather than uploading all the data into one transaction.

The path to the directory in which text files with information will be saved is indicated in the “Directory for uploaded text files” field. Attention: all users working with the infobase must have read and write access rights to this directory! To save the path to the directory, click the “Save” button on the right.

The “Upload” flag enables the process of uploading information. If this flag is cleared, all settings made on other universal processing tabs are saved, but information will not be uploaded to text files when users work with the infobase.

Information about deleted marked objects is uploaded to text files daily when the first user logs into the program. Forced downloading of information about such objects can be done using the “Download Now” button.In the “User name for downloading” field, you must specify the exact name of the user in whose session information from text files will be downloaded. Attention: given user You must have read and write access to this directory! Attention: this user must have full rights in the 1C information base.

In the “File reading frequency” field, you specify the interval in seconds at which the appearance of new files in the download directory will be scanned.

The "Download" flag enables the process of downloading information in the specified user's session. If this flag is cleared, all settings made on other universal processing tabs are saved, but information from text files will not be loaded when the specified user is working with the infobase.

To save the specified download parameters, click the “Save” button on the right.

Other

Synchronization of fields of the "Enumeration" type

To correctly synchronize values ​​of the "Enumeration" type, you must:

  1. On the "Fields" tab, add the appropriate listing and assign it the field number "KB". For enumerations, only one row is added: Value.
  2. Perform an initial export of the corresponding "KB" table. In this case, for each enumeration value, a line of the following type will be unloaded: KB_field_number; Enumeration_value_name; Enumeration_value synonym.

In the future, synchronization will occur by the name of the enumeration value. That is, when unloading from 1C, the name of the enumeration value will be unloaded as a value. When generating files from "KB", you must also specify the name of the enumeration.

Handling invalid files

If universal processing in the first line of the file from “KB” cannot recognize the 3 required blocks (KB field number, identifier and value), separated by a semicolon, then:

  • this file is considered incorrect,
  • subsequent lines of the file are not processed,
  • a message about an incorrect file is displayed in the message window,
  • The file extension is renamed to .bad.

If the first line in the file from “KB” is correct, but the rest are not, then the file is processed as usual, incorrect lines are simply skipped.

Important: If you are using the SaaS version of the CRM program "Client Base", then on the server on which 1C is located you need to run the file ClientSync.exe, which is located in the archive with the synchronization module. When starting this program, you must specify the program address, as well as the synchronization password.

Setting up synchronization from the KB side

Primary synchronization

Primary synchronization is necessary for the initial exchange of records between synchronized programs. It is carried out 1 time. Further synchronization occurs only based on events.

To set up primary synchronization, go to "Settings" - "Advanced"

Open the "Sync" section and add a new sync.

Specify a name to indicate synchronization, "Synchronization Mode"specify as "Integration with 1C","Synchronization type" - "Local", specify the folders for downloading and uploading data. An example of the setup is shown in the screenshot below. Also, if necessary, check the box to record a log.



Important: Folders for file synchronization must be created in the upload and download folders. The folder name should be "files".

After making changes, click on the “Save” button. You will be redirected to a menu to select program fields that will be filled in with data from 1C.

We select the table and the fields from it into which the data will go, and indicate in which direction the data synchronization will go - for loading data, for uploading data, or (as in the example in the screenshot) there will be two-way data synchronization. In our example, this will be synchronization information on records in the "My Company" table.

After entering all the fields, click on the “Save” button

Then you need to perform initial synchronization. To do this, go to the synchronization settings and click on the "Primary synchronization" button. The message "Completed" should appear.

In the future, synchronization between programs will occur when:

  • Changing records in 1C or in KB in the tables selected for synchronization;
  • Adding entriesin 1C or in KB in the tables selected for synchronization.

Sync files

Additionally, it is worth mentioning the synchronization files themselves. After the initial synchronization, two files will be created.

The file in the upload folder contains information about:

  • ID of the field from which the data is taken
  • ID of the record from which the data was taken
  • And the data itself

and so on for each record and field in it. Example of an upload file in the screenshot below

The file in the download folder contains:

  • System value "ID"
  • Information about ID of a random field in the table into which the data will be loaded. This is necessary for the KB to determine which table the data needs to be loaded into.
  • Information about ID of the record to which you want to add information.
  • A unique value that will be added to one of the system fields of the program to compare records from 1C and KB.

The 1C configuration “Trade Management, edition 11” has several built-in exchange plans, including the configuration “Enterprise Accounting, edition 3.0” (Fig. 1).

It is a set of rules according to which objects from one configuration will be loaded into another. In our instructions, we will configure the exchange between 1C Accounting 3.0 and 1C Trade Management 11 based on the 1C 8.3 platform.

The presence of the plan we need in the list of standard exchanges greatly facilitates the integration process. However, there are a few preliminary settings that need to be made in both configurations.

First, let's look at the sequence of actions in 1C Enterprise Accounting 3.0. Find in the “Administration - Settings” section the item “Setting up data synchronization” (Fig. 2).

Here you need to enable the “Data synchronization” checkbox and be sure to specify the prefix of our database (Fig. 3). If you wish, you can - no data will be loaded or changed before this date.

Now go to the “Data Synchronization” tab and configure the exchange itself (Fig. 4). There may be several exchanges. For each, its own line is created (button with a plus sign “Set up data synchronization”). We already have two entries in the 1C Accounting demo database. Let's check the settings of the latter (the button with a pencil “Configure rules ...").

We only fill out the “Rules for receiving data” tab (Fig. 5), since we will not send anything. On the “Rules for sending data” tab, check the “Do not send” checkboxes.

It remains to check the connection parameters (Fig. 6). We select “direct connection”, indicate the address of the database on the disk from which we will receive data, and the user/password of the same database. The user must have full rights or at least rights to perform synchronization. Sometimes a virtual user is created specifically for exchanges.

Detailed information about the settings in this section can be obtained from Help (F1).

Similar settings are made in the 1C Trade Management 11 database.

Setting up an exchange on the Trade Management side 11

In different releases, the section we need may have a different name. In our example, this is the item “Setting up integration - Other programs” (Fig. 7).

The rest is similar. The same “Data synchronization” checkbox, the same item and similar settings. (Fig.8).

Only the prefix is ​​different. This is important!

Get 267 video lessons on 1C for free:

Go to the “Data Synchronization” tab and create a new exchange. You can select the configuration with which we want to exchange using the “Set up data synchronization” button; the exchange itself is created using the “Configure” button (Fig. 9).

From this moment, differences from the previous setting in BUKH.3.0 begin. We need to fill out the “Rules for sending data” tab (Fig. 10). And the main thing that needs to be done is to determine the composition of the data being sent.

There are several ways to select the data that we are going to transmit (Fig. 11). All of them are collected in the “Register” section. You can select either one object or a list. Or all at once.

Let's return to the previous tab and complete one more important point, already familiar to us - we will indicate the connection parameters (Fig. 12). The parameters are configured in the same way as for accounting. Only this time we are using a virtual user named "Exchange".

Launching and checking the exchange between 1C Accounting 3.0 and 1C Trade Management 11

The exchange is performed using the “Synchronize” button, which is located on the first settings page (Fig. 13). This button can be found on other pages. Moreover, there is not much difference in which of the two configurations this button is pressed. The exchange is two-way.

Press the button and move on to the next step.

If the exchange is performed for the first time, you will have to perform manual synchronization, that is, compare identical objects of two configurations, if any (Fig. 14). If this is not done, duplicates may appear.

At the next step, it will be possible to select the organizations through which the data will be transferred, and some other selections (Fig. 15).

A description of all selections appears in a special window, and full list objects that will be sent can be obtained in the report on the composition of the sent data (Fig. 16).

The exchange can take a long time; the time depends on the number of objects being transferred. After the process is completed, we get the following picture - Fig. 17. By clicking the “Setup” button, you can set up a schedule according to which the exchange will be performed automatically.


Close