Please ensure Javascript is enabled for purposes of website accessibility
Configuring Inline Chatbot Surveys - Digital Bot Flow
  • 26 Apr 2024
  • 6 Minutes to read
  • Dark
    Light
  • PDF

Configuring Inline Chatbot Surveys - Digital Bot Flow

  • Dark
    Light
  • PDF

Article Summary

When interacting with customers via chat in Genesys Cloud, it is possible to deliver a Mindful Feedback survey directly in the chat window. Using Data Actions, a Digital Bot Flow can interact with the Feedback API to initiate a new survey, obtain survey questions, interact with customers, and post responses back to Feedback automatically. This can create a more streamlined and comfortable survey experience for customers already chatting with an agent, compared to the alternative of sending the customer a link which opens a survey in a new browser tab.

example inline chatbot survey

Overview

This guide covers the core concepts of setting up an inline survey flow for a Genesys chatbot:

  • Activating inline surveys
  • Supporting resources (Data Tables, Slot Types, Data Actions)
  • Digital Bot Flow including example question types:
    • Customer Satisfaction (CSAT) - 1 to 5 scale
    • First-Call Resolution (FCR) - Yes/No
    • Open feedback

Activating Inline Surveys

At a high level, the integration works as described below:

  • A Digital Bot Flow manages interactions with customers and sends customer responses to the Feedback API.
  • An In-Queue Message Flow is created to invoke the Digital Bot Flow.
  • A designated Inline Survey Queue is created as a destination for customer transfers. 
    • In the Message tab, this Inline Survey Queue has the In-Queue Message Flow configured as the In-queue Flow.
  • At the end of a chat conversation, a Genesys agent can transfer a customer to the designated queue, which will invoke the message flow, which will then invoke the bot.
  • The customer will remain in the same chat window to interact with the bot until the survey is complete.

Throughout the remainder of this guide, we will cover every component of the integration other than the Inline Survey Queue and In-Queue Message Flow.


Supporting Resources

There are several resources that the Digital Bot Flow will utilize along the way, so it is important to configure these components first.

IMPORTANT
For complete instructions on configuring the necessary supporting resources, see Configuring Inline Chatbot Surveys - Supporting Resources. You can also download importable sample files for each of these resources for quick setup in Genesys (including the Digital Bot Flow).

Data Actions

We will use Genesys Data Actions to communicate with the Feedback API at various points during the survey interaction. Specifically, we will use:

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. We will use the following Slot Types in our example:

  • Multiple Choice
  • Open Feedback
  • Satisfaction
  • Yes/No

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. We have examples available for:

  • Satisfaction/CSAT
  • Multiple Choice

Digital Bot Flow

We need a new Digital Bot Flow (Architect > Flows > Add > Digital Bot Flow) to interact with customers and the Feedback API. This example flow demonstrates how different question types might be asked. You can update or expand on this approach to fit your specific surveys. Following is a list of all blocks used in the example Flow.

IMPORTANT
Questions must be configured/asked in the same order as they are configured in the Feedback survey.

Call Data Action (Add New Interaction)

The first step is to create a new Mindful Feedback interaction.

example call data action block

  • Category: Process Conversation (Web Messenger)
  • Data Action: Create Interaction
  • Configuring Inputs: 
    • Hard-code the ID of the Feedback survey you wish to use.
    • Use Session.conversationID as the External Reference value
  • Important Outputs:
    • id: Assign Flow.interaction_id

When the Action is completed, the variable Flow.interaction_id will contain a value to use in the next step.

Call Data Action (Start Survey)

With the interaction created, we can change the status to "started" in Feedback.

example slot configuration

  • Category: Process Conversation (Web Messenger)
  • Data Action: Start Survey
  • Configuring Inputs: 
    • id: Enter Flow.interaction_id
  • Success Outputs:
    • Set the prompts output to Flow.Current_Question_Collection.

Update Data (Greeting and First Question)

To prepare to introduce the survey and ask the first question, we will use an Update Data block to populate two prompts we obtained in the previous block. When we hit this block, the Flow.Current_Question_Collection[] array will contain two strings, both of which include HTML tags. This block will separate the two strings into two Flow variables and remove the HTML tags, making the strings ready for use in the next block.

