Nikita Kalinin

Anton Kolodnitskiy

Cut time spent on preparing Commercial Offers five times with Bitrix24

Preparing commercial offers is an integral and compulsory part of the sales process. Whether a deal is struck or not, the time on this presale step is wasted.

When preparing a commercial offer, we spend the bulk of our time on two activities

  1. communicating with the client and 

  2. preparing the document itself.


For the first, implementing Bitrix24 CRM will help simplify correspondence with the client.

But when you need to make the commercial offer itself quickly, having it automatically generation will be a great plus. 

This is exactly what we implemented for one manufacturing company. 


No need to waste hours drafting offers when you can get them in 1 click!


Commercial offers in Bitrix24

B24 has a special entity called "Offer". Offers can create by converting a lead to a deal or creating a deal directly.


Offers contain client name, their company details and a list of products (what we sell). Additional information can be added using custom fields. B24 keeps track of all changes made to offers from the first draft to approval or rejection. 

You can also set tasks for commercial offers, issue invoices and create deals


Commercial offers can be printed or sent to the client electronically. In both cases, a PDF is generated, but this function is very limited (see below).


Printing commercial offers in B24

The B24 has a special function for printing the Offers (the first two buttons in the figure below).

Buttons Print, Download PDF, Email

"Print" - opens a printed version of the offer in the browser.

"Download PDF" - the same as "Print", only downloaded as a PDF file.


Here's what you get if you print out the commercial proposal:


The appearance can be slightly customized: You can add a logo, a picture on the background, signatures of managers, hide the columns of the table ... But you cannot change anything significant. In general, even the font cannot be changed. This can be a problem if the corporate style requires a different design.


It is even worse if the printed version needs to include additional offer information (field values from the deal form). For example, the possibility of making installments payments, etc. You cannot do without revision of this printing form.


On-premise Bitrix24 allows you to create your own templates for printed versions of the Offers (technically, a "payment method" is used as a template - see CRM settings). This must be done by a programmer.


Developing an Offer template for B24 is not an easy task. For the "print" button, which prints through the browser, everything is quite straightforward, but creating PDF using B24 is a labour-intensive task and can only be done by qualified specialists. And without creating a PDF file, sending an Offer by Email does not work.


We were contacted by a production company wishing to speed up the preparation of printed versions of their commercial offers. 


The Key wishes/requirements of the client were:

  • the ability for the company to independently create Commercial Offer templates ready for printing (without programmers),

  • Consistency in fonts, margins, indents, attached pictures when printing from different operating systems (Windows, Mac, etc)

  • it should be possible to download a PDF,

  • Our modification should be in the form of a module that can be instaled and uninstalled via the Bitrix Control panel - we must not edit the core of Bitrix24.

  • All the modifications should be done without third-party apps (everything should happen on the company's server).

We decided to develop a universal template-method-of-payment.


The main idea is to have the ability to add special marks to certain positions in the layout of the template, which will be replaced with real data during printing. These marks will be used by the template designer.


We considered three ways of implementation. Each method has its own style of marking and template layout. Let's consider them in more detail.


Option 1. Modifying the standard B24 template

The obvious downside of this option is the need for low-level PDF generation.

We would therefore need to spend dozens of hours studying PDF specification and this will be costly for the client. And so we rule this option out.


Option 2. Standard Template + 3rd Party PDF Generator

A third party library such as mPDF can be used to generate PDF.


Using the standard Bitrix editor, the administrator creates an HTML template for a commercial offer. Thereafter, add “Special text” to the template alongside normal text. The “special text” will be replaced with real data from the deal card during printing.


Here’s an example:

The administrator then adds a payment method, selects a handler developed by us and indicates the path to the template.


With our solution, when a user clicks the "Print" button, B24 displays a “select template” screen:


After that, the payment method processor replaces the “special text” with the data from the B24 offer and sends the document for printing. For example:



When you click on the "Download PDF" button, the resulting document will be converted to PDF using the mPDF library.


However, there are also a few problems with this.


First, the PDF is very different from the HTML version. The sizes of fonts and margins are not saved, some elements are placed incorrectly. 

Secondly, without layout organization skills, it is impossible to create a template that looks and behaves the same in HTML and PDF.


Summarize.


Pros:

  • simple templates can be created without a programmer;

  • there is a visual template editor;

  • it doesn't take a lot of time to create a simple template (like creating a page on a website in Bitrix).


Cons:

  • a template with a complex layout is converted to PDF with unpredictable errors, you need at least a layout designer to make everything work the way it should.


"Complex" typesetting refers to all cases that work in HTML, but do not work in mPDF.


As a result, this method of conversion to PDF was unsatisfactory.


Option 3. Templates in Word / LibreOffice

Offer templates are created in a text editor (LibreOffice or Word), which is familiar to the client. This allows you to accurately position elements on the page and reduce the chances of them accidentally moving. The output is a template in DOCX format.

This option turned out to be the most advantageous. Let's take a closer look at it in the next section.


Turning printed Commercial offers into Templates using Word / LibreOffice

General process:



Preparing the template

The administrator creates a template in Word or LibreOffice, marks it with “special data strings” like $ {field name}. There are no restrictions on the complexity of the layout. You just need to follow one rule - you cannot "break" substitutions (for example, you cannot insert line breaks in the field name).



What kind of placeholders can I put in a template? There are a lot of them:

  • standard and custom fields of the offer field,

  • standard fields of company and contact details,

  • standard and custom fields of related entities: leads, deals, accounts, employees, contacts, companies, and their fields recursively.


On average, data from several hundred fields can be used.


In other words, everything can be printed.


If the field consists of multiple entries, the values are 

  • ​​separated by commas,

  • displayed ​​in a numbered list,

  • displayed ​​in a bulleted list.


List data (goods) can be displayed in the form of a table of arbitrary configuration. Only the "Name" field is required - the table row in which it is located will be copied as many times as there are elements in the list.


Remembering the names of fields is difficult, so we developed an additional interface that displays all possible substitutions. This interface is called(triggered) by the "Print" button.



Next, the template must be saved in DOCX format and uploaded to any convenient location on the site (preferably, a section closed from public access).


Using an Offer template in Bitrix24

The administrator must 

  1. create a payment method and

  2. select the CustomQuote handler, 

  3. then, specify the path to the template in the settings.



The printed version of the commercial offer can be gotten by clicking on the "Download PDF" button.


We used the PhpWord library for replacing “special data strings”.
The end result from our program is that the Offer is DOCX format, and with unoconv (LibreOffice Server Document Converter), the resulting DOCX is converted to PDF. This file is sent to the user for printing or emailing.



Difficulties in implementation

During development, we discovered that PhpWord does not allow adding lists (numbered, bulleted) as a substitution.


A compromise solution was implemented. For numbered lists, the text “<number>.” Is appended to each item, and for bulleted lists, a special UTF character “Bullet”. This, of course, does not allow you to customize the indents in the lists, but it allows you to display them.


What you stand to gain.

Let's say you have a completed/filled out offer in B24.

To create a printed version in the form of a text document, the manager must take the official template (if there is one), copy the client's data from B24, the list of goods with prices (taking extra care so as not to make any errors), enter additional information and indicate places for managers’ signatures. This will take at least 20 minutes.

With an automatic generation module - no more than five minutes.

As the number of leads grows, this difference becomes even more apparent. If you count the time spent on mechanically filling in the commercial proposal template and editing it, then the amount is significant.

Let a company of 100 employees have 20 of them engaged in sales. Each of them, on average, prepares 4 Commercial offers per day - this is 1600 offers per month (20 employees * 4 offers * 20 working days). Even if it is 1000 Offers. It takes 300 hours a month to prepare them ( with each offer taking 20 minutes). With our module, it will take 70 hours for the exact same number of employees.

If the average cost of an hour of your employee's work is $40, then in a month you will save $9200!

In addition, with our module, management can be confident in the correctness of the Offer. This is achieved due to the fact that the manager receives a finished PDF, which he cannot change.



Conclusion

Web integration is the creation of large information web systems, deeply integrated into the Customer's business. This decreases the cost of working with clients, increases sales and automation of processes.

INTERVOLGARU is a competent web integrator . We have the resources (skill, competence and workforce)  to solve all complex web integration problems.

You can some of OUR PROJECTS

Our principle is to bring value to the client's business through the intelligent application of web technologies. 

We helped our client reduce the time spent on preparingCommercial proposals by 5 times. Saving him about $9200 per month.

Let’s help you make your company more efficient!

Leave us a request ↓

  • 07.06.2021