Configuring inline chatbot surveys - supporting resources

This supplemental guide provides details on the Data Actions, Slot Types, and optional Data Tables used in the example Inline Chatbot Survey integration for Genesys Cloud.

Note:

Data Tables

Sometimes, you may want to provide customers with textual response options, but the Mindful Feedback API always expects numeric responses. To solve this, you can use Data Tables in Genesys to map textual responses to numbers that we can post to the Feedback API to update interactions.

Both of the following tables are examples and should be updated to suit your specific survey questions.

Satisfaction/CSAT

If you were to ask a CSAT question with text-based response options ("Satisfied", "Neutral", etc.) to customers, you would need a way to map those responses to numbers, like so:

example data table

Multiple Choice

A multiple-choice question would have the same requirement:

example data table

Data Actions

In the example Digital Bot Flow, we will use Genesys Data Actions to communicate with the Feedback API at various points during the survey interaction. Specifically, we will use:

Note: For both Data Actions, the items in the Output Contract should be nested exactly as shown in the example below.
example output contract

Add New Interaction

This Data Action will send a request to the Add New Interaction API endpoint. The endpoint creates a survey interaction with the specified parameters. Configure the Data Action according to the guidelines below:

example data action configuration

Input Contract

  • survey_id
  • survey_type
  • email
  • scheduled_at
  • Customer_UUID

Output Contract

  • survey_id
  • phone_number
  • survey_type
  • scheduled_at
  • external_ref
  • call_type
  • agent_id
  • email
  • respondent_language
  • uuid
  • updated_at
  • created_at
  • id
  • status
  • weblink

Configuration Tab

  • Request URL Template: Enter the Add New Interaction endpoint (example: https://{region}.surveydynamix.com/api/interactions)
  • Headers: Content-Type = application/json
  • Request Body Template: Enter ${input.rawRequest}

Start Survey

With a new interaction created, we now need to set the status of the interaction to "started" via the Start Survey endpoint. Configure a second Data Action for this, according to the guidelines below:

example data action configuration

Input Contract

  • id

Output Contract

  • output
    • current_question
      • question_prompt
        • text
          • default

Configuration

  • Request URL Template: Enter the Start Survey endpoint with a variable placeholder for the ID (example: https://{region}.surveydynamix.com/api/interactions/${input.id}/start_survey)
  • Headers: Content-Type = application/json
  • Request Body Template: Enter ${input.rawRequest}

Post Answer

The third Data Action invokes the Update Interaction endpoint. We will use this endpoint to update a specified interaction with new properties supplied in a JSON object (in our case, customer responses). Configure the Data Action according to the guidelines below:

example data action configuration

Input Contract

  • id
  • response

Output Contract

  • output
    • current_question
      • question_prompt
        • text
          • default

Configuration

  • Request URL Template: Enter the Update Interaction endpoint with a variable placeholder for the ID (example: https://{region}.surveydynamix.com/api/interactions/{interaction_id})
  • Headers: Content-Type = application/json
  • Request Body Template: Enter ${input.rawRequest}

Slot Types

In order to accept responses from customers during the chat survey, we need to configure Slot Types for each type of question we will ask (Architect > Slots > Add Slot > New List or New Regex). Following are the slot types we will use for our example questions, and you can use this approach to create additional types, as needed.

Multiple Choice

For this type, add a list containing the multiple-choice options you wish to present. The following example contains answers to the question "where did you hear about us?".

example slot configuration

Open Feedback

Rather than a list, the open-feedback slot needs to be configured with a regex value to specify the range of input you will accept. For our example, we use the following three regex values to allow any input from customers:

  • .*
  • ^[a-zA-Z0-9_](5,40)$
  • ^[a-zA-Z0-9_](5,40)$.*

example slot configuration

Satisfaction

The Satisfaction slot type will function the same as the multiple-choice type. However, this list will contain entries on a scale from Very Unsatisfied to Very Satisfied.

example slot configuration

Yes/No

The Yes/No type will follow the same structure as multiple-choice, as well.

example slot configuration