header.phone_number boris@borisbot.com
Все статьи

Tables in chatbot

Table in the BorisBot.com constructor is an interactive database. It allows you to collect and save data, create product databases, track statistics, display collected information to a user, and implement other mechanics in a bot.

For example, tables will be useful for storing feedback. HR can conduct regular employee satisfaction surveys, and a marketer can collect guests' opinions about a restaurant. The bot will record all the survey participants' answers in a single table, which will be easy to analyze.

You can use tables to sell products or services. For example, make a pizza delivery bot. To do this, you need to create a product database in a special standard table template, from which the bot will recommend products based on a buyer's request, and then place an order and make a payment.

Table structure

Each table consists of one or more sheets like Excel. You can create an empty table from scratch or a table synchronized with other databases.

Blank – a new table with empty columns.

Respondents – a table with information about users who have activated a bot. It will help you manage the user database: get information about them (respondent ID, name, city, phone, email, Telegram ID, etc.), edit, delete, etc.

Files – a table with project files, here you can see all the uploaded files, as well as their type, size, and creation date.

Products – a table with preset columns for creating a product database.
In each table column, you can select a type — the format in which the information is saved: text, date, number, money, file, status, multiple status, link.
The Status type allows you to mark the state of an object: work task status (postponed), project status (completed), client request status (approved), document status (approved), etc. Statuses from the table can be used for automatic script routing, as in this bot template.

The Multiple Status type allows you to mark more than one status in a column.

The Link type allows you to link one table to another and get information in this column. This simplifies working with multiple tables.

Table filtration

When working with a table, you can use filters to temporarily hide some data.

Filtering conditions: empty, not empty, content of a specific cell.
To clear a filter, click on the Filter icon, click Reset Filtres and save.

How to create a table

1. Open the Tables section in the left menu of the designer, add a new table and name it.
2. Create a sheet: click Plus and select the table type.

Columns can be renamed, a new one can be added or deleted.
Data from the created table can be downloaded to Excel, and data can be imported from Excel into this table.

How to work with tables

The table structure is formed in the Tables section, but to use the table in the script, you need to add these blocks to the script: Table (Search for a row), Table (Add a row), Table (Delete a row), etc.
For example, if you need to save user feedback in a table, the setup scheme will be as follows.

1. Create a table in the Tables section, add and name the columns.
2. Go to the script and after all the blocks with questions, create a Table (Add row) block. In the block settings, specify the variables in which the answers will be saved. When a user completes the script, a bot will automatically create a new row in the table for him and write down the answers.

Bot templates with a table

With the help of tables, you can create simple and complex databases and manage them: surveys, recommendation services, personal accounts, registration for events, etc.

We have selected several free templates* with different tables. You can use a template in your project or just see how everything works.

Bot for employee adaptation. The bot polls company managers about the tasks of their subordinates and saves the information in a table.  
Bot for employee pulse surveys. Collects and saves feedback from employees in a table and automatically generates a report in a summary table.
Bot for restaurant feedback. Collects and saves feedback into a table.
Bot for checking English homework. Saves answers to assignments to a table. 
Bot for registering for events. Suggests events from the table, enrolls participants. 
Bot for a store in Telegram. Recommends products from the database in a table of type Products. 
Bot for blogger manager. The bot generates a table with a database of clients, where it saves information about them and TOR for advertising. There is a column of type Status, where the script is run depending on the current status of the job. 

*Template is a ready-made bot script that can be copied to your project. All templates can be found here. To use a template - register at BorisBot.com, create a project and copy the template.