> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/modules/ai-agents/workflows-and-actions/ask-survey.md).

# Ask survey

`Action` — Each question and answer sent as a message uses one [interaction](/docs/getting-started/interactions.md).

## What it does

Runs a survey sequence, sending preset questions to the chat and collecting the person's answers. Questions and replies appear as regular messages. The person can reply "skip" to move to the next question if skipping is enabled.

## When to use it

To gather structured information — contact details, a satisfaction rating, or qualifying questions — and store each answer in a variable for later actions to use.

## Settings

Add an **Ask survey** action, then press **Add field** to create a question. Configure each field:

| Setting                  | Description                                                                                                                                                                                                                                                                                                                     |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Question**             | The message sent by the AI agent asking for the person's input.                                                                                                                                                                                                                                                                 |
| **Answer must be**       | The required format of the person's answer: Text, Number, Attachment, Attachment(s), Email, or Phone. Answers not matching the format trigger the invalid answer reply. On [Facebook Messenger](/docs/modules/ai-agents/publishing/facebook-messenger.md), Email and Phone also add a native auto-fill quick reply — see below. |
| **Invalid answer reply** | The AI agent's response when an answer fails validation. Use it to clarify the expected format.                                                                                                                                                                                                                                 |
| **Chat variable name**   | Creates a [chat variable](/docs/developers/chat-variables.md) that stores the person's answer for use by downstream actions.                                                                                                                                                                                                    |
| **Quick answers**        | Up to 13 clickable buttons below the question. Not supported on Bitrix24 or Africa's Talking channels. Optional.                                                                                                                                                                                                                |
| **Enable skip**          | Lets the person reply "skip" to bypass the question and move to the next one.                                                                                                                                                                                                                                                   |

Press **Save** to confirm edits. To delete a field, select the delete icon in its header.

## Facebook Messenger auto-fill button

On Facebook Messenger only, setting **Answer must be** to **Email** or **Phone** adds an extra quick-reply button to the question. It lets the person share the email address or phone number registered on their Facebook account with a single tap, instead of typing it. This button is added automatically alongside any manually configured **Quick answers** buttons on the same question.

Facebook doesn't always allow this button to be shown — for example, when the person's Facebook profile has no shareable email or phone number, or Facebook has disabled the feature for the account's region. When Facebook rejects the button, the AI agent automatically resends the question as plain text, without the auto-fill button, so the person still receives the question and can type their answer manually. Any manually configured Quick answers buttons on the question are kept on the retry. Neither the person nor a live agent sees any indication that a retry happened.

This auto-fill button isn't available on other channels, or on [Collect feedback](/docs/modules/ai-agents/workflows-and-actions/collect-feedback.md) survey fields — on those, people always type Email and Phone answers manually.

## Example

```
Ask survey
├─ Field 1: "Which institution is this about?"  → text  → {financial_institution}
└─ Field 2: "When did this happen?"             → text  → {date}
```

Stored variables can be referenced by later actions such as Create ticket.

## Localisation

Questions and replies are localised per language. Use the language dropdown to enter content for each configured language. See [Workflows and actions — Localisation](/docs/modules/ai-agents/workflows-and-actions.md#localisation).

## Related

{% content-ref url="/pages/9GxlB7rfmOxR8xrCQM3U" %}
[Send message](/docs/modules/ai-agents/workflows-and-actions/send-message.md)
{% endcontent-ref %}

{% content-ref url="/pages/rTdnuIG08MgrRXkV3Alv" %}
[Set variable](/docs/modules/ai-agents/workflows-and-actions/set-variable.md)
{% endcontent-ref %}

{% content-ref url="/pages/VeqvBsilLVuwwIkFIyUd" %}
[Create ticket](/docs/modules/ai-agents/workflows-and-actions/create-ticket.md)
{% endcontent-ref %}
