Home | Microsoft CRM tips and tricks | Link a Survey Response to a Case

Link a Survey Response to a Case

NOTE: This is an example that requires using a custom workflow assembly that is not designed by ClickDimensions. Please do not contact ClickDimensions support for implementing this example. If you need assistance, a qualified CRM developer partner can assist you.

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.

Follow the instructions below to learn how to link a Posted Survey to a Case record in CRM. (This only works for Cases, not other entities.)

  1. Download and import the “GetRecordId” solution. (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 works with CRM 2011 on-premise. For other versions of CRM you will need to use the CRM SDK to write your own custom workflow assembly to get a record's ID and use it in a workflow, or find a pre-made one from the CRM community (ie, CodePlex, etc.) ClickDimensions does not support this download and provides it only as an example.

    This sample solution contains a custom workflow activity that we’ll use later. (This is not available for CRM 4.0 or CRM 2013/2015/2016+, though there may be other solutions on Codeplex that will do the same thing.)
    SNAGHTML16fadb3

  2. Next, go to Settings > Processes and click “New” to create a new workflow process:
    SNAGHTML1739016
  3. Set the workflow scope to “Organization” and to start when the case’s record status changes:
    SNAGHTML174e7e5
  4. Add a “Check Condition” step to the workflow:
    SNAGHTML1767bda
  5. Check that the Status Reason of the Case is “Problem Solved”:
    SNAGHTML177d5eb
  6. 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”:
    SNAGHTML184e97b
    Add the “GetRecordId” step, and in the workflow designer, give it a simple name with no spaces such as GetId:
    SNAGHTML1863ca9
  7. Next, add a step to send an email (in this example, it’s a standard CRM email, not a ClickDimensions email):
    SNAGHTML1792a42
    SNAGHTML187594d
    Save your workflow. We need to get the URL of our survey before we compose the email.
  8. Open the ClickDimensions Survey web content record for your case satisfaction survey, and then click the “Design” button:
    SNAGHTML17bb265 
  9. In the Survey designer, click the Embed button to get the link to the survey. Copy the URL of the survey:
    SNAGHTML17ed733      
  10. Go back to your workflow and click the Set Properties button to compose the email. Add a hyperlink to the body of the email:
    SNAGHTML182438c

    SNAGHTML18368e7

  11. The email body will now look like this:
    SNAGHTML1890ddd
  12. 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:
    image

    NOTE: Make sure to remove any blank spaces between the link URL and the RecordId placeholder. Blank spaces will make the link break.

  13. 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:
    SNAGHTML1933856
  14. When the customer completes the survey, the Posted Survey record will be automatically associated with the Case record in CRM:
    image

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.

NOTES:

  • This only works to link Posted Surveys to Case records. There is currently no method to link ClickDimensions surveys to other entities like Opportunities or your custom entities. This is something we are considering as a future enhancement.
  • 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!

About the Author:

Matt Wittemann is a 13-time Microsoft Dynamics CRM MVP and ClickDimensions' Senior Director, Pre-Sales Consulting.

3 Comments

  1. FozzyNZ February 17, 2013 at 5:51 pm - Reply

    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

  2. John Baker August 7, 2013 at 10:01 am - Reply

    Can you do the same linking to a campaign? If so, what is the parameter?

    Thanks

  3. ClickDimensions August 7, 2013 at 3:14 pm - Reply

    John: When you create a survey Web Content record, you can associate it to a CRM Campaign record. Posted Surveys will then be linked to that Campaign record automatically.

Leave A Comment