example greeting and first question block

  • Update Statement 1: Set Flow.Greeting to the expression Replace(Replace(Flow.Current_Question_Collection[0],"<p>",NOT_SET),"</p>", NOT_SET) 
  • Update Statement 2: Set Flow.CurrentQuestion to the expression Replace(Replace(Flow.Current_Question_Collection[2],"<p>",NOT_SET),"</p>", NOT_SET)

Communicate (Greeting)

The Flow.Greeting variable is now populated with our survey greeting from Mindful Feedback. We will now use a Communicate block to send the greeting to the customer.

example communicate block

  • Communication: Assign {{Flow.Greeting}}

Ask for Slot (Satisfaction/CSAT)

The first Ask for Slot block will ask a CSAT question on a five-point scale. 

NOTE
This same approach could be used for any multiple-choice question, including those with text-based answers ("satisfied", "unhappy", etc.). To map text-based answers to the numeric values that the Feedback API expects, you can use Data Tables, as described earlier in this guide.

example ask for slot block

  • Slot: Select One_to_Five_
  • Question: Enter {{Flow.CurrentQuestion}}
  • Quick Replies: Enter several potential responses, labeled numerically
  • Slot Result: Select Slot.One_to_Five_

Call Data Action (Post Answer)

With the customer's second response converted, we can call the Post Answer Data Action to update the interaction in Feedback and prepare to ask the next question.

example call data action block

  • Category: Process Conversation (Web Messenger)
  • Data Action: Post Answer
  • Configuring Inputs: 
    • id: Enter Flow.interaction_id
    • response: Enter Slot.One_to_Five_
  • Success Outputs:
    • Set prompts to Flow.Current_Question_Collection.

Update Data (Second Question)

Just as we did for the first question, we will use an Update Data block to parse and assign the value of the second question that we obtained in the previous block.

example update data block

  • Update Statement 1: Set Flow.CurrentQuestion to the expression Replace(Replace(Flow.Current_Question_Collection[0],"<p>",NOT_SET),"</p>", NOT_SET)

Ask for Slot (First Call Resolution - Yes/No)

The next Slot will present an FCR question with options for Yes or No, then save the customer's choice as a Slot Result.

example ask for slot block

  • Slot: Select Yes_No_
  • Question: Enter {{Flow.CurrentQuestion}}
  • Quick Replies: Provide options for Yes and No
  • Slot Result: Select Slot.Yes_No_

Call Data Action (Post Answer)

With the customer's FCR response assigned to a Slot Result, we can call the Post Answer Data Action to update the interaction in Feedback. After that, we can prepare to ask the next question by updating the prompts variable again.

example post answer block

  • Category: Process Conversation (Web Messenger)
  • Data Action: Post Answer
  • Configuring Inputs: 
    • id: Enter Flow.interaction_id
    • response: Enter Slot.Yes_No_
  • Success Outputs:
    • Set prompts to Flow.Current_Question_Collection

Update Data (Third Question)

Again, we will use an Update Data block to parse and assign the value of the next question that we obtained in the previous block.

example update data block

  • Update Statement 1: Set Flow.CurrentQuestion to the expression Replace(Replace(Flow.Current_Question_Collection[0],"<p>",NOT_SET),"</p>", NOT_SET)

Ask for Slot (Open Feedback)

The third Ask for Slot block will ask an open-feedback question. Here we will allow customers to provide any text response they would like.

example ask for slot block

  • Slot: Select open_feedback_
  • Question: Enter {{Flow.CurrentQuestion}}
  • Slot Result: Enter Slot.open_feedback_

Call Data Action (Post Answer)

With the customer's third response in hand, we can call the Post Answer Action to update the interaction in Feedback and prepare to ask the next question.

example call data action block

  • Category: Process Conversation (Web Messenger)
  • Data Action: Post Answer
  • Configuring Inputs: 
    • id: Enter Flow.interaction_id
    • response: Enter Slot.open_feedback_
  • Success Outputs:
    • Set prompts to Flow.Current_Question_Collection

Update Data (Closing Prompt)

Now that all questions in our example survey have been asked, the prompts variable should hold a closing message from the Feedback survey. We will parse this into the Flow.CurrentQuestion variable in this block, then send the message in the next block.

example update data block

  • Update Statement 1: Set Flow.CurrentQuestion to the expression Replace(Replace(Flow.Current_Question_Collection[0],"<p>",NOT_SET),"</p>", NOT_SET)

Communicate

To wrap up the survey, use a Communicate block. 

example communicate block

  • Communication: Assign {{Flow.CurrentQuestion}}

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.