# Users and collection of information

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

![](/files/LPVMoNRpUreo2KcLA0sG)

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

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.&#x20;

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.&#x20;

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:

![](/files/xpmhD3Azl2gFE2r3VC5V)

To pick up the user number, use the "Process message" block.&#x20;

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:

![](/files/yvmkZdnsmLNYvKfiUNWW)

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

![](/files/t4N9CvKDXIaw3X4FVJ97)

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.&#x20;

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.

![](/files/oZf1NucJvvKEBGqTV995)

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%".&#x20;

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

![](/files/uNg9CUgvjQJ0uAOU9YxH)

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

![](/files/MEtvnFxCIWiDhTTDeTwc)

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

![](/files/c3XaaVlX9Ajef9Y8nbGb)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smartbotpro.io/mini-course/users-and-collection-of-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
