List as Product - Customization of the Document Generator Bitrix24
14 January 2021next article
With the implementation of the document generator in Bitrix24, the employee work rate increased dramatically, and time costs and cost were reduced. The functionality allows you to create full documents from templates in a matter of seconds, where all the necessary information is substituted. All that’s needed is to print, email or store on your hardisk. The generator interacts well with CRM entities, but does not provide the ability to bring up information from the lists. If you have on-premise Bitrix24 – without a doubt, Generator will be able to interact with the lists after certain improvements.
The basics about document generator
The automatic creation of documents from templates marked by a certain layout methods was possible back in 2013 in the form of a custom application in B24.Marketplace. On March 1st, 2018, at the presentation of the "Hong Kong" version, the Bitrix24 team presented this functionality as the standard one and received rave reviews from the audience.
Indeed, the tool was found to be convenient, useful and very effective. After the introduction of the cloud service, users found complete with a generator also a set of templates of model documents (in accordance with the records management for different countries of the world), which greatly assisted the work of the entire company.
Even if the desired template was not available, both integrators and employees with an idea of text editors, such as MS Word, could create and upload it to the system upon having read the instructions on the marking rules. Improved functionality allowed the generator to take information from the correct fields of various CRM Entities. At the time of writing this is Lead, Deal, Contact, Company, Invoice and Offer. This is sufficient enough to generate all sorts of documents on numerous printed pages with a lot of fields of populated information. But every business is unique and sometimes uses non-linear solutions, tied at work with the Entities in its business processes. This was the situation for one of our foreign customers - the marketing agency BEDROCK MARKETS.
More than 100K Christmas trees
Bitrix24 allows you to model a wide variety of business processes that the company operates in terms of sales of goods or services. Managers can not only gain more information about interaction with the customer, but also exchange documents, keep a record of goods, create all sorts of offers and make repeated sales. However, it is not always possible to show the customer model by the CRM functionality.
Our customers do not have typical clients who are sold the same set of services or its variations. Each buyer is, so to say, unique: he receives a set of offers, each containing dozens of options that are interconnected. In one particular case, a “product” is a collection of different amounts of components with individual characteristics.
The simplest example of a Christmas tree being a product, a tree that has characteristics of height, color and, say, "fluffiness." If our customers were selling Christmas trees, it would be easy to work with such products in Bitrix24. But in their case, the tree can consist of hundreds of tiny characteristics: the diameter of the trunk, the area from the line of the trunk in the soil to the lower branches, the percentage of resin contained within wood, the number of pine needles on each individual branch, which, in turn, would depend on the location of the twigs to which side the sun reaches fist to help growth...
Thus, you need to create more than 100K "Christmas" products, taking into account ALL the possible variables or use the Lists in Bitrix24. Our clients initially chose this rational option, but in this case the document generator could not form commercial offers, invoices, errand lists, invoices, etc. Our team had to teach the document generator to extract data from the Lists.
In short: the developers at Avivi created custom functionality, which allows you to display in the documents List as a product. Because the customer lists are dynamic tables, you can't solve a problem by assigning variable static values to variables – the so-called "hardcode" – is not possible.
Based on the technical task, we have applied the simplest and most convenient work method for employees. In the Customer’s Bitrix24 on-premise eddition was created a new Highload-block, which included all possible characteristics of their related products. Our custom code processes the data and gives the team document generator, which in turn builds tables in the correct parts of the document template that users already see.
It is important to note that the document generator has not lost the standard ability to interact with the Bitrix24 Entities. If you need to populate the fields from the Deals, Leeds and so on, it will be possible on a level with the substitution of data from the Lists.
It’s worth mentioning, that the construction of Lists tables is similar to the Bitrix24 algorithms. There is only one line in the template where the system inserts the specific code generated by our handler. Therefore, the document generator puts the right number of rows and columns in the table, fills them with data from the Lists, which corresponds to the number of items in the List tied to the current Entity. Therefore, it is important to make sure there is one line in a correct position when creating custom templates - otherwise the document generator "will not comprehend" what is required of it.
The backlog for the future
In this particular case, only the necessary part of the functionality was implemented. Highload-block filling, as it is known, comes from the dashboard of on-premise Bitrix24 and in this particular case, the person with the necessary access rights is responsible for it. We evaluated and gave functionality that will allow filling the characteristics of products to ordinary managers in the Portal Bitrix24, but as of now, the customer postponed this issue for a later date. In the dashboard, adding performance fields to generate a document looks like this:
In any case, customization of the functionality of the document generator is an important achievement, it expands the capabilities of the system and, most importantly, corresponds to the needs of the Avivi customer. If you are also actively using the Lists, we would be happy to share our developments in this direction. After all, in addition to the document generator we still have a functionality that allows group editing of all the Lists fields in Bitrix24.
What should I do if I need to store files specifically in Tasks and not in the comments section? Clients from Italy addressed Avivi with such issues, and very soon received a completed customization which allows them to do exactly what they need. This article features the solution to a specific issue and will provide reassurance that professional developers can do everything.
A technical support — is always a pain for every business and it gets harder, when it’s you who should provide the technical support. But with custom extension HelpDesk for the self-hosted version of Bitrix24 from the Avivi Company you will solve a problem with the organization of the technical support for your clients and will receive the effective algorithm of work for your collaborators.
When getting to know Avivi company, as a customer of IT services, it is understandable one would like to learn about our work format and terms. This article was written with this aim in mind. Avivi provides flexibility in interactions with each individual customer in order to ensure the most efficient work, and we will discuss the available options.
We will reach out to within 10 minutes