Chat bots are a tool for automatic interaction between the user and the messenger, which provides a programmed response depending on the user's actions in the bot. There are, of course, bots with different levels of artificial intelligence. But, if we talk specifically about bot scripts, then they belong to programmable bots.
A chatbot consists of a general logic (chatbot flowchart) and each individual bot-user interaction scenario. One script is one user step in the bot. For example, a user subscribed to a chatbot, the bot found a corresponding script that is a reaction to the subscription, and displayed the content of the script to the user:
The user then pressed a button in the dialog box (script keyboard) and was shown the content of another script, in this case text and keyboard again.</p >
The script in the chatbot can be launched not only by pressing the corresponding button, but also by the text that the user enters in the input field.</ p>
In general, the content of each bot script can consist of:
Before starting to configure scripts for the bot, it is advisable to understand the entire future structure of the bot. This is important so that the interface of your bot is clear and easy to navigate for users. Also. it is very important that there are situations when the bot does not respond to the user's action.
Let's analyze an example of creating and configuring a welcome script in a chatbot using the chatbot creation service Gerabot.< /span>
First of all, the service is convenient in that, after registration, you can immediately choose one of the ready-made templates for a chatbot by topic.
This can make it much easier to understand the logic of bot scripts and speed up the creation of new scripts or adapting the template to your bot's needs.
Don't have your own bot yet? Do you think that creating a chatbot is difficult?
Sign up now at Gerabot chatbot constructors, and create your own chatbot in 15 minutes!
After enabling one of the templates, you will have a list of ready-made scripts that are related to each other.
Let's go to the settings of one of the scenarios. Here we will see the main settings, and tabs for switching pages of additional settings.
In the main settings, you need to add the text that will be displayed when the user hits the script, keywords that can be triggered script if present in the user's text message and enable or disable the keyboard (if needed). These are the settings that are primarily important to configure. Other settings, more discussed in detail in the knowledge base.
Also, as you remember, the script can contain files that will be displayed to the user after hitting the script (media files tab) and the keyboard.</p >
The keyboard in the chatbot is the main tool that helps the user to navigate between scenarios. Let's consider in more detail the fields that one keyboard button contains.
The width of the button.
The total width of the keyboard row in the bot is 12. That is, if the width is specified as 12, then the button will be stretched to the full width. If the width of two buttons is defined as 6, then the keyboard will display two buttons in a row.
Action when clicked.
The bot can ask the user for a phone number or his location, if the corresponding action is indicated in the selection.
The text that will be displayed to the user in the keyboard button.
If a link to an external resource is specified, the user will go to it when the button is pressed.
Important!!! Links do not work on all types of keyboards in messengers. For example, the links do not work on the regular telegram keyboard shown below.
Script on click.
A key setting that determines how the bot reacts when the user clicks the button. In this selection, it is indicated to which the next scenario the user will go when clicking on the button.
These are the main scripting tools for customizing user navigation in a chatbot. Also, we remind you that it is very important to respond to the user for any action in the bot. Therefore, do not forget to add scripts that will respond to the user's subscription in the bot, and in the situation when the user sent an arbitrary message.
If you have not figured out how to configure the scripts for your bot, you can always contact the Gerabot company for detailed advice, or help at creating a chatbot.