To be able to create PDFs, we needed a mechanism for linking CRM entities (transactions and leads, transactions and accounts, accounts and goods, etc.). Mind you, their Bitrix24 CRM is completely in German! There’s a popular saying that goes: Terrified of Wolfen - don’t go to Wald. We weren’t terrified!
Client’s attempt at the customization
Before contacting us, the client had attempted tweaking their Bitrix24 themselves - they altered the product list template using HTML. The result was disastrous! The HTML markups completely ruined the product display on their entire website. Markup text that should be hidden from visitors of their website became visible.
In addition to this, when they installed an update to their Bitrix24, their customization disappeared - so they were back to square one.
They had two options
They either had to spend the same resources they did the first time - tweak an HTML template that would disappear with every update to Bitrix24 and repeat a never-ending cycle OR
Contact competent professionals and get proper customization.
We’re glad they chose the second :)
We proposed a more appropriate approach that does not alter the output of goods in the CRM and is compatible with any Bitrix24 update:
Add a new property type for the CRM card: visual editor;
Create a multiple field “Product Description” in the CRM Account;
When creating an Account (or adding new goods to an existing one), copy the original description of the goods into this field;
When generating PDF, replace the original description with the description from the field in the CRM Account;
Repeat the logic for CRM Transactions, Leads and Offers, take into account entity conversion.
Our client was impressed with our proposal. We commenced negotiations immediately and wrote Technical Specifications in English (We are fluent in English).
Bitrix24 is a powerful System, but it lacks some features. There’s no “HTML text” property, so we created it.
Initially, we set the descriptions of goods to appear in the same order as the goods on the list. This seemed like a great solution until we noticed that the goods in the invoice were rearranged automatically and randomly (Surprise!). To prevent users (with the same assumptions we had) from making errors, we set a tip (product name) to be displayed before each description.
Inheriting descriptions from a CRM product card
To get product descriptions from the CRM card of the same product, we used partially documented events of the entities Lead, Transaction, Offer, Account:
OnAfterCrm ... Update
OnAfterCrm ... ProductRowsSave
Customized descriptions of goods are saved when converting entities (lead-> company) and issuing (transaction -> invoice).
Customization of the PDF generator
This was the most challenging part of the job.
The diagram below is a general scheme of the Bitrix24 “Document Generator” module before our customization:
The onBeforeProcessDocument event, which is initialized immediately after the operation of the built-in data provider, came in handy for us. The processor receives the list of goods, replaces the original descriptions with custom ones and returns the new descriptions to the generator.
The final scheme of the document generator:
We provided customization that fulfills the requirements of our client, maintains the integrity of their website and simplifies their business processes. We also gained more experience in the internal workings of the Bitrix24 document generator.
The project was completed on schedule and transferred to the client’s portal without any incident.
Although this customization was small, it was an interesting project.
INTERVOLGARU is the GOLD-CERTIFIED partner of 1C-Bitrix. We are the best in Bitrix24 integration and customization and have been leaders in sales since 2011.
We have created similar Bitrix24 customizations
If you would like a unique Bitrix24 portal, tailored to your company’s needs, or a rework of your Bitrix24 portal, Write to us at firstname.lastname@example.org.