Documentation

Flow Inputs

Flow Inputs

The widget executes the flow with the following inputs:

  • prechatFormValues - if the chat is configured with a prechat form this object will contain all of the values submitted:

  • widgetId - the id of the widget which executed the flow.

  • widgetVersion - the version of the widget which executed the flow.

{ "name": "James", "orderNumber": "abc123"}
  • pageProperties - the widget will send data about the page in which the widget is executing:
{
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.3",
  "url": "https://some-website.com/orders",
  "title": "Webpage title",
  "screenResolution": { "width": 1920, "height": 1055 },
  "isMobile": true
}
  • metadata - the widget will pass any object as defined by the metatdata config:
{
  "lang": "en",
  "someCustomThing": "some custom value"
}

Flow messages

Use the Chat Activity activity type to configure Flow to send messages to the chat widget.

The Chat Widget supports Markdown out of the box, meaning any text that is sent to flow can be sent as Markdown and will be handled automatically with no additional setup.

Some Markdown elements, like lists and headings, require the syntax to be broken on to new lines. To achieve this in a flow message it is necessary to add newline characters to the message to create the line breaks: