Skip to main content
A web widget can collect structured input from visitors at two points: a pre-conversation form that runs before the chat starts, and a post-conversation feedback form that runs after it ends. Both are defined in the widget’s config under config.v1 and edited from the widget’s Behavior settings. See Creating a widget to set up the widget itself.

Pre-conversation form

Set pre_conversation_form to show a form before the conversation begins. The visitor must submit it before the chat can start. When they submit, the field values are merged into the new conversation’s custom_metadata, so they show up on the conversation detail alongside everything else the agent captured. The value is a FormDefinition:

Show once per visitor

pre_conversation_show_once controls whether a returning visitor sees the form again. It defaults to true. When enabled, the submitted values are cached in the visitor’s browser localStorage under the key anyreach-widget-form-<widgetId>, along with a hash of the form’s fields:
  • On a later visit, if the cached hash still matches the current fields, the form is skipped and the cached values are reused automatically.
  • If you change the form’s fields, the hash no longer matches, so the form is shown again and pre-filled with the previous values.
The cache lives in the visitor’s browser, so it is per device and per browser, not per account. Clearing site data or switching browsers shows the form again.

Post-conversation feedback

Set post_conversation_feedback to collect feedback when a chat conversation ends. This runs for WebRTC chat conversations only.

Where feedback lands

When the visitor submits, the widget posts the values to a public endpoint:
The accepted values are written to the conversation’s custom_metadata.feedback_form, where you can read them from conversation detail. The data object is keyed by field id. Because this endpoint is public and unauthenticated, the server applies several guards:

Field types

Both forms use the same FormField shape. Set type to one of: Common field properties:
Choose display_mode: "buttons" for short option lists you want visible at a glance, and the default dropdown for longer lists.

Creating a widget

Set up the widget these forms attach to.

Conversation detail

See where submitted form and feedback values land.