Real-time, contextual feedback from customers is a must for identifying and closing customer experience gaps. However, the complexities of creating and distributing effective customer satisfaction surveys make it a tedious exercise. In addition, traditional survey methods such as direct mails and emails are high-effort experiences and generally lead to poor response rates.

As a result, SMS has emerged as a preferred channel for customer surveys. It instantaneously reaches customers, is easy to complete, and offers higher open and response rates than email.

This tutorial demonstrates how you can set-up an interactive SMS survey within minutes using IMIconnect's visual flow builder. 

Sample survey flow:

Step-by-step guide:

Prerequisites:

  1. Create a new service for your survey
  2. Buy a phone number and map it with the newly created service
  3. Create a custom event with msisdn as a mandatory parameter (Note: msisdn is just a variable name. You can use any variable of your choice. However, ensure compatibility while creating a column for msisdn in a database table to capture customer response). Refer here. 
  4. Create a database with the following fields for storing customer responses: 

          survey_id (to identify the survey)
          mobile_no (to capture the mobile number of the customer)
          question_1 (to capture answer for Question 1)
          question_2 (to capture answer for Question 2)
          question_3 (to capture answer for Question 3)
          survey_consent (to capture answer for the survey consent from the customer
          date_time (to capture the date and time of the response)

Note: 'Database' and the associated 'Database' node are not available in the flow builder by default. Please write to IMIconnect Support team. We will help you set up the database for you and will provision the 'Database' node.

Designing the survey flow:

Once you have created the new service and set-up the custom event as per above steps, create a new/blank workflow to design your survey. Follow the below steps:

A. Configure session parameters/variables


Configure the session variables under the 'Session Data' tab accessible inside the flow builder through the top right 'Settings' icon. 

Add survey_id (the unique id configured in the database earlier to identify a survey execution instance) as a session parameter and configure its default value as shown below.

C. Build and configure the flow

Step 1: Add the 'Send' node and select SMS channel. Configure the node parameters as per below. As you would notice in the 'Message' box text, this node is used to send initial message informing the customer about the survey.

Link the 'Start' node with the 'Send' node.

Note: 

  • Toll-Free numbers can be used to make it a free service for the respondents/customers. 
  • $(msisdn) in the destination is same as the variable that we defined while configuring the Custom Event.

Step 2: Add a 'Receive' node to capture customer's response 

As soon as you add a 'Receive' node, you will will get a message saying: "Mandatory 'sessionkey' not set under flow settings. Session key is used to resume a flow later.

The sessionkey is used to resume the flow when a response is received from the customer via the 'Receive' node. Since, this 'Receive' node waits for customer's response over SMS channel, the sessionkey should be set as msisdn. If, say Facebook channel would have been used for conducting the survey, then psid (i.e. unique Facebook UserID also called as page-scoped user ID) would have been set as the sessionkey

Follow the below steps toconfigure the session key:

  • Go to Settings icon on the top right corner of the flow canvas
  • Set 'Session Key' field to msisdn

Now, configure the 'Receive' node parameters as shown below:

You can set the 'Time Out (Sec)' parameter as desired. In this example, the 'Receive' node will wait for user's response for 259200 seconds i.e. 72 hours or 3 days before terminating the flow execution.

Link the 'Receive Node' with the 'Send' node configured in step 1.

Step 3: Use 'Evaluate' node to check customer response. 'Evaluate' node allows you to add custom JavaScript code to process or analyse data during the flow execution. Categorize responses other than "Yes"/"No" as "Others. Use if-then construct to branch the flow into alternative streams based on customer response.


Note: 

  • $sysResponseMessage holds the customer response received through the 'Receive' node configured in last step
  • You can leave the TargetName section blank. It will be auto-populated at a later stage once we have linked the various branching options with respective destination nodes
  • After writing the JavaScript code, test the script by giving sample values for the expected session parameters as show below:

Once the node configuration is complete and script has been successfully tested,  the various branching options will become available with the configured 'Tag' names. In this example choice '1' i.e. customer's response as 'Yes' will result in continuation of the survey flow, while choices '2' and '3' will be used to terminate the flow while logging the respective reason

Step 4: Branch out on choice '2' to a 'Database' node for inserting customer's response i.e. 'No' into the response sheet. End the flow at this node after updating the underlying database.


Step 5:
Branch out on choice '3' to end the flow after inserting customer's response (i.e. invalid text) into response sheet.

Step 6: Branch out on choice '1' to start the survey by sending the first question to the customer. Add a 'Send' node and configure the survey question like we did in Step 1.

Step 7: Add and configure a 'Receive' node to capture customer's SMS response.

Step 8: Some customers may not respond to the survey question within the configured time out time. Configure the 'Time Out' branch on the 'Receive' node, to a 'Database' node to update the response sheet. End the flow after updating the databse.

Step 9: Link 'On Success' event of 'Receive' node (i.e. when a customer responds to the survey question) to an 'Evaluate' node. Evaluate customer response using JavaScript if-then construct like we did in Step 3. 

Step 10: On Choice '2', i.e. when the customer response is 'No', branch out to send the response SMS message, and insert customer response in the database. End the flow at the database node. 

Step 11: On choice '3', i.e. invalid response by customer, send a message to the customer mentioning that there response is invalid. Add a database node to insert customer response to the response sheet and end the flow.

Step 12: On Choice '1' (i.e., when the customer responds in 'Yes'), branch out to Send the second question, and subsequently the third question while completing all the intermediate steps. 

While configuring the evaluate step for the third step, add additional if-then construct "Don't Know" response option. A sample is shown below:

Invoke the survey flow

  1. Create a Rule. Refer here
  2. Set the trigger as the custom event created under the prerequisites section earlier in this tutorial
  3. Skip conditions section, and set the action as 'invocation of the survey flow' 
  4. Activate the rule

This completes the survey set-up.

You can test the flow by calling the Custom Event API (configured in prerequisites) from Postman while passing the mandatory parameter (i.e. test mobile number). This will trigger the survey flow.

Did this answer your question?