Personalize a survey with variables
A significant part in the relationship between any organization and its customers is creating a personal experience. A personalized experience shows customers that their needs are acknowledged and understood and that their satisfaction with a service or product is important. Gathering feedback by using Dynamics 365 Customer Voice can be as simple as sending a link to a generic form. However, by using variables, you can provide the possibility of turning a detached experience into a fully customized and unique encounter for each person who responds to your surveys.
Variables are comprised of unique data that is linked to the respondent in some way. The simplest variables would be information such as the respondent's first name or last name. You can only use variables when a survey is sent directly to a specified person, not when a link is being shared on social media or on a website where any unknown person can complete the survey. Variables that are used on the survey are passed into the survey invitation in a unique link. Then, they are returned through the related survey response and linked together. You can store up to 15 variables on a survey.
You can use variables in the following scenarios:
Email invitations within templates
Survey subtitles
Survey questions
Embedding surveys into websites
Hidden variables to use for reporting and analysis
Add variables
You can access the Variables section from the Customization menu on the right side of a survey. When a new survey is created, a few variables are added automatically. The First Name and Last Name variables are added and can't be deleted from the survey. Another variable exists for the locale of the survey, which you can delete if it isn't required. When you create a Dynamics 365 Customer Voice survey, it will use the default language for its environment. However, you can create other versions of the survey by adding more languages. Using the locale variable provides a method in conjunction with Microsoft Power Automate to set the language of the survey that you are sending to a respondent.
You can add more variables by using the Add variable option. Make sure that you give the variable a name and a default value. The name will be visible wherever a variable can be added (email template, within the survey, or within Power Automate). The default value will be used as a contingency if data doesn't exist from the source of your data. For example, consider a scenario where you're using Microsoft Lists or a Microsoft Dynamics 365 Customer Service environment to store information about cases that are closed for your customers. In that situation, you would add a variable for the case title, case number, and a way to indicate the source of the case. If the case source column is blank, using a default value of Unknown will mean that any case with that information missing will still have a value populated on the survey or email template where you have used the case source variable.
Use variables
You can use the added variables in different places to pull in data from your data source. If the intent is not to use Power Automate, the only variables that you can use successfully are First Name and Last Name. This concept is discussed later in this learning path for Dynamics 365 Customer Voice, but capturing the columns to populate the variables must come from somewhere, and Dynamics 365 Customer Voice only knows of the First Name and Last Name variables. Selecting the main survey description will display a dropdown list of all variables that are available on the survey. When you select the main title, the variables will be absent because they can't be used in that specific area of the survey. You can add the variables to questions on the main question text or on the question subtitle.
To personalize an email template, select from the list of variables. These variables are then passed through when you send a survey invitation email. While you can use all your variables, keep the previous logic in mind where, if variables other than First Name and Last Name are to be used, Power Automate must also be used. In the following image, the First Name variable has been added to an email template. When the recipients are selected, the first name of each recipient will be used in place of {{First Name}}. Jane Doe will receive an email that starts with Hi Jane, while John Doe will receive an email that starts with Hi John.