Use context data from the survey responses

Completed

After a survey has been embedded into a website, you can then open the response within Dynamics 365 Customer Voice. From the same survey, you can access the reports section and open the report of the same name. From the right panel, open the respondents section, which will show a list of all survey respondents. Opening an individual response will provide the responses to each question, with the Personalized data tab showing the variables from the survey. This tab will also show the values that were passed through from the embedded survey on the website, providing more information about where the response came from.

The Personalized data tab shows the following variables from the survey: First Name, Last Name, and ProductPage.

That method is one way to review the variables for each response, but if you want to use this information to create triggers and act on the data, you can create a flow in Power Automate. The flow should run when someone submits a survey from the website. A prior module of this learning path reviewed how to create a flow that is triggered by using the Microsoft Dataverse connector that runs for the Dynamics 365 Customer Voice survey responses when a new record is created. By using an expression in the trigger settings, you can set a trigger condition to determine that the flow will only run for responses to a survey with a specific ID. Another approach is to set a trigger condition indicating that the flow will only run if the survey response contains the ProductPage variable. With this approach, only responses from the survey that is embedded in a website will trigger the flow to run.

contains(msfp_embedcontextparameters, '"ProductPage":"true"')

After you have followed the steps that are outlined in the previous module, the flow should have steps similar to the following example.

Step Connector Step details
1 Microsoft Dataverse When a new record is created
2 Microsoft Forms Get response details
3 Parse JSON Use the context data for the content and paste the context data from a test survey response as the schema

After the preceding steps have been created, the rest of the parameters will be determined by an organization’s requirements and objectives. In the example where a survey is embedded in webpages that are related to different products, it can be used to capture and create new leads in Dynamics 365. The responses to the questions can be used to populate the First Name, Last Name, and Email columns, and the parameter value for the ProductPage variable can be used to populate the Topic on the Lead. This approach provides a Business Development manager with information to help determine which product page that the lead was on when they completed the survey.