Create a Custom Trigger for D365 Customer Voice Survey Responses

So, let me take you on a little adventure I recently had while setting up a Dynamics 365 Customer Voice send-out for supplier reviews as part of CRMK’s ISO9000 work. This was my debut in using Customer Voice in Real Time, and oh boy, was it a ride! 🎢

First, I whipped up the survey and used the out-of-the-box (OOB) functionality to send it out. Simple enough, right? But hold onto your hats, because things got interesting real quick! 🚀

In the journey, I set conditions to wait a week before sending a reminder if respondents hadn’t replied. Easy peasy, just use the OOB trigger for Customer Voice survey answered as an exit condition. Or so I thought. Turns out, I couldn’t use any of the Customer Voice triggers to start a journey, trigger/activate within a journey, or even use as an exit condition. Talk about a plot twist! 😱

I went on a quest for answers, scouring the internet for information. Nada. Zip. Zero. So, what’s a marketer to do? Well, I decided to create my own custom trigger. This trigger would activate when a Customer Voice Survey answer post was created. Feeling like a tech wizard, I set it up and did a test. And guess what? It didn’t trigger. Bummer, right?

Diving deeper into the data, I discovered the field “Regarding” wasn’t set. But the plot thickens! The field “From” was set with the correct contact. Before you jump for joy, let me clarify—it’s not a lookup but some sort of PCF showing which contact is linked to the post through the “Activity Parties” table. Ugh, we can’t use that for our trigger. 😫

So, how do we untangle this mess? Under other, less technical circumstances (think athletic pursuits), I might say, “It’s never too late to give up”. But here, the solution is somewhat simple. Just like Princess Leia had Obi-Wan Kenobi as her last hope, Power Automate will be ours. It’s like the Force for marketers, without all the fuss about midi-chlorians (you nerds know what I mean). 🦸‍♂️💫

Game Plan

Alright, team, here’s our game plan: we’re going to set up a flow in Power Automate to fill in the ‘Regarding’ field, and then we’ll create a custom trigger. Ready? Let’s dive in! 🚀

Power Automate

Whether you want this to apply to all received answers or just specific ones, you’ll need to adjust the trigger filter accordingly. For my mission, I want this to happen for all answers. One flow to rule them all, right? 😉

For the trigger, select the following:

Table: Customer Voice survey responses

Change Type: Added

Scope: Organization (adjust this to suit your needs)

Next, we’ll add a new action to fetch the contact we need for the ‘Regarding’ field. Here’s how:

Add a “List row” Dataverse action and then set it up with:

Table: activityparties (such a fun name for a table, right?)

Select columns: partyid (lets just grab the info we actually need)

Filter rows: (_activityid_value eq ‘@{triggerOutputs()?[‘body/activityid’]}’ and participationtypemask eq 1)

(This filters based on the activity that triggered the flow and the participation type 1 (which is the sender of the response). If you’re curious to get nerdy about the Activity Party table, check out the learn page. It might come in handy at your next pub quiz! 😉)

Row count: 1 (we’re expecting just one row, so let’s keep it tight)

Next up, we need to set the ‘Regarding’ field:

Add an “Update Row” Dataverse action with the following details:

Row ID: Activity ID from trigger

Regarding (Contacts): contacts(first(outputs(‘List_related_activity_parties’)?[‘body/value’])?[’_partyid_value’])

• By adding first(), we can skip the messy apply to each action. If you’re feeling adventurous, just select Party (value).

Create the Custom Trigger

Now, let’s head back to the Customer Insight Journeys app (what a mouthful!). 🏃‍♂️💨

1. Press Triggers in the menu and then select “New Trigger”.

2. Name your trigger and select “When a record related to a customer is created or updated”. Hit that “Create” button.

Here, select the table “Customer Voice survey response”. For the audience, select “Contact (via attribute Regarding)”. For the trigger condition, choose “An existing record was updated”. We want this to trigger after our flow sets the ‘Regarding’ field because, before that, there’s no relationship between the response and the contact.

For which attribute triggers the action, we obviously select ‘Regarding’. 🧐

Once you’re done, hit that “Ready to use” button on the top right and wait for the trigger to activate. 🎉

When it’s activated, it should look something like this:

Use it in a Journey

For my use case, I want to make a contact exit a journey. Since I only want it to trigger for answers on a specific survey, I’ll add a condition for that. On the right menu, select Exit.

1. Then select the custom trigger we just created.

2. Press “Add condition”.

3. Select “Customer Voice survey response” > “Survey (Customer Voice survey, msfp_surveyid)” > “Condition on Survey (Customer Voice survey, msfp_surveyid)”.

Finally, select your survey in the lookup field, and we’re done. 🎯

So now we’re at the end of our epic journey. Ready to make some magic happen? 🚀✨




4 responses to “Create a Custom Trigger for D365 Customer Voice Survey Responses”

  1. Dan Avatar

    “In the journey, I set conditions to wait a week before sending a reminder if respondents hadn’t replied. Easy peasy, just use the OOB trigger for Customer Voice survey answered as an exit condition. Or so I thought. Turns out, I couldn’t use any of the Customer Voice triggers to start a journey, trigger/activate within a journey, or even use as an exit condition.”

    Not sure how you tried to set that up, or if there are additional requirements you had that I’ve missed, but I haven’t had any issues getting a response to trigger an action using an if/then branch.

    Here’s how I set one up:

    1. Carl Avatar

      Hi Dan, Thanks for the help finding the, for me, lost OOB trigger for survey responses :). Don’t know why I missed this. I figured that it would work as the other trigger. So this is nice to know.
      But for my use cases I needed to be able to use it in the same way as a custom trigger.
      I´m going to make an updated post about it.

      Once again thanks 🙂

  2. Nigel Avatar

    I am in the process of testing customer Voice with Customer Insights and finding a lot of gaps. Some things work with Outbound but not RTM and others not at all. It’s very frustrating. One i noticed is that when sending using RTM it does not populate the contacts details in the export, but does when you use Outbound

    1. Carl Avatar

      Hi Nigel,

      I completely understand your frustration with things not working as expected. Let’s hope these issues get resolved soon in the future! 😊

Leave a Reply

Your email address will not be published. Required fields are marked *