Send a survey with Power Automate

Completed

The various ways of sending out a Dynamics 365 Customer Voice survey include sending emails directly from Dynamics 365 Customer Voice, sharing the survey through a link or QR Code, and embedding the survey directly within a website. This section reviews how to send surveys by using Microsoft Power Automate.

Creating a flow provides the survey maker with the ability to send a survey or create an invitation by using the Dynamics 365 Customer Voice connector in Power Automate. Using this method rather than sending an email helps make creating and using variables a powerful tool for any organization. Variables can be populated with actual values that are linked to the respondent, creating a personalized and unique customer feedback experience for each person.

Consider a scenario where a Customer Service Feedback survey has been created by the Contoso organization. In addition to asking for feedback on the support process and how a case was handled, the company wants to include some personalization so that the customer sees their name as part of the survey. By default, three variables are included on each survey: first name, last name, and locale. (Variables will be covered later in this module.) Adding a variable to a survey element is simple, and you can access variables from the Variables drop-down list, as shown in the following image. They can be added to the survey description, into the question text, and into the question subtitle.

Survey variable highlighted with dropdown values of New variable, First Name, and Last Name.

After the First Name variable has been added to the survey, it is now time to set up the flow in Power Automate. Selecting the Send tab at the top of a survey will show all methods that you can use to distribute the survey, including the option to configure a flow by using Power Automate. A flow can be created directly from Power Automate rather than through the method where the user creates each step of the flow themselves. Using the flow templates that are available within Dynamics 365 Customer Voice can help you view the various steps that are included and begin to understand how the connector actions work.

For Contoso’s requirement, the Send a survey when a case is resolved in Dynamics 365 template is the best option. After the flow has been configured, you can access it by returning to the Home area and then selecting the number that shows a flow that is configured. Additionally, you can review all flows that are linked to a survey and see the name of the flow, the email template that was used, how many times the flow has run, how many times it has failed, and if the flow is currently turned on or off. To make modifications to the flow, select the pencil edit icon next to the flow.

Reviewing the flow in the automation section will show that the template has used the Dynamics 365 Customer Voice Send a survey action from Power Automate. As part of the creation of the flow, several values on this action step have been populated. The survey invitation that is generated is an activity in Microsoft Dataverse. An activity has a Regarding column, which indicates a specific record that it is related to. The survey invitation can be linked to any record type that has activities enabled. In this example, the Regarding column is used to link the invitation to the case that has been resolved. As a result, when you navigate to the case in Dynamics 365, the survey invitation will be displayed in the timeline.

Use the Recipient details column to associate the activity (and any related survey response) to the appropriate contact record that the survey invitation will be sent to. The activity will be displayed in the recipients record timeline in the related Dataverse environment.

Using the template means that the First Name and Last Name variables are automatically populated in the Send a survey action step in the flow. However, you can add these variables if you are creating a new flow or adjusting a flow. You can complete this action by adding the first name dynamic value from the related contact that is linked on the case (or other record, as required). Though the last name is populated, unless it has been used somewhere on the survey or in the email template, it is not needed. However, keeping the variable in the flow will not cause an issue.

Power Automate flow with advanced options highlighted to show Regarding set to incident, incidentid; Recipient details set to contact, contactid; First name set to firstname; and Last name set to lastname.

The entire Power Automate template that is used for the organization will be triggered when a case is resolved in Dynamics 365. The flow will determine if the customer is a contact or an account. Next, the flow will use the Dynamics 365 Customer Voice connector to send an email by using the survey and email template that was selected in the flow, and will then pass through the First Name and Last Name variables. The customer will receive an email with a link to take the survey. The survey will contain the dynamic value of first name that is displayed in place of the variable name.

You will be able to view any configured flows for a survey on the Send tab under Power Automate. This screen will show the last time that the flow was run, how many times it has run, and the number of failures that occurred. You can also access the flow by selecting the ellipsis (...) in the upper-right corner of the flow details tile, where you can make changes, if necessary.