Adding or updating survey interactions

Mindful Feedback can automatically schedule surveys after a task has been completed in Twilio Flex. This requires two items to be configured:

  • Twilio Flex Listener
  • a survey mapping using data from completed Twilio Flex tasks

This guide will show you how to configure the rules in Mindful Feedback to automatically add new survey interactions based on activity in Twilio Flex.

Twilio Flex Listener

Quick access: Settings > Customer Settings > Integrations > Twilio Flex tab

image of the customer settings page
  1. On the Twilio Flex tab, click Configure Twilio Flex.
  2. On the Configure Listening tab, toggle the Listening enabled switch On.
  3. List the queues you wish to listen for in the field provided or use the Enable listening on all queues switch to include all Twilio Flex queues.

Screen capture of Configure Listening tab

Survey Mappings

Survey Mappings are evaluated one at a time in the order they are listed. Whenever a mapping condition is met, a new survey interaction is scheduled using the parameters configured for the mapping.

A survey mapping consists of two parts; a set of conditions and a set of parameters used to define the properties of the new survey interaction. Each condition and survey parameter can use either a constant value or a variable using a Twilio Flex task attribute. Refer to the task attributes guide for more information.

Survey Parameters

The Survey Parameters section is used to map values to each of the survey attributes. You can assign a value to an attribute using either a Twilio Flex task attribute or a constant value. The dropdown that appears when using a task attribute contains a list of known task attributes (those that Mindful has derived from properties of the task). You can type the name of an attribute for anything that is not listed in the dropdown.

Example

The following screenshot shows an example of a survey mapping.

Screen capture of sample Survey Mapping

The conditions check the task attributes against constant values. In this example, several conditions must be met:

  • The task must have come through the General Enquiries queue
  • The task must not have an attribute named sdxVoiceSurvey with a value of 1
  • It also must not have an attribute named sdxReference with a value in it.

If those conditions all evaluate to be true, a new survey interaction will be created with the specified attributes. There are several items, in particular, to notice about the attributes in this example:

  • The Survey Method attribute is set to a constant value of Web via SMS, which is the same as setting the survey_type to websms.
  • The Phone Number attribute is set to the value contained in the task attribute callerNumber.
  • At the bottom of the list, a custom survey attribute CustomerName is set to the value of the task attribute SDX_CustomerName.

Task and Survey Matching (Updating Surveys)

You can configure survey matching rules beneath each survey mapping to control the behavior of the mapping.

By default, the matching rule will be set to Disabled. This means the survey mapping will simply create a new survey interaction when the mapping condition is met.

Screen capture of Match Conversations with Existing Survey Interactions set to disabled

You can set the rule to Match or Add to either update survey parameters to create a new interaction, depending on whether or not an existing survey matches the conditions you provide.

In this mode, when the conditions are true, Mindful Feedback will first determine whether there is an existing survey interaction with a property (right side) that matches a property of the task being evaluated (left side). If a match is found, the survey parameters will be used to update the existing survey interaction. If the conditions match and there is no matching survey interaction, then a new interaction will be created.

Screen capture of Match Conversations with Existing Survey Interactions set to Match or Add

You can set the rule to Match Only to update an existing survey interaction (if a match is found). In this mode, new interactions will not be created.

Screen capture of Match Conversations with Existing Survey Interactions set to Match only

The Match Only and Match or Add condition searches for existing survey interactions that were created after the Twilio Task was started.