Actions
Collect Data
Have the agent gather custom details in the conversation or with a form widget, and review every submission.
Overview
Collect data saves the details you define, such as a team size or budget. In Fields, choose how they are collected. With Conversation, the agent asks for what is missing in its own words and never invents a value. With Widget, the customer fills in a form widget you build in Build → Widgets. The action saves one entry once every required detail is in. Entries appear in Activity → Collected data.
Set up the action
- Open Build → Actions, choose Create action, then Collect data.
- In General, enter an Action name.
- Write When to use instructions that explain when the agent should collect this data, or turn on Only use in procedures to run it only as a procedure step.
- Continue to Fields.
Collect in the conversation
Choose Conversation under How should data be collected?. Each field has a Name, a Type (Text, Number, Email, Date or Boolean), a Description and a Required setting. The agent reads the description to know what to ask for, so describe the value and its format. Required fields are always asked for; optional ones are saved only when the customer shares them. An action can have up to 20 fields, and field names must be unique.
Collect with a widget
- In Build → Widgets, build a widget with a Form and named inputs: Input, Textarea, Select, Radio group, Checkbox or Date picker. Each input's name is a field name: a Collected data column and a key in customFields.
- In the widget's Functions, add a function of type Submit to action and set it as the form's submit function. Use its On success handler to show a thank-you state or to dismiss the widget.
- In the action's Fields, choose Widget, then Add widget and link it. The inputs the widget collects are listed with their type and whether they're required.
- Save the Fields step. The action keeps the widget as it was when you saved; after you edit the widget, save the action again to use the new version.
Destinations
| Destination | Behavior |
|---|---|
| Webhooks | Each submission is sent as a POST request with the body {eventType, chatbotId, payload}: eventType is <action name>_collect_data.submit and payload holds conversationId and customFields. Requests are signed with the webhook's secret. |
| Email notification | Sends your team an email with the collected values for each submission. |
Choose channels and enable
Select the channels where the action can run, save, then enable it from the editor header or with Save & enable.
Review collected data
- Open Activity → Collected data.
- Pick a date range; the last 30 days are shown by default.
- Each row shows the action, a View link to the conversation, one column per field and when it was submitted.
- Select rows to export them as CSV or PDF, or to delete them.
Test as a customer
- Start a conversation that matches When to use.
- With Conversation, answer only some of the questions and check the agent asks for the missing required details. With Widget, check the widget appears, then submit it with a required input left empty.
- Give the remaining details or submit valid values, and confirm the conversation continues. A submitted widget stays in the chat, read-only.
- Check the entry in Activity → Collected data and at your destinations.