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. Mini-course

Users and collection of information

PreviousCreating the first scriptNextApplications, variables and managers

Last updated 2 years ago

As soon as the user writes to the bot, he automatically goes to the "Users" section:

This gives you an added edge if you're marketing or launching your own products.

The classic scheme for launching a product is as follows: you make a landing page, describe the product, insert an application form. What is the problem: when a user comes to this landing, he is impersonal. He can leave at any moment: when he looks at a photo, reads about you, fills out an order form.

Although this is usually tracked through systems like Google Analytics and Yandex.Metrica, the bot has a plus. Once a user has contacted a bot, you automatically get all of their contacts, which opens up new possibilities.

Let's go back to our script and expand it a bit by gathering more information from the user. We already know the last name, first name or nickname from Telegram, so let's ask the phone:

To pick up the user number, use the "Process message" block.

Note that you can also right-click anywhere in the script and create the desired block. This is the same as the menu on the left:

When the user writes something, the bot will process his response and save the data to the specified variable:

A variable is a key by which either some value is written for each user, or a common, global value for all users at once. For example, a global counter of customers who have submitted an application.

Now we need a phone. Therefore, I will create a variable with the same name and type "User" - it will be tied to a specific user. If we needed a common variable for all users at once, we would choose the "Global" type.

Now the bot will store the phone number. Let's add one more block to the script - so that the bot answers: "Thank you, we will call you back at %Phone%".

Script testing can be started from a specific step. To do this, hover over the blue button next to it and click "run":

We check the script, we see that everything works. The bot saved the variable and now we can use it:

Now in the "Users" section, you can add a new variable and see its value next to the user: