Variables in Microsoft Customer Voice

Sean Roque, 15 November 2020

In a previous blog I discussed how we can map what was formerly Microsoft Forms Pro (now Customer Voice) survey responses to a Dynamics 365 record. In this blog, I will go through how we can use the built-in variables in Customer Voice to pre-populate fields and more!

In Customer Voice surveys, we can create some variables that can handily be used throughout the survey or retrieved from the survey response.

image

These can then be placed anywhere in the survey in the following notation: {{VariableName}}, where VariableName is whatever name you have given your new variable. In this case, I have named name my new variable “UniqueID” and given it the default value of “Test Unique ID”. Notice that there are also default variables that are present upon creation of a new survey: “FirstName” and “LastName”.

image

How do we assign values to these variables? One way we can do this is by making changes to the URL that is sent to the survey participant. We can retrieve the survey URL by navigating to the “Send” tab and clicking the “Link” button.

image

The next step is to append information on what values you would like to assign to the variables. The notation to use for example if I want to assign the value “Sean” to the “FirstName” variable is

“&ctx={"FirstName":"Sean"}”

So, if my survey URL is “https://ncv.microsoft.com/mshuq”, my final survey URL with the FirstName value assigned is

“https://ncv.microsoft.com/mshuq&ctx={"FirstName":"Sean"}”.

We can also comma separate variables and the values assigned to them if we are looking to assign values to multiple variables, for example:

&ctx={"FirstName":"Sean","LastName":"Roque","UniqueID":"06c5dcd6-7e1e-eb11-a813-000d3a795926"},

and the final URL is

“https://ncv.microsoft.com/mshuq&ctx={"FirstName":"Sean","LastName":"Roque","UniqueID":"06c5dcd6-7e1e-eb11-a813-000d3a795926"}”

When navigating to this URL, the newly assigned values will reflect where the variable is used in the survey.

image

Using Power Automate Flows, using the Compose action we can dynamically populate the values to assign to the variables, and subsequently send this out using for example, the Outlook connector.

image

image