Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Sending Customer Voice response to survey sender instead of survey owner?

Posted on by 120

Hi Everyone,

Setting up a survey in Customer Voice to be sent via a Flow to Dynamics 365 leads and running in to an issue.  I've built the survey and want to either share it with our users or just have them trigger it off through a flow and have it go to the lead.  Then once the lead submits a response a notification email with the survey answers goes to the user who sent the survey.

The CV responses are stored as a D365 so in theory I should be able to have the notification email be sent to the owner of the lead record.  Though I'm having an issue getting it working because I can't seem to find a way in Flow to have the email go to the owner of the lead record instead of the owner of the survey.  

Any ideas?

Attached is what I've built just to test it out but again currently stuck on getting the email to the survey sending user.

Thank you,
Chris 

CV-Screen-shot.png

  • Megan V. Walker Profile Picture
    Megan V. Walker 1,806 Most Valuable Professional on at
    RE: Sending Customer Voice response to survey sender instead of survey owner?

    Hi Chris_W,

    Sorry for the delay in getting back to you on your last question! Glad you figure that part out! If one of my responses helped, can you mark it as the answer so it closes off the topic? 

    Happy to help out!

  • Chris_W Profile Picture
    Chris_W 120 on at
    RE: Sending Customer Voice response to survey sender instead of survey owner?

    Megan,

    Finally got it up and working as intended.  I couldn't get the trigger code you provided above to work for me but was able to finally get it running with a code I pulled from your blog.

    @equals(triggerBody()?['_msfp_surveyid_value'], 'your-unique-survey-id')

    Thanks so much for your detailed answer and pointing me in the right direction.

    Best regards,

    Chris

  • Chris_W Profile Picture
    Chris_W 120 on at
    RE: Sending Customer Voice response to survey sender instead of survey owner?

    Hi Megan,

    As soon as I read your message it hit me that I'd been attempting to test it via the email send option and not using the Flow I'd made to send it to the lead.  As soon as I did it the other way it worked like a charm!

    The only issue I'm running into is that when I add the trigger condition the Flow doesn't get triggered.  I input the Source Survey Identifier in place of the one you had in the code but still a no go.  I pulled the Source Survey Identifier from the survey record in Dynamics so I know it's the correct one.  Is it a different type of survey ID that I should be looking for instead of the SSI?

    Thank you again!

    Chris

  • Megan V. Walker Profile Picture
    Megan V. Walker 1,806 Most Valuable Professional on at
    RE: Sending Customer Voice response to survey sender instead of survey owner?

    Hi Chris, do you have a Lead record set in the Regarding field for EVERY SINGLE Survey Response record you are getting?

  • Chris_W Profile Picture
    Chris_W 120 on at
    RE: Sending Customer Voice response to survey sender instead of survey owner?

    Hi Megan,

    Thank you for the detailed response!  I was actually reading through your blog looking for guidance prior to posting on here.  I just wasn't aware of how to put it all together so thank you.

    Though, I'm triggering an error on the second step when trying to get the lead record.  Any ideas what could be triggering it?  The error message is "The resolved string values for the following parameters are invalid, they may not be null or empty: 'recordid'

    I replaced the API ID below with ***'s.

    {

       "host": {

           "apiId": "subscriptions/********-****-****-****-************/providers/Microsoft.Web/locations/westus/runtimes/msmanaged-na/apis/commondataserviceforapps",

           "connectionReferenceName": "shared_commondataserviceforapps",

           "operationId": "GetItem"

       },

       "parameters": {

           "entityName": "leads",

           "recordId": null,

           "$select": "9ecd17a3-03f5-4317-ab4a-4788601ef934"

       }

    }

    Thank you for your insight.

  • Verified answer
    Megan V. Walker Profile Picture
    Megan V. Walker 1,806 Most Valuable Professional on at
    RE: Sending Customer Voice response to survey sender instead of survey owner?

    HI Chris_W - you need a few more steps. So far you have a flow that runs when the survey response comes through, but nothing that links with the record that the survey response is regarding the Lead. You will need to do a few more steps. 

    1. First, you have your trigger when the Survey Response is created. 
    2. You will need a Get a record step with the Common Data Service connector. You will need to get your Leads entity using the Regarding Value from the trigger step above
    3. You will need another Get a record step with the Common Data Service connector. You will need to get the Users entity using the Owner Value from the Lead you retrived in the step above. 

    Without step 2, you have no way to know the Owner of the Lead. Without step 3, you have no way of getting the email address for the Owner of the Lead.

    pastedimage1599807910261v1.png

    Next, you can fo your Get response details step. However, you will need to put in an expression rather than the source response ID directly. You can use this expression:

    int(triggerBody()?['msfp_sourceresponseidentifier'])

    More information on this can be found here:https://meganvwalker.com/power-automate-expressions-to-use-with-forms-pro/]

    pastedimage1599808068739v2.png

    Last, you can then add in your email step. You will then be able to add the Primary Email address value from the step where you got the User record that is the Owner of the Lead. 

    pastedimage1599808151141v3.png

    Finally, I would suggest you add in the following trigger at the start of your flow so that it only runs for the specific survey you intend it to run for. Otherwise it will run for every single survey response received. From the trigger, click on the ellipsis (three dots), then click on Settings. 

    pastedimage1599808344070v5.png

    You can use the following trigger for survey identifier and get the survey ID from the survey URL. Replace what I have highlighted with the actual survey ID for your specific survey. 

    @equals(triggerBody()?[‘msfp_sourcesurveyidentifier’], ‘UMck_jU0zkqaWu5hQY9ZJUXAPRqr8xtIuKFuOHsg9S1UMjA3OTE2OUlXWTBGRTJENVdDUlBTVjhGRC4u’)

    pastedimage1599808390094v7.png

    I hope this helps! 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans