Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So, remove the text response and click on the button “Add Responses” and select the option “Custom Paylod” to define the object structure.

Image RemovedImage RemovedImage AddedImage Added

The object must have all the following parameters (all required):

...

Property

Type

Description

response_to_bot

Status
titlestring

Query sent back to the bot after the form is submitted by the customer

title

Status
titlestring

title of the form to be displayed

type

Status
titlestring

must be equal to “form”

formData

Status
titlearray

array of objects representing the inputs of the form. See table below for details

formData

...

Object

Property

Type

Description

customMandatoryErrorMessage

Status
titlestring

label to be displayed in case a mandatory input is not submitted by the customer

isVisibleAgent

Status
titleboolean

indicates if the content is intended or not to be shown to agent for privacy reason

mode

Status
titlestring

it describes how to use the value field. “manual” the value is used as default value, “auto” it's evaluated as a JS function

name

Status
titlestring

key name of the input field (must be unique)

isEditable

Status
titleboolean

False if user is not allowed to change default value, true otherwise

isMandatory

Status
titleboolean

true if the field is required, false otherwise

dc_type

Status
titlestring

Type of field.

Supported values are:

  • text

  • email

value

Status
titlestring

if mode is manual it has to be set with an empty string (then it will contain the customer response), if auto it's evaluted as a JS function returning a value

custom_regexp

Status
titlestring

Regular expression for validating input

isVisibleCustomer

Status
titleboolean

indicates if the field is intended or not to be shown to the customer. (eg: a field with mode “auto” could be hidden)

label

Status
titlestring

field label to be displayed

customValidationErrorMessage

Status
titlestring

label to be displayed in case an input is not valid according to the custom_regexp configured

Example

Example of custom payload:

...