Document Generator for Cloud Bitrix24

Document Generator for Cloud Bitrix24


Document Generator compiles the files with .docx-extention, based on the template, created by the user, and by sourcing data from CRM.

Principle of operation (example)

To work with the Generator, you have to create a template file with the .docx extension. A template may contain any text with the formatting you need, and it must also contain Merge Field-type fields with specified variable names for data substitution.

You can add fields of Merge Field type this way: click the Ins ert tab, select Quick Parts - Field. Sel ect the «MergeField» type, enter the name of the variable in the «Field name» field, specify the field «Format» as «No».
Save the template.

Attention! When working with MacOS it's desirable to use MS Word for Windows to create templates.

Note the ID field next to the loaded template. It will be used in the Generator settings. If the ID column is hidden, enable it in the settings.

Also create a folder to save the result file after running the Document Generator, and remember its ID.
After downloading the template, you can proceed to work with business processes. For example, we will create a template business process for the company in CRM.

At any point in the business process chain, add the Document Generator (from the Application Actions tab).
Open the Generator settings. The fields are specified in the settings; the data from these fields will be substituted into the variables of the template fields.

Let's look at the settings fields:

• Title — the name of this activity. This is especially convenient if there are several Generator activities in the chain of the business process. In this case, the created files with the result will have different names that you set in the settings of each activity;
• ID of the template (integer) — ID of the file with .docx extention, which was downloaded as a template file in the system;
• ID of the folder — ID of the folder to save the resulting file (integer);
• Name of file — format of the resulting file, for example: KP_{=System:Date} — in this case, the name of the file will contain letters KP, underscore and the current date (if the file with this name already exists, the result will not be saved);
• Label — name of the variable in the template file. If there are several fields of the Merge Field type, click Add button and fill in the names of other variables;
• Text for label — the name of field, from which the data will be taken for substitution. If you have specified several labels, you have to specify the “Text for label” field for each of them. You can choose the data field for substitution from the list - click on the button with three dots.
• Run as - specifies, on behalf of which users to run the business process.

After filling out all the Generator fields click the "Save" button. Then, save the implemented changes into the business process (button below).

Starting a business process

After you have determined all the settings for the Generator, you have to start the business process, with which the file generation will be linked. In our example, the business process is performed on company data, so we sel ect any company from the list and launch our business process for it.
After running the business process, the resulting file can be easily downloaded fr om the folder you specified in the settings, printed or sent by e-mail.
The resulting file completely saves the formatting you specified.Conclusion
Significantly reduced time of drawing up documents! Also, the human factor is excluded, since it is easy to make a mistake when filling out a multitude of similar documents. And when data is taken automatically fr om the system, such factor is excluded.

Install App