More about scripts
В этом разделе мы рассмотрим, что такое сценарии
Brief video instruction for this section:
After you have registered with the service, you will have access to a test script - onboarding.
Script is a sequence of steps that the bot performs in response to events, such as an incoming message in a messenger, joining a group on a social network, or paying for an item in your online store.
Go to script. You will see a graph of the bot's dialogue with the subscriber:
Script has events and actions
An event is an external influence that the bot can respond to. For example, the receipt of a message from a subscriber. An action is a step that the bot performs in response to an event.
An event is an external influence that the bot can respond to. For example, the receipt of a message from a subscriber
An action is a step that the bot performs in response to an event
Look at the generated script. It has several events (they are highlighted in blue) and arrows leading from them to actions:
In the example above, you can see 2 events "message is similar to hello" and "message is equal to acquaintance". This means that the user can get into this scenario if they write the message "hello" or "acquaintance". Moreover, depending on the message, it will fall into different chains.
A chain is an event and the actions that follow it within a script.
Smartbot works on a simple principle:
If at the moment the user is not in any of the chains, then at the time of the event (for example, a message from the user has arrived), smartbot will look for a suitable scenario and launch the desired chain.