Expand variables to further customize surveys

Completed

First Name and Last Name are two default variables that are applied to every survey (and can't be deleted). A variable is an element that changes based on the recipient. Consider the Contoso project, where the company sends the Customer Service Feedback survey every time a case is resolved. The Customer Service manager knows that many support cases could be closed for the same contact in a short space of time. Therefore, the manager needs a clear indicator to highlight which case the feedback has been requested for.

To achieve this task, you can create and add new variables to the Customer Service Feedback survey. Select the Customization menu to the right of the survey and then select Variables. You can add up to 15 variables, including First Name, Last Name, and locale. In this example, two new variables called Case Number and Case Title will be added. The variable name can only include letters and numbers, without spaces in between. The default value is replaced with the actual value when a survey is sent. For example, if a variable is added, and it is possible that the column passed through to that variable could be blank, the text that is added in the default value is displayed instead. Consider this method as a contingency mechanism for missing data on records in the related Microsoft Dataverse environment.

A survey using variables CaseNumber and CaseTitle.

When a new variable is added, it is immediately available for you to add to the survey. The variables can be added to the survey description, survey questions, question subtitles, and email templates. In the following example, the First Name variable has been added to the first question, addressing the contact by name. On the second question, you can provide clarity regarding for which case the feedback is requested by adding the Case Number and Case Title variables.

A screenshot showing building a survey with variables in Customer Voice.

Until the variables are defined in Power Automate, if the survey link is shared in some way, the survey will show {{CaseNumber}} and {{CaseTitle}} rather than the actual values from the case that was closed. To fit everything together, you need to define the new variables for any flow that is used to send a survey or create an invitation. The dynamic content for these two variables can be pulled from the original trigger that runs when the case is closed. Searching by entering the word case will cause all columns with the word "case" in the column name to display. When the correct column is found, you can select to add it to the variable in the Dynamics 365 Customer Voice action step in the flow. Next, you can add the Case Title variable. Now, when the flow is triggered, the Case Number and Case Title variables will be populated with the correct values from the case that was closed.

A screenshot using dynamic content in the survey invitation in a flow.