# Users and collection of information

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

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2F6euu6IEH8feMUyDZg655%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-01%20%D0%B2%2019.16.37.png?alt=media\&token=33e0df56-be4b-4a82-bf2c-3a08ce181c67)

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:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FgOEvseNk3u9xWeWQtt9N%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-05-18%20%D0%B2%2018.23.12.png?alt=media\&token=fd018d2d-0811-4f25-a357-40bce1707bcd)

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:

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FvWv4eewNnowTnv2IJf5H%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2016.08.42.png?alt=media\&token=060cd45d-cb66-4d01-9a28-36b3177ca49c)

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

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FcjSy0fq5fSH96UxpUG6F%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-05-18%20%D0%B2%2018.30.38.png?alt=media\&token=f1a331e8-525a-4752-8743-bab920757cd6)

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.

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FSKkC1f9Je4t57pCtxSbt%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-06-10%20%D0%B2%2016.35.07.png?alt=media\&token=d8437faf-ab5f-44ec-9471-cbd0ffa2813b)

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":

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FKJtYBCYMY97m01GmRVtO%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-05-18%20%D0%B2%2020.15.09.png?alt=media\&token=65f62316-fb97-42ca-b533-18b880ba6c73)

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

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FGwbJcwSdSqEF9qijbiJX%2F%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7_1.png?alt=media\&token=b7d2829c-080f-4396-a465-8cb6cee04c33)

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

![](https://1932399487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRfd5lEYYH6D50QjzeAX%2Fuploads%2FFJ93g0NQWUE4WH0b0X4k%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202022-05-18%20%D0%B2%2020.20.03.png?alt=media\&token=bd818b31-a044-49b7-82a9-120d2d5af53f)
