Closer
Search…
Forms configuration

Form model

Form DTO fields:

  • id - [string] uuid of form
  • orgId - [string] uuid of organization
  • locale - [string] locale which the form was created for
  • availableForAgents - [boolean] determines whether agents can access and send the form
  • name - [string] name of the form
  • config - [object] configuration of the form's inputs (see input types below)
  • expireInterval - (optional)[number] - millliseconds after which the form can no longer be submitted
  • sendInterval - (optional)[number] - milliseconds after which the form can be sent again
  • blockIfPreviousUnsubmitted - (optional)[boolean] - determines whether the form can be sent if previous has not been submitted yet
  • routeOnSubmit - (optional)[boolean] - determines whether submitting the form should result in opening and assignment of the conversation

Inputs form

Use this form to collect information

Config (inputs) fields:

  • radioButtonsInputs - array of objects representing radio buttons input
  • multipleButtonsInputs - array of objects representing multiple buttons input
  • radioListInputs - array of objects representing radio list input
  • checkboxListInputs - array of objects representing checkbox list input
  • textInputs - array of objects representing text input

Buttons (multiple choice)

multipleButtonsInputs
Mulitple buttons input
Click here to see the code

Buttons (single choice)

radioButtonsInputs
Radio buttons input
Click here to see the code

Radio input with list of options (single choice)

radioListInputs
Radio list input
Click here to see the code

Input with list of options (multiple choice)

checkboxListInputs
Checkbox list input
Click here to see the code

Text input

textInputs
Text input
Click here to see the code

Full example

Inputs order in the form is determined by `index` property of representing object
Click here to see form with inputs represented above

Auto assign form

Use this form to route clients' conversations based on their choice
Auto assign form
Click here to see form configuration

API

Create

POST - /api/message-widgets/{locale}
  • Creates new form
  • Requires apiKey header of an adviser with settings_action_forms permission
  • Requires body with following fields:
    • required: name, availableForAgents, config (described above)
    • optional: expireInterval, sendInterval, blockIfPreviousUnsubmitted
Click here to see an example

Update

PUT - /api/message-widgets/{uuid}
  • Updates existing form
  • Requires apiKey header of an adviser with settings_action_forms permission
  • Requires body with same schema as POST request
Click here to see an example

Read

GET - /api/message-widgets/{locale}
  • Gets all created forms' DTOs
  • Requires apiKey of organization's adviser
Click here to see an example
GET - /api/message-widgets/{orgId}/{messageWidgetId}
  • Gets single form DTO
  • Does not require authentication
Click here to see an example