Custom fields in visitor forms
Add labelled questions to visitor forms and validate required answers before the visitor continues.
What it is
Custom fields add questions to visitor forms. Each field has a label, a control type and an answer name. You can require an answer or offer choices instead of free text.
Who uses it and why
People with the Settings role collect information needed before chat or follow-up. Developers maintain answer mappings and custom form integrations. Visitors complete the questions and correct any highlighted errors.
Where to find it
With the Settings role, use Custom Fields in Settings › Chat › Pre-Chat Survey, or edit a theme's Offline Pane under Settings › Chat › Themes.
Task fields are maintained separately in Settings › Bots › Virtual Assistant › Steps, with the Bot Trainer role.
How it works
Pre-chat custom fields support textbox, textarea, select, radio and checkbox. Offline custom fields also offer phonenumber and email. These are the field-type names shown in the editors.
Visitors enter text, choose an option or select checkboxes. A required choice group must have an answer; it does not require every checkbox to be selected. Missing required answers and invalid built-in email or phone answers stop submission and produce feedback.
Task fields have their own controls and validation. Depending on the task field, these can include text, email, web addresses, numbers, currency, phone, choices or files. A multiline task answer can use different Enter behaviour from ordinary chat.
Configure it
Select Field under Custom Fields to add a question. Enter Label for pre-chat or Field Label for offline forms, choose Field Type, then enter Field Name. Use a name without spaces. Salesforce-enabled pre-chat forms can label the mapping SF Field Name.
Select Required if an answer is necessary. For a choice field, use Option, then complete Name and Value for each choice. Use Mark as default to preselect a choice, and drag choices to reorder them. Add translated labels and option text where needed.
Save the containing survey or theme. Check both unanswered required fields and invalid answers in the visitor form. Task validation is configured on the task's own field definition.
Fields
| Field | Where | Required | What it is for |
|---|---|---|---|
| Label | Settings › Chat › Pre-Chat Survey | Yes | Set the visitor-facing custom question, with language variants where configured. |
| Field Label | Settings › Chat › Themes | Yes | Set the visitor-facing label of an offline custom field. |
| Field Type | Settings › Chat › Pre-Chat Survey | Yes | Choose textbox, textarea, select, radio or checkbox for a pre-chat custom field. |
| Field Type | Settings › Chat › Themes | Yes | Choose an offline custom field's control, including text, choices, phone or email. |
| Field Name | Settings › Chat › Pre-Chat Survey | Yes | Identify the answer for storage or mapping; the label can be SF Field Name for a Salesforce-enabled form. |
| Field Name | Settings › Chat › Themes | Yes | Identify the answer supplied by an offline custom field. |
| Required | Settings › Chat › Pre-Chat Survey | No | Require the visitor to answer this custom question. |
| Required | Settings › Chat › Themes | No | Require the visitor to answer this offline custom question. |
| Name | Settings › Chat › Pre-Chat Survey | Yes | Supply the visitor-facing text for each choice, with language variants. |
| Value | Settings › Chat › Pre-Chat Survey | Yes | Supply the answer value associated with each choice. |
| Name | Settings › Chat › Themes | Yes | Supply the visitor-facing text for an offline choice. |
| Value | Settings › Chat › Themes | Yes | Supply the answer value associated with an offline choice. |
| Mark as default | Settings › Chat › Pre-Chat Survey | No | Preselect a choice when the visitor opens the form. |
Permissions
| Permission | Lets you |
|---|---|
| Settings | Edit pre-chat and offline custom fields. |
| Bot Trainer | Maintain task steps and their answer fields where the Virtual Assistant is enabled. |
Limits and good to know
- Custom field labels and answer names cannot be blank when saving the supported form editor. Each configured choice also needs a name and value.
- Form types and validation are not identical across pre-chat, offline and task forms.
- Choosing a text field does not automatically give it email, number or phone validation.
- The built-in phone control checks numbers using the selected country. A plausible-looking number can still be invalid for that country.
- Additional fields do not automatically create CRM records. That requires the corresponding integration and creation or mapping setup.
Depends on and works with
View all connections as a list
This feature uses
- Virtual Assistant task setupConfigured by
Task-step authoring defines workflow forms.
- Virtual Assistant task data fieldsConfigured by
Workflow fields define their own types, validation and masking options.
- Visitor chat paneRequires
The visitor chat pane displays pre-chat, offline and task form controls.
- Visitor chat themes and brandingConfigured by
Themes supply form colours, including validation borders.
- Pre-chat survey for visitorsConfigured by
Pre-chat surveys define their custom questions and requiredness.
- Offline help for visitorsConfigured by
Offline Pane defines its own fields and choices.
- Visitor chat languages and text directionEnhances
Custom labels and choice text can have translations.
Used by
- Messages and rich contentEnhances
Forms collect structured replies inside the conversation.
- Mobile chatEnhances
Form inputs and scrolling adapt to the available space.
- Pre-chat survey for visitorsEnhances
Custom fields add structured questions and validation.
- Offline help for visitorsEnhances
Custom questions add typed fields and required choices to offline forms.
- Chat tasks and topics for visitorsEnhances
Guided tasks use visitor form controls and validation.
- Virtual Assistant task data fieldsEnhances
Visitor forms display the typed inputs and validation feedback.
- Virtual Assistant task validation and retriesEnhances
Visitor forms display field-specific validation and help.
FAQ and troubleshooting
Why will the custom field not save?
Complete its label and field name. For a choice field, also complete every option's Name and Value.
Why can visitors enter an invalid email in my text field?
A general text field is not an email field. Use an email control where the form supports it, or the built-in email question in pre-chat.
Why does a phone number fail validation?
Check the selected country and number format. Changing the country changes the rules used to check the number.
Why can I not choose the same field type in every form?
Pre-chat, offline and task forms offer different controls. Use the types available in the editor for the form you are maintaining.