Link Anonymous Forms Pro Survey Responses To Records

*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***

| CLICK IMAGES IN THE POST TO ENLARGE THEM |

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.

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

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:

22 thoughts on “Link Anonymous Forms Pro Survey Responses To Records

  1. Hi Megan,

    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?

    Thank you

    1. 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.

      1. Hi Meghan,

        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 🙁

        Thanks,

        1. Ah! Ok, yes – here you go:
          contains(coalesce(body(‘List_contact’)?[‘value’]?[0]?[‘ItemInternalId’],’NULL’),’-‘)

  2. 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.

      1. 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.

        1. 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.

  3. Hi Megan,

    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.

    Thanks

    1. 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?

  4. Hi Megan,

    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?

  5. 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

    1. 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!

Leave a Reply

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