Chatbot for calculating repair costs
The chatbot finds out the client’s problem, calculates the approximate cost of repairs and transmits the information to the manager.
You need to log in to see the interactive example.
You need to log in to see the interactive example
From the user Borisbot
Clients come to construction company websites and want to understand how much repairs might cost. We have created a bot that will automatically calculate the approximate cost of the work and save contact for further communication.
Difficulty level: medium – you need to understand the calculation settings
Setting time: 5-6 hours
Versatility: high – suitable for calculating the cost of various works and services
How does it work?
The bot is embedded into a website as a widget and activated by a trigger message. When a visitor has visited the site, the assistant engages him in a dialogue and asks clarifying questions: the number of rooms, square footage of the apartment, etc.
The answers are inserted into ready-made cost calculation formulas for each type of work. The bot automatically calculates the calculation immediately. Next, it requests a phone number for contact and calculates the total amount of repairs.
The bot saves the cost of each type of work and the total renovation cost in a table and displays it to a website visitor.
If the user is ready to discuss his situation in more detail, he can request a call. A new application will be sent to managers by email or directly to the CRM system.
How to set up a bot?
Create a project in the constructor and copy this template.
Think over and add questions that need to be asked to a website visitor for an approximate repair cost calculation. Use the blocks “buttons with one answer option” and “number”.
Create a table.
In the “Tables” section, add positions (column names) by which the bot will calculate the cost of repairs. Columns can be deleted and new ones added. The Client ID column is a required parameter that the bot will work with. You can change the column type: date, number, file, etc. For example, if you ask a client to send a photo to the bot and decide to save it to a table, in this case you need to select the “file” column type.
Set up costing.
After clarifying questions, there is a “Table” block, the “Add Row” block type. It is needed to calculate and record in the table the cost of work for each item. This block will display all the cells from the table that you created earlier; they need to be filled in.
- In the client ID cell, substitute the value %respondent_id% (global variable). The bot will use it to search for the user in the table.
- Positions (footage, windows, etc.). Substitute the formula =calc(%answer_X%*Y) into each cell, where X is the number of the block in which there was a question about a specific position, and Y is the cost of the work. For example, in the template in block 5 (%answer_5) the bot asks for the number of windows, the cost of installing one window is 25,000 rubles. Accordingly, we substitute these values into the formula like this: =calc(%answer_5%*25000) – the bot multiplies the number of windows by the cost of the work and receives an amount, which it immediately writes into the table.
Further in the template, examples of calculation and recording in a data table through the “Table” block, block type “Update cell” are shown. This option is needed if the block with buttons does not contain numbers (number of rooms, windows, etc.), but text or emoji. The bot will not be able to calculate the amount with such initial values. In this case, you need to add a value that the bot will take for calculation. The “Update Cell” action will help with this.
- Select the column in which you want to record the cost of the work.
- In the “rowNumber” cell (row number), add the variable %answer_X.row_number%, where X is the number of the “Table” block.
- In the “new cell value” cell, write the calculation formula as shown above.
Set the total amount of all jobs. Select the “Table” block, the “Line Search” block type.
- In the "Column" value, add the letter "A" – the ID in the table.
- In the "value" cell, add the %respondent_id% variable.
- Next, use the same setup scheme via “Update Cell”. Only in the “new cell value” cell, substitute the formula for the amount: = calc(%answer_X.cells.Y%+%answer_X.cells.Y%+%answer_X.cells.Y%+%answer_X.cells.Y%+%answer_X.cells.Y%+%answer_X.cells.Y%+%answer_X.cells.Y%); where X is the number of the previous “Table” block, the block type is “Line Search”, Y is a column from the table (specific positions: footage, windows, etc.). An example of settings is in the template.
Next, you need to display the approximate amount of repairs, which the bot calculated, to a website visitor. Select the "Table" block, the "Get Cell" block type. Add the value to the cell: X:%answer_Y.row_number%, where X is the letter of the column in which the amount is written, Y is the number of the table block in which the amount was calculated. For example: H:%answer_17.row_number%.
The next “Buttons” block is needed to show the amount to a user. Add a variable to the body of the block – the number of the previous block “Table”, the block type “Get cell”. You can manually add explanations, in this case we indicated that this is an approximate amount: +\- 20%.
And the last one.
- Using the “Notification” block, configure the sending of new applications by email. You can also integrate the bot into your CRM system (to do this, contact us).
- Place the widget on the website and configure the designer to launch a trigger message based on an “Event on the site.”
- In the “Analytics” section, configure reports based on the script.
- Test the bot.
If you have any questions, write to us on Telegram.