Want to send a survey to your customer when a case is resolved and have the response linked to the case in CRM? Here’s how: First, we’ll install a custom workflow assembly that will let us get a record’s ID so we can use it in a link. Then we’ll create the workflow that will send the link to the survey in an email.
- Download and import the “GetRecordId” solution. This works with CRM Online as well as CRM 2011 on-premise (NOTE: For CRM On-Premise, after importing the solution, you will need to use the Plugin Registration tool to change the GetRecordId assembly to non-isolated mode. See the Microsoft CRM SDK for more info).
This sample solution contains a custom workflow activity that we’ll use later. (This is not available for CRM 4.0, though there may be other solutions on Codeplex that will do the same thing.) - Next, go to Settings > Processes and click “New” to create a new workflow process:
- Set the workflow scope to “Organization” and to start when the case’s record status changes:
- Add a “Check Condition” step to the workflow:
- Check that the Status Reason of the Case is “Problem Solved”:
- If you successfully imported the custom workflow activity in step 1, you’ll have an option to add a new custom step to the workflow, “GetRecordId”:
Add the “GetRecordId” step, and in the workflow designer, give it a simple name with no spaces such as GetId:
- Next, add a step to send an email (in this example, it’s a standard CRM email, not a ClickDimensions email):
Save your workflow. We need to get the URL of our survey before we compose the email. - Open the ClickDimensions Survey web content record for your case satisfaction survey, and then click the “Design” button:
- In the Survey designer, click the Embed button to get the link to the survey. Copy the URL of the survey:
- Go back to your workflow and click the Set Properties button to compose the email. Add a hyperlink to the body of the email:
- The email body will now look like this:
- Place your cursor just after the link. We’re going to modify the link that is sent for the survey by adding two things: first a special parameter, and second, we’ll add the Record ID that the custom workflow step has generated:
After the survey link, type: ?p=1&_cld_incid=
Then, insert the dynamic value for the RecordId using the workflow’s dynamic values selector:
NOTE: Make sure to remove any blank spaces between the link URL and the RecordId placeholder. Blank spaces will make the link break. - Now, when a case is resolved, CRM will send an email with your survey link, and it will have the case ID as a parameter in the URL:
- When the customer completes the survey, the Posted Survey record will be automatically associated with the Case record in CRM:
Now you can kick off other workflows, such as an alert when a Posted Survey is associated to a case. Or you can use the same concepts to solve other business problems. The custom workflow activity in step 1 can be used to get any record’s ID in a CRM workflow. For example, you can use this custom workflow step to get a Contact’s ID and save it to a custom field on the Contact record so you can use it to build links in ClickDimensions Email Templates.
Happy Marketing!




Is the case a standard lookup on the Survey record? If it is by adding the p=1&_cld_incid= and record ID, ClickDimensions knows automatically to associate to the Case without doing anything else? Can this be used to link to other records as well by passsing special parameters into the URL?
Great Post
Posted by: FozzyNZ | 02/17/2013 at 05:51 PM
"Case" is a lookup on the Posted Survey entity form. That's a built-in part of our solution, so with the parameter in the URL, we will make the association automatically. Another similar parameter is p=1&_cld_accid= which will associate the Posted Survey record to an Account.
Posted by: ClickDimensions | 02/18/2013 at 01:03 PM