SmartbotPro
  • Smartbot Pro – messenger marketing tool
  • Most important
  • Mini-course
    • Registration and personal account
    • Initial scripting tools
    • Creating the first script
    • Users and collection of information
    • Applications, variables and managers
    • Data validation
    • Collection of applications for a webinar within Telegram
    • Testing unpublished scripts
    • Newsletters
    • Template "Test with a set of points"
    • Statistics
    • Interface hacks
  • Beginning of work
    • Registration in the service
    • More about scripts
    • How to add messenger
      • Adding Telegram
        • Adding a bot to a group chat in Telegram
      • Adding ВК
      • Adding Viber
      • Connecting a channel to a script
      • Linking a social network account
  • Scripts
    • Basics
      • Create a script
      • Script templates
      • Editor interface
      • Publishing a script
      • Script testing
      • How the script is chosen
    • Script events
      • Message from user
      • No appropriate script
      • First message
      • VK Events
      • Webhook
    • Actions
      • Send a message
        • Buttons
      • Process message
      • Extract data
      • Change context
      • Write to statistics
      • Send Notification
      • Switching to another script
      • Working with the user
      • Set variable
      • Scheduled transitions
      • Run SmartQuery
    • Conditions
      • Condition
      • Condition with options
      • Conditions of VKontakte
    • Variables
      • Special Variables
      • User variables
      • Global variables
      • Variable %ref%
    • Acceptance of payment
    • Telegram bot menu
    • Integrations
      • Google-таблицы
      • http request
      • amoCRM
      • Get Course
      • Yukassa for receiving payments
    • Reactions
  • Newsletters
  • Settings
    • Projects
    • Cabinets
  • Information sections
    • Statistics
    • Users
  • SmartQuery
    • Introduction
    • Language syntax
    • Function Reference
  • The documents
    • Privacy Policy
    • Terms of service
    • Subscription and rates
Powered by GitBook
On this page
  • General settings
  • Global entry
  • Chain priority
  1. Scripts
  2. Script events

Message from user

In this section, we will cover the input event in detail.

PreviousScript eventsNextNo appropriate script

Last updated 2 years ago

The "user input" event is responsible for the message from the subscriber. When a message is received on the , this event fires.

To add an event to a script, select it in the left menu of the script

On the right you will see the event block settings. Let's take them in order:

General settings

The name of the event allows you to set any name of the block that is convenient for searching. This field does not affect the execution logic in any way.

The next block indicates the block that the bot will execute immediately after the event occurs, that is, immediately after receiving a message from the user.

In the IF conditions section, you can specify different conditions for checking a message or user data, or even use complex conditions in the internal SmartQuery language. A separate article is available about conditions and different types of comparison.

Global entry

The "global input" checkbox means that this event will always be checked when the bot cannot process user input while already in the current scenario.

For example, the bot is already running in your scenario and performing actions. But then the user writes something that is not intended by your script (for example, you expect the user to answer, and he enters an option that is not provided by the condition.

In this case, instead of completing the scenario, the bot will go through the conditions of those events within the current scenario, in which the "global entry" checkbox is checked.

Chain priority

Sometimes it can happen that several event conditions fire at once. For example, you can make 2 events with exactly the same conditions, or use the "similar to" fuzzy comparison mode. In this case, by default, the bot uses a random chain.

But you can influence this behavior by specifying the chain priority.

The higher the priority, the earlier the block condition will be checked. Therefore, if there are several conditions triggered at the same time, the bot will choose the one with the higher priority.

This way you can control the highest priority chains of dialogs or, conversely, make "backup" lower priority chains that will work if the priority ones did not work.

channel connected to the script
editor interface