In previous posts we’ve looked at how to distribute a survey using Microsoft Flow, and using the Send Survey action. This allows you to generate an email sent using an email template you’ve created in Forms Pro. The email comes from a forms pro email address and is only customised to a certain extent. In this post we will look at how to create an invitation link which you can then use in an email you create in Gmail, Outlook or other Flow Connectors with email functionality.

First we have a survey that has some personalisation on it. We are using the First Name, then have two custom parameters. One is to show a case number, and the other to show a case title. These will be used to be populated from a case that is closed in Dynamics 365 Customer Engagement.

We now need to create a Microsoft Flow. The first step is the trigger using the Common Data Services connector, and the When a record is updated option. Set your environment, cases as the entity, and scope as organisation. Our first action step is a condition to check and make sure the Status Reason value of the case is equal to 5, which is Resolved.

If false (No), we do nothing. If true (Yes), we move on to the next action which is another Common Data Service step, to get a record. In this case, we want to get the contact from the case, using the Customer value from the initial trigger step. If you wanted to have a flow that works and checks if the customer is an Account or a Contact, you can view this post.

Our next action step is from the Forms Pro connector. Choose the create an invitation action. From here, we pick which survey we want to send out a link for. Now we can populate the fields we want to pass through to the invitation. You will notice any of the parameters you created on the survey. So we can populate them all with the fields from the Get Contact step. Note that the Regarding and Recipient details values must include the entity name followed by a comma, then the record id.

Now we create the email we want to send. You can see below, it’s got a customised subject using the case number, and the body uses various fields from the Contact or the Case. The previous create invitation step gives us an Invitation link variable. We want to make it a hyper link, so you can add . Next, put the text you want to use as the hyperlink (Complete Feedback Survey) in this example. Finally, put after that.

Here is what the email looks like. The email has the Contact’s first name, the case number and the case title. The link to the survey looks nice and clean and when clicked on opens up the survey in a browser.

Reviewing the survey shows us the Contact first name, case number and case title. Excellent!

Want to just watch how to do this? Check out the video below: