Use Case - Collecting Customer Survey Values from a Workflow

Create a workflow for a customer satisfaction survey and gather the responses for reporting in 3rd party systems like Dynamics Customer Voice.

In this Use Case we create a workflow for a customer satisfaction survey and gather the responses to be able to report on these in a 3rd party system like Dynamics Customer Voice. 

PRECONDITIONS

You require service owner rights to create the workflow of your service and the Power Automate flow.

  • A service is set up
 

Show Icon Legend

💡 = A hint to signal learnings, improvements or useful information in context. 🔍 = Info points out essential notes or related page in context.
☝ = Notifies you about fallacies and tricky parts that help avoid problems. 🤔 = Asks and answers common questions and troubleshooting points.
❌ = Warns you of actions with irreversible / data-destructive consequence. ✅ = Intructs you to perform a certain (prerequired) action to complete a related step.
 
 

Create the parameter in Nimbus

In Nimbus, create a new parameter

  • Name = CustomerSurveyValue
  • Default Value = EMPTY

Create the workflow in Nimbus

In Nimbus, create a workflow with a couple of branches. We want to collect the survey responses for each branch, at the end of the branch. We store them in the Parameter CustomerSurveyValue created in Step 1. After that we make an announcement an disconnect the call.

In the example we ask a first question using the Input Customer workflow activity. If the customer presses 1 for "Yes", then we collect the information using the Save to Parameter activity and route to the announcement. For "No" we route to the second question, and so on.

Click here to expand...

 
 

The Save to Parameter activity is important. We want to store a JSON value in the parameter. For each branch, we write the values accordingly to the customer choice into the parameter. 

The syntax is as follows:

[
{
 "question": "Are you satisfied with our service?",
 "response": "No"
},
{
 "question": "Do you want to receive a survey per email?",
 "response": "Yes"
},
 {
 "question": "A third question",
 "response": "A third answer"
}
]
Here are all values for the given example:

Now we can build the Power automate flow.

Capture the responses

Next, build a Power Automate flow which will listen to the UpdatedParameter event and write the answers to your CRM, survey system or simply into a list.

Description
Screenshot
Start with a GetOnUpdatedTasks and select Parameter Updated as the event

Then initialize a new array variable

  • Name = CustomerSurveyValue
  • Type = Array

Check if we got the right trigger.

Add a Condition element to the flow with

  • triggerOutputs()?['body/updatedParameterName']
  • is equal to
  • CustomerSatisfactionValue

Now, set the contents of the array variable 

  • Name = CustomerSurveyValue
  • Value = json(triggerOutputs()?['body/updatedParameterValue'])

Add an Apply to each element to the flow and iterate over the variable CustomerSurveyValue.

Now you can work with the data. As a reminder, the variable CustomerSurveyValue holds the following data:

[
{
 "question": "Are you satisfied with our service?",
 "response": "No"
},
{
 "question": "Do you want to receive a survey per email?",
 "response": "Yes"
}
]

In our example we update a SharePoint list with the following values:

  • Title = Nimbus Survey
  • Question = items('Apply_to_each')['question']
  • Answer = items('Apply_to_each')['response']
  • callChainId = triggerOutputs()?['body/callChainId']
  • Number = triggerOutputs()?['body/microsoftCallerId']
  • DisplayName = triggerOutputs()?['body/customer/displayName']

The callChainId can be used like a correlation id to identify all answers that belong together.

PUSHING SURVEY RESPONSES TO DYNAMICS CUSTOMER VOICE

At this point you could also add the responses to your Dynamics Customer Voice instance using the Microsoft Dataverse Connector.

We recommend implementing the push in a second step, as it could be error prone.

Step 1 (this flow): Save the Nimbus responses in a table of your choice (Azure Storage Tables, Microsoft Dataverse, Sharepoint, etc.)

Step 2: Read the data from the table and create the entries in Dynamics Customer Voice according to the internal data structure.

 

Test your flow

Now, call the service and make some choices to the questions.

We've shared the SharePoint list in a channel "Survey" on the MS Teams team. This way, we can also post survey actions as adaptive cards in that channel or share other customer survey related content in one centralized place.

Table of Contents