*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***
If you share a Forms Pro Survey link out with people directly (rather than using FLOW), any responses received will be from an Anonymous Responder. In other words, there is no way to link them back up to a specific Lead or Contact. Well, actually, there is! We can use Microsoft Flow to achieve this. So, consider an event, and you’ve provided a link, or shared a QR Code for people to span and they have completed your survey. Let’s walk through the steps of how to create a new Contact record, then link their Survey Response back to them in Dynamics 365 CE.
To get started, go to Microsoft Flow and log in, click to add a New flow and select Automated – from blank.
Give your Flow a name, and type in Common (for Common Data Service) in the search box. Select the ‘When a record is created’ trigger and then click Create from the bottom of the screen.
You can rename each step (clicking on the three dots ‘ellipsis’ on the right. This step is the trigger for when a Survey Response is received in CDS. Select your environment, the survey responses entity, and scope of Organisation.
Add an action step next using Microsoft Forms. Even though your survey is created in Forms Pro, it’s the Forms connector you need to select. Your surveys (or forms) should show in the Form Id list. Select the correct one. For the Response Id, add an expression. We need to use the int trigger body to parse the Source Response Identifier string into an integer value accepted by this action. You can paste the following in to the Expression field, then click OK.
Add another action from the CDS connector for Create a new record. We will create a Contact. Select your environment and the correct entity (you might wish to create a Lead for your own purposes depending on your business requirements). Now you will be able to populate the contact with fields from your survey. Make sure you populate the First Name, Last Name and Email address at minimum. You might have other fields on your survey that you can also add to the new record.
Now we need to link the contact back to the survey response. Add another action from the CDS connector and select ‘Update a record’. Select you environment and the Survey responses entity. In the record identifier select the Activity id from the initial trigger step.
Now you need to link it to the Contact. Add the Full Name to the Respondent step, and add the Email to the Respondent email address field. Add the Contact id in the Regarding field, and set the Regarding Type as contacts (or leads if applicable). You can also populate the Subject field if needed, or anything else you feel makes sense in your scenario.
Once a survey is completed, we can see the new Contact is created in our environment, along with the linked survey response activity in the social pane.
If we open it up, we can see the Regarding field is populated, along with a subject provided in the FLOW.
Now we can see all of the related question responses. Awesome! This allows us to have all of the survey responses linked right from the start of the prospect or customers journey rather than having anonymous ones not linked to anything.
Want to just watch how to do this? Check out the video below:
Check out the latest post:
Using Focused View And Up Next In Model-Driven Apps
This is just 1 of 375 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.
40 thoughts on “Link Anonymous Forms Pro Survey Responses To Records”
Thanks for the above post, its great! I have watched your PowerAddicts Hangout August 2019 session, very insightful!
I was wondering if you’d be able to share the ‘contains’ function?
Hi J, thanks! Glad it helped. When you say the ‘contains’ function, which part of the blog are you referring to? int(triggerBody()?[‘msfp_sourceresponseidentifier’]) is the only part on this blog that I think you might be referring to, but want to check and make sure.
Thanks so much for replying so quickly. Apologies, I should have said this was in regards to the PowerAddicts August Session. Where you was ensuring Contact didnt already exist, so you showed listing all the contacts with filter criteria of ’emailaddress1 eq [formEmailAdd]’ then a condition checking if the email ‘contains’ is equal to ‘true’.
I’m unsure of the expression used there…I would have done a screenshot but cant 🙁
Ah! Ok, yes – here you go:
Amazing thank you! It works 🙂
Are you possibly able to elaborate on what each portion does?
Awesome. Check out this post: https://meganvwalker.com/duplicate-checking-for-forms-pro-survey-responses/ – it explains it fully and also has a link back to a post from a great guy called Bruce Sithole in Australia. Hope that helps!
Thank you so much 🙂 – Most helpful!
We want a very simple thing, we thought it was finally possible with Forms PRO because it wasn’t with Forms, but it doesn’t seem t work )-: In general: send a survey out with Flow and give it an unique ID, pick up the response using Flow and get the unique ID to match the response to a project, client, whatever. I tried ‘Regarding’, ‘Recipient Details’ and even a ‘personalized data variable’. With the method above I can send out surveys with these parameters, however I cannot acces the parameters in any way when the response comes in. No Dynamics. Just Flows triggered from Sharepoint lists updating Sharepoint lists.
Hi Erik, yes, you can do this. Check out this post: https://meganvwalker.com/updating-records-from-responses-using-piped-variable-parameters/ – you can ignore the part about the Appointment but then read on from the part where the create an invitation step is created. The concept would be the same, and for this you wouldn’t need to have Dynamics. You could do this from Sharepoint lists too.
Thanks Megan! Just this morning I found indeed that the personalization parameters you define yourself, (apart from First and Last Name) are in the ‘‘Context Data’ ( triggerBody()?[‘msfp_embedcontextparameters’] ) and can be read with a parse JSOn action using the value for ‘msfp_embedcontextparameters’ from the CDS trigger as sample payload for the JSON schema. (-:
Because we now have the ability to track if user X has responded to a survey for project Y Forms Pro will be our choice.
Excellent, glad you found that already. It’s pretty cool, and you can hopefully see that this opens up a whole range of possibilities for uses with Forms Pro.
Thanks for this great post, i am trying to link a survey with Dynamics but when entering the expressions for the form Response Id i am getting a message that the expression int(triggerBody()?[‘msfp_sourceresponseidentifier’]) is invalid. not sure what i am doing wrong, i have just copy past it from the post.
Ah, OK, I think it could be that the single quotes look a bit strange so could have reformatted them. I just edited the post and added the expression as code so you should be able to try and copy and paste it again. Can you let me know if that works for you?
Yes, it is work. thank you! 🙂
Fantastic! Good. Thanks for letting me know!
I have another question, we have situation where we need to get survey responses but the majority of those PPL who is going to respond to the survey, they exist in our CRM as contact, i know i could create them as lead but do you think i can make a flow with condition control switch if a contact exist update it if not then create the contact?
Hi Ahmad, take a look at this post: https://meganvwalker.com/duplicate-checking-for-forms-pro-survey-responses/ – perhaps this will help?
Thanks, works as expected it, also tried it with contact.
Awesome, good to hear it works for you! Thanks Ahmad!
Hi Megan! Thank you so much for all of the great forms pro survey content!
I wondered if i could ask you a simple question, my setting to allow my survey for “Anyone with the link can respond” is greyed out. Would there be any particular reason for this? I haven’t managed to find one online so far 🙁
Thank you in advance
Hi Nico, thanks for the compliment! I have heard of this one time before, but I didn’t ever find the resolution. I would submit a ticket to Microsoft to see if they can help. I am not sure what causes this unfortunately. It’s one I haven’t got to the bottom of yet!
Thanks for the post. It was very useful and I am working on the same thing. Thank you so much.
When I tried the same and update the response to CRM application , I had come across some issues.
I was doing testing with the MS flow to trigger a survey and get a response. Once I get a response then I update the response to specific request in dynamics 365 application for which the Survey was sent.
But when multiple Surveys send from MS flow and all flows are in running state, if any one survey is responded then all the ‘When a new response submitted’ action in all flows are getting triggered. Hence the same survey response is updated in all requests in dynamics 365 application. ( it seems like we cannot capture response for specific request for which we sent a survey.)
Hi Dinesh, you would need to add in a condition to your Power Automate flow and check to see which survey was responded to, and determine which one you want to then run the flow on. Otherwise, yes, it will run every time a survey is responded to.
Hi Megan – I’m hitting the same issue described bu Dinesh. What condition could you advise that would ensure the flow is only triggered by the survey specified in the flow? Many thanks.
Hi Daniel, I will do a blog on this next week. You can add a trigger condition so the flow would only run if that condition is met. It has been blogged about before by other people, but I will add something specific as it relates to Forms Pro. Hopefully that will help you and others with this question!
Thanks Megan. I’ll look out for that. I managed to get it to work by setting up the Condition based on the Survey Source Identifier is equal to the ID of the specific survey I wanted the Flow to trigger on.
I hope this finds you safe.
I’m working on an urgent requirement and I’m really hoping you can help me understand if what I want to achieve is feasible.
We created a Microsoft Form to track new projects applications. these new projects are really volatile as they don’t have a unique ID or reference. we want to be able to add all forms entries in one excel which we can do with flow, however, we are struggling to figure out how our users can go to the form and amend their first entry by entering a similar request with one or two different fields/ questions.
is there a way to automate the creation of a unique ref to our first entries stored in excel so when the second entry is logged we can instruct flow to amend the correct row in excel avoiding to have a duplicate or amend existing data.
the last point we don’t have access to Microsoft form pro we are using the normal forms
looking fwd to your feedback
Hi Kerim. Regardless of using Forms or Forms Pro, you can’t go back and edit the responses of a survey that was submitted. It’s just not possible. ????
Thanks for this amazing blog, I have been using this flow since last year for different surveys and small registrations with only 5 to 8 questions, recently I have noticed few problems and I have been looking for an explanation but didn’t find any.
The first one is in form itself, I am using the Forms Pro with settings anyone can fill out the form and no record name, it is completely anonymous but when people fill in the form, the responses are tracked with a name and email address which is different then what it is filled in actually, in principal they should be anonymous and shouldn’t be tracked at all, I cannot figure it out why it is happening, do you know why it is doing this?
the second problem I have is with the flow which is exactly as your flow with some minor additions but sometimes I am getting failed runs because the flow is getting response without being submitted by anyone, it sounds like the flow is trying to keep the connection alive and trying talk to the form, the error I see in the flow is that emailaddress1 is null but I don’t see a way to find out what is triggering this, is there a way to find out what is triggering the flow?
I hope this make sense what I am trying to explain ???? I can provide some screenshots if you want to have a look at the settings.
Hi Ahmad. Glad you like the blog and that it helps! So, when you say that a name and email address is being tracked against the response, is it the same name and email for all of the responses? What is that name and email? Is there a pattern of some kind?
For the second issue. The times when it fails, if you review the survey response, did the person fill out their email address into your Email question? And if they did, does it show on the new Contact record you created? If you see in the error that the emailaddress1 is null, that tells me that the Contact record doesn’t have a value in the Email field in Dynamics.
Hi Megan, thanks for the quick reply. ????
The name and email is not the same, it is like tracking every response with a different name and email for example there is one response filled by me using my personal email address and it is linked with another name and email address, I do not see any pattern.
For the second issue, in my flow I have conditional control if the email address exists in Dynamics then just link the response to it and if not then create contact first and then link the response. The problem I am getting is just null, like someone is submitting me an empty form, however all fields are mandatory in the form. I have flow where I have 30 runs and 25 are failed but in form, I see only five responses, so the number of responses does not correspond to the runs of the flow.
For the first issue, that’s really strange. You might need to submit a support ticket with Microsoft to help and take a look. For the second issue, do you have multiple forms? If so, do you have anything in your flow that checks to make sure it’s triggering on the correct form?
Thanks Megan, we will make a ticket. we do have multiple forms but each form has its own flow and we are not doing any validation since every flow is linked with a form directly.
Hi Ahmad. Even if you have different flows, if you have no trigger condition at the start of the flow, and your trigger is to run when you receive a new survey response, you will not get accurate results. Check out this post: https://meganvwalker.com/triggering-power-automate-for-a-specific-survey/ – without something like this added to your flows, you will likely get the errors you are experiencing.
Thank you so much Megan, it is amazing, after reading this blog now I confirm that those failed runs were triggered by the other open surveys that were open at the same time, I checked their UIDs with other survey flows, so my second problem is solved, now will figure out the first problem with forms responses tracked with wrong email address.
Excellent! So glad you were able to sort out this issue. Glad I could help!
Saw that you have responded to queries & thought of messaging here. My requirement is simple- create a contact record when a survey response is received – default the values of contact from the survey response. The Contact entity has option sets & multiple select option sets fields, for example: Gender: Male/Female/Prefer not to say as well as Multi-select questions like- preferred method of contact: EMail, Phone call , Text OR Preferred day of the week: Mon, Tue, Wed,Thur,Fri etc.
I have created a flow successfully which creates a contact record with the responses that are in text – name & phone number. But for these additional fields ( total 20 fields) that are either option set or multi select option sets I can’t get the right approach? Can you help please?
Hi Shruti, you will need to do an expression for each of your option sets to use the value to map rather than the label. You would have to get this from the field in D365 (or your Model-drive app). So your expression would be a series of if statements. So something similar to below, but your triggerOutputs part where I have a field name, you would be doing that for one of the responses to your survey. Hope that helps!
Comments are closed for this post.