> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phonely.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect

> Ask for a defined set of information and use the caller's answers in later blocks.

Choose **Collect** when the agent needs a defined set of information, such as a caller's name, contact details, or appointment preferences. It asks for the information one item at a time and stores the answers as variables for later blocks.

Each **Question** guides what the agent should ask, but it is not a fixed script. The agent can phrase or rephrase the question naturally. Choose [Talk](https://docs.phonely.ai/blocks/flow-blocks/talk.md) when the task needs a more open-ended conversation or different routes based on its outcome.

## Start the block

Configure the questions directly, or expand the **Generate with AI** strip at the top of the panel, describe what you want, and start a focused Ask AI task for this block alone. For example:

> Gather the caller's name, email address, phone number, and reason for calling.

In **Review** mode, inspect the proposal on the canvas and apply it. In **Auto apply** mode, the requested edit is written directly to the draft. Check the result and test the affected path before publishing; see [Choose how flow changes are applied](https://docs.phonely.ai/key-concepts/ask-ai.md#choose-how-flow-changes-are-applied). The instruction is not saved onto the block, so the box starts empty each time and the request lives in the Ask AI conversation. Generation is offered only on an editable draft, not in version previews, comparisons, or to viewers.

Type `@` in the instruction to add a workflow variable. The selected variable appears as a chip and passes to Ask AI as a variable reference rather than plain text.

## Configure the questions

Add one question for each value the block should collect. Collect requires at least one question, and every variable name must be unique within the block.

| Field | Purpose |
| :- | :- |
| **Variable Name** | Name shown in **Available Variables**; must be unique within the block |
| **Type** | Expected format of the answer |
| **Question** | Question to ask; the agent may phrase it naturally during the call |
| **Required** | Collect the answer before leaving the block |
| **Confirm** | Ask the caller to confirm a required answer |
| **Spell Back** | Spell a confirmed answer character by character |

**Confirm** is available after **Required** is enabled, and **Spell Back** is available after **Confirm** is enabled.

Choose the type that matches the expected answer. See [Variables](https://docs.phonely.ai/flow-editor/variables.md) for available types, formats, and downstream availability.

> [!NOTE]
>
> **Zipcode** and **Phone** expect the format of the agent's country, which Phonely derives from the timezone in **Settings**. A US timezone collects a 5-digit ZIP code, while an Australian timezone collects a 4-digit postcode. See [Timezone sets the expected country format](https://docs.phonely.ai/flow-editor/variables.md#timezone-sets-the-expected-country-format).

### Completion and routing

Collect asks for missing information in a conversational style. It can move to the next block after all required answers have been collected and any enabled confirmations are complete.

Enable **Required** for every answer the flow depends on. A question without **Required** does not prevent Collect from continuing.

Collect has one live-call continuation and does not branch by answer. To route using a collected value, connect Collect to a [Filter](https://docs.phonely.ai/blocks/flow-control-and-routing/filter.md) and create the cases there.

## Example: Collect caller details

| Variable | Type | Question |
| :- | :- | :- |
| `caller_name` | Name | What is your name? |
| `caller_email` | Email | What email address should we use? |
| `reason_for_calling` | Text | What can we help you with today? |

Enable **Required** for each answer the flow cannot continue without. For information that is easy to mishear, enable **Confirm** and, when useful, **Spell Back**.

Later blocks on the continuation route can use these answers as variables.

## Test Collect

Try complete, unclear, corrected, and missing answers. Confirm that Collect:

* requests missing information naturally, one question at a time;
* does not continue until every required answer is collected and any configured confirmation is complete;
* updates a stored value when the caller corrects it;
* spells back answers when configured; and
* makes the collected values available to later blocks.

Use **Web Call** to hear questions, confirmations, and spelled-back answers.

For an unexpected result, open **Call Details**, select **Blocks**, and expand Collect to review its conversation turns and stored variables.

## Troubleshooting

> [accordion] The agent leaves without an answer
>
> Enable **Required** for every answer the flow must collect before continuing. Leave it off only when later blocks can run without that value.

> [accordion] The block does not finish
>
> Check which required answer is still missing or waiting for confirmation. Make the corresponding **Question** clearer and confirm that its **Type** matches the expected response.

> [accordion] The agent does not use the exact question wording
>
> Collect asks questions conversationally and may rephrase them. Write the **Question** as a clear request for one value rather than relying on exact wording.

> [accordion] The agent asks for the wrong postcode format
>
> Check the agent's timezone in **Settings**. Phonely uses it to decide which country's format to ask for and validate against, so a timezone set to the wrong country makes the agent request a postcode your callers do not have. For a format the country defaults do not cover, set the question's **Type** to **Regex** or **Custom**.

> [accordion] A collected value is empty later
>
> Open **Call Details** and confirm that Collect stored the value. If later blocks always need it, enable **Required**. Otherwise, make sure those blocks can run without it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.