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
  1. Scripts
  2. Basics

How the script is chosen

In this article, we will tell you how Smartbot chooses a script to run

PreviousScript testingNextScript events

Last updated 2 years ago

Before reading, we recommend that you read the

When an event occurs, to which you set a reaction in one of the scenarios, the bot starts checking the scenarios to find the best one.

For example, you have created several scripts and in each of them you have set a "user input" event with the expectation of a particular message.

When the subscriber writes one of these messages to the bot, or another script trigger condition is triggered, the bot will start executing the corresponding chain.

Note that within a script, you can specify multiple chains at once. To do this, it is enough to create several start events inside the script:

The screenshot shows 3 events, from which there are different chains. But all these events are combined into one scenario. In fact, a script is a set of events and bot logic united by one subject area. For example, you can make a "delivery questions" script and add several chains there that will answer the questions "what cities do you deliver to", "how long does it take for delivery", "how much does delivery cost", and so on.

article about scripts.