We’re excited to share our way to automate & integrate the process of getting fast feedback from customer surveys.

Introduction

We set up a customer survey in Microsoft Forms Pro (or it might be called Customer Voice now – things change very quickly in this arena!) to collect feedback from our customers. There are several admin users who needs to have access to the survey responses but each individual user should have no access to edit the customer survey itself. With that said, the requirement was to create a dedicated Sharepoint site to record the survey results & give everyone access to the Sharepoint site. While executing this task using the default flow provided by Power Automate, we ran into a problem where the default flow does not provide access to the Personalized Data of the survey responses. 

Now, Power Automate provides a variety of default flows from which you can build on – this is part of the excitement of the platform. However, in this particular cases, our requirements go beyond the generic workflow.

In addition to the “responses data”, every Forms responses also carry a list of information called “Personalized Data.” This list of information is especially important if you had configured the customer survey with additional variables – which will flow into the “Personalized Data” list, not the “Responses List”.

 

What’s the difference between the Responses Data and the Personalized Data? Why are they different? 

The responses data stores answers to questions asked by the customer survey.

The “Personalized Data” carries any information that do not directly come from the answers to the questions in the form. These fields are set up as “Survey Variables” instead of Questions. Of course, there can be many different reasons and uses for this list of “Personalized Data” depending on your needs. When you use the Customer Survey in connection with another external system (in this case, it is our client’s proprietary Software), chances are you will have a list of information that needs to be referenced later. These information are either not available to the respondent of the survey, or it might be too much trouble for the respondent to retrieve, or it might simply be proprietary information that internal uses only. Whatever the reason is, the Survey Variables turned Personalized Data is a very useful feature when it comes to setting up a customer survey in Forms Pro.

Our Goal is to not only record the responses data into Sharepoint, but also the Personalized Data.

Why wouldn’t the default flow work? 

The default flow provided by Microsoft here only provides access to answers of questions included in the survey, and some other basic information such as email address, completion time and so on. The custom Survey Variables are not available to be fetched through this template. What we need is a Common Data Service flow so we can retrieve more information than what the default template provides us.
Define the following variables here. Entity Name: Customer Voice Surveys Item ID: Survey (Value) The Survey (Value) field is the identifier of the survey from the list of surveys in your defined environment, from which we’ll pull the survey responses from. This step is necessary (even though we’re not pulling information from the survey itself) since we need to identify the right survey first before locating the responses. 

The Solution: Common Data Services Flow + JSON Parser 

First, we need to create a new flow from your Power Automate Dashboard -> My Flows. This will be an automated task with a trigger action. Let’s choose “Automated – from blank” option here.
For the flow’s trigger, search for Common Data Service, then select “When a record is created…” option.
Once you create the flow, set the following fields in the Trigger Action: Trigger condition: Create – This means when a new entity is created, this flow will be triggered. The entity name: in our case, it is “Customer Voice survey responese”. Scope: Organization – this option will depend on your needs.

Next, we need to retrieve the information from the survey response. Add a new action after the trigger, choose Common Data Services as well. Even though there are actions pre-configuered for Forms Pro / Customer Survey, we still need the Common Data Services module here in order to retrieve the Personalized Data we are interested in here. 

Once you select the module type, choose the “Get a record” action.
Define the following variables here. Entity Name: Customer Voice Surveys Item ID: Survey (Value) The Survey (Value) field is the identifier of the survey from the list of surveys in your defined environment, from which we’ll pull the survey responses from. This step is necessary (even though we’re not pulling information from the survey itself) since we need to identify the right survey first before locating the responses. 
After Get a Record step, add a condition to locate the exact survey we need  by name.
In the If yes column, we’ll continue our flow. First, add Get response details step. We can use the Forms block here. Form Id: Search for the form you want (same form as the step above). You’ll select this form in the search results. Even though it doesn’t look like an ID here, Power Automate is processing this field and treating it like an ID. Response Id: We need to use the Expression feature here since Dynamics Content list provided doesn’t have the specific response identifier available (it might become available at a later date). Copy and paste the following expression into your flow.
int(triggerBody()?['msfp_sourceresponseidentifier'])
Next, add a Compose step, this will pull the response data (including the Personalized Data) so we can parse it later. Inputs: Context Data
At this point, we’re gonna take a pause from adding more steps. To parse the JSON data in the next step, we need an example of the JSON data. Save this flow, and run a test from here. Since this is a new flow and there are no previous runs, you’ll have to perform the trigger action (filling out a reponse) and see how it runs. Once the test run finishes, you can see it in the 28-day run history in this flow’s management view. Click on this run to see more details.
You should see this view after you’ve clicked on the history link. Open the Compose step, copy the OUTPUTS content here.
Back to edit the flow. After the Compose section, let’s add a new step called Parse JSON. Content: Context Data Schema: Click on Generate from sample, then paste in the OUTPUT data we’ve copied in the last step.
The Generate from example function will analyze and parse the JSON data for you. Once you’ve entered the copied data, the Schema will be filled and it should look something like this.
Now, all of our fields are ready to be sent to the Sharepoint site. Let’s add a Create Item step to execute this. As you can see in the example on the right. Two categories of information is available: 1) basic information such as respondent’s email, Submission Time, answers to questions, etc 2) Personalized Data such as Customer Name, Job Type, etc As you can see, the 1st category is the default information we can get from the Forms Pro module, these are the green blocks with the forms pro icon on the left. The 2nd category is the extra information we’ve parsed from the JSON data in the response. They’re marked by the purple blocks.

Congratulations! This flow is completed. At this point, becuase the Personalized Data fields are already parsed and ready to be used, you can configure more steps such as email notifications, Excel for Business actions, etc and include these extra data fields as you see fit.

This is what the high level steps of my flow looks like. 

Contact us at info@squeezetech.com if you’re interested in taking advantage of the Microsoft tools such as Power Automate and more. We’ll continue to share our solutions with the community. Feel free to leave a comment below if you have any questions. Till next time!