# 🗃️ Capture Block

In any conversational flow, it's often essential to **ask users for specific information**—whether you're collecting contact details, confirming a date, or running a quick survey. The Capture Block lets you **gather user responses in a structured and efficient way** by **saving answers into variables that can be reused throughout your workflow**.

<figure><img src="https://4264750556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4dIFGOeVbHW1PRwnG0Z8%2Fuploads%2F4B7w5L9cDalOGDr1RQPV%2FScreenshot%202025-04-01%20alle%2015.44.16.png?alt=media&#x26;token=2ce3de63-7bbe-4f42-ad26-525bed350c7d" alt=""><figcaption></figcaption></figure>

## **How Does it Work**

The Capture Block guides the user through providing specific inputs and ensures data is saved in the correct format. Here's what you can configure:

#### 1. **Ask a Question**

Customize the prompt to clearly request the information you need.

#### 2. **Store the Response**

Assign a [variable](https://guide.indigo.ai/getting-started/workspace/variables) where the user's response will be saved. Once selected, the block automatically recognizes the variable’s data type.

#### 3. **Choose the Expected Data Type**

Supported types include:

* **Text**: For names, free-form answers, or general input.
* **Number**: Ideal for capturing ages, quantities, or other numeric values.
* **Boolean**: For yes/no questions or binary responses.
* **Date/Time**: Perfect for appointments, deadlines, or availability.

#### 4. **Mandatory or Optional Input**

* **Mandatory**: The user must provide a valid input to proceed. No alternative buttons will be shown.
* **Optional**: A **“Cancel” button** will appear, allowing the user to skip the question. You can configure this button to redirect to any agent or workflow (default is the Welcome Workflow).

#### 5. **Validation**

If the user’s input doesn’t match the expected format, the assistant will automatically ask them to try again. Once a valid value is received, the workflow continues.

{% hint style="danger" %}
The Capture Block is **blocking** by nature—this means **the conversation cannot proceed until the user provides a valid input or chooses to skip (if the question is optional)**.
{% endhint %}

## Common Use Cases

The Capture Block is highly versatile. Here are some typical scenarios:

* **User Registration**: Collect personal details like name, email, or phone number.
* **Bookings & Appointments**: Capture date and time selections for scheduling.
* **Surveys & Feedback**: Ask users for structured opinions or preferences.
