# Connection with a data collection

### User enters data

When this toggle is enabled, an additional field called **"Input data"** appears. You need to enter the name of the variable that will store the user's response.

<div data-with-frame="true"><figure><img src="/files/zqF8ZhREZZJPjeARBEPK" alt=""><figcaption></figcaption></figure></div>

The variable name must be one word and is case-sensitive.

In the example, the user's response will be saved to the variable **"age":**

<div data-with-frame="true"><figure><img src="/files/ZfsiAFa8QfakkauTGDYq" alt=""><figcaption></figcaption></figure></div>

{% hint style="danger" %}
**Please note!**

A data collection arrow works **WITHOUT any delay** in its settings. This means the bot will wait until the user answers the question.

To prevent users from staying too long in a block before responding, carefully plan your funnel logic and add a follow-up message  if you need to remind them.
{% endhint %}

<div data-with-frame="true"><figure><img src="/files/kaTVSCKUkuYUrYMgW5Iv" alt=""><figcaption></figcaption></figure></div>

### Example

Data collection connections from users are connections without a condition, but they **“remember”** the client’s responses in a variable specified in the settings. These connections are marked with a diamond shape at the end.

How it works: the bot asks the client **"Please provide your phone number"**, the client enters the number, then the transition through the arrow to the next block occurs, and the bot saves the client’s response into the variable.

This type of connection can be used to collect any data from clients (name, city, district, metro station, etc.).

<figure><img src="/files/tGpef4ttMGjQV7dbHpl1" alt=""><figcaption></figcaption></figure>

The data collection is controlled by the toggle **"User enters data"**, and in the **"Input data"** field, we enter the name of the variable where the bot will save the data entered by the client. In our case, this is **"name"**.

<div data-with-frame="true"><figure><img src="/files/LL280PEJdjRUzrL2QYSK" alt=""><figcaption></figcaption></figure></div>

Click **Save.** Then the settings for collecting client data will be applied.

{% hint style="danger" %}
**Please note!**

A data collection connection works **WITHOUT any delay** set in its settings. This means the bot will wait until the user responds to the question.

To prevent users from staying too long in the block before answering, plan your funnel logic carefully and add a follow-up message if you need to remind the user.
{% endhint %}

<div data-with-frame="true"><figure><img src="/files/Xr0WEvsxZ2gjpK4ZYJCO" alt="" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/TPaWAOuWhp9SvN9lC3KY" alt="" width="563"><figcaption></figcaption></figure></div>

Finally, it should be mentioned that connectors can take any shape of a broken (polyline) line. To do this, hover your mouse over the connector, hold down the button, and drag it sideways. This way, you can create a neat and simple visual layout for your project and never get confused in the flow.


---

# 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.mavibot.ai/chatbot/builder/connections/data.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.
