Have Questions? (800) 609-6480

Auto-sending a survey when a SalesForce case closes


Version 3.x Instructions
Optional: Go to the SurveyGizmo version 2.x instructions

A common request from customers who use SalesForce.com is to be able to email a survey whenever a case is closed. While this is not technically a SurveyGizmo feature per se (all the setup is done in SalesForce), we thought we’d show you how it’s done. If you haven’t already, you might also want to check out our main SalesForce.com survey integration tutorial.

First, get your survey link from SurveyGizmo.

  1. Log into SurveyGizmo and go to the survey you want to send.
  2. Click the Publish tab.
  3. Create a new Web Link and use the Sub-Type: Short Link, saving your link. Copy that new link.
  4. salesforce - short link

Now create an email template in SalesForce.com.

  1. Click Setup » Email » My Templates.
  2. Click the New Template button.
  3. Select text or HTML.
  4. Give the template a name like “Auto-emailed customer service survey.”
  5. Write in your salutation and explanatory text, then paste in the url for the survey.
  6. If you’d like to track the particular case id this survey is associated with, you can append it to the url as a query string like so. The part in red is the query string you append, and it’s telling SalesForce to merge the case id into the url. (You may also want to read our tutorial about query strings in surveys.)

    http://www.surveygizmo.com/s/31114/zn0oi?caseid={!Case.Id}

  7. Save your new template.
  8. Now go to Cases » Auto-Response Rules.
  9. Click the New button.
  10. Give the rule a name like “Auto-send survey when case closes,” check “Set this as the active Case Auto-Response rule” and save the rule.
  11. Click on the rule name. Under Rule Entries, click New.
  12. Set criteria to trigger this rule when a case is closed. (You may have defined your own custom status settings. If so, use whichever status is most meaningful to your business processes.)
  13. Also specify the From name and email address, and chose the email template you created earlier.
    Detail of SalesForce's Autoresponse Rule Editor
  14. Click Save

Note that with this rule the survey will be sent every time a case is closed. If you re-open the case and then close it again, the survey will be sent again.

Now you’re ready for testing.

  1. Go into Cases and create a new case with your email address for the contact info.
  2. Save it with the status New (or anything besides Closed).
  3. Now edit the case and change the Status to closed.
  4. Check your email. If all is set up correctly, you will receive the email template you set up previously. It will contain a link to the survey that includes the case id appended to the end.

Advanced – Merging in a Support Rep’s Name

The approach above is good for getting general feedback, but what if you want to see results by support rep? It requires a little more work, but this is entirely possible.

Note that the method below assumes the user who closes the survey in SalesForce is the representative whose performance you want to measure.

First you’ll need to create a custom field in your users table. This is necessary to properly merge your user’s name into the survey URL

  1. Click Setup » Users » Fields.
  2. At the bottom of the Fields list, click New.
  3. Select Formula and click Next
  4. Give it a label like “URL version of user name,” then select Text under Formula Return Type.
  5. Now go back to your email template under Email » My Email Templates, and add this field to the end of the survey url as the variable name rep (make sure to separate it from any other parameters with an ampersand). The url will look something like this:
    http://www.surveygizmo.com/s/31114/zn0oi?caseid={!Case.Id}& rep={!User.yourcompany__URL_version_of_user_name__c}
    Detail of SalesForce Email Template Editor
  6. Now when the link is clicked the variable “rep” will automatically be stored with the response. When doing your reporting you can filter on this value to see how each representative is performing.

Special thanks to Glenn and Murray Elliot at MyriadMinds in the great country of Australia for assistance with that url encoding trick.

Version 2.x Instructions

A common request from customers who use SalesForce.com is to be able to email a survey whenever a case is closed. While this is not technically a SurveyGizmo feature per se (all the setup is done in SalesForce), we thought we’d show you how it’s done. If you haven’t already, you might also want to check out our main SalesForce.com survey integration tutorial.

First, get your survey link from SurveyGizmo.

  1. Log in to SurveyGizmo and go to the survey you want to send.
  2. Click the Publish tab.
  3. Copy the short link version in the Alternate Link Styles section (technically any link there should work, but short link is safest because some email clients incorrectly break long urls across two lines).
  4. SurveyGizmo Publish Tab Detail

Now create an email template in SalesForce.com.

  1. Click Setup » Email » My Templates.
  2. Click the New Template button.
  3. Select text or HTML.
  4. Give the template a name like “Auto-emailed customer service survey.”
  5. Write in your salutation and explanatory text, then paste in the url for the survey.
  6. If you’d like to track the particular case id this survey is associated with, you can append it to the url as a query string like so. The part in red is the query string you append, and it’s telling SalesForce to merge the case id into the url. (You may also want to read our tutorial about query strings in surveys.)

    http://www.surveygizmo.com/s/31114/zn0oi?caseid={!Case.Id}

  7. Save your new template.
  8. Now go to Cases » Auto-Response Rules.
  9. Click the New button.
  10. Give the rule a name like “Auto-send survey when case closes,” check “Set this as the active Case Auto-Response rule” and save the rule.
  11. Click on the rule name. Under Rule Entries, click New.
  12. Set critera to trigger this rule when a case is closed. (You may have defined your own custom status settings. If so, use whichever status is most meaningful to your business processes.)
  13. Also specify the From name and email address, and chose the email template you created earlier.
    Detail of SalesForce's Autoresponse Rule Editor
  14. Click Save

Note that with this rule the survey will be sent every time a case is closed. If you re-open the case and then close it again, the survey will be sent again.

Now you’re ready for testing.

  1. Go into Cases and create a new case with your email address for the contact info.
  2. Save it with the status New (or anything besides Closed).
  3. Now edit the case and change the Status to closed.
  4. Check your email. If all is set up correctly, you will receive the email template you set up previously. It will contain a link to the survey that includes the case id appended to the end.

Advanced – Merging in a Support Rep’s Name

The approach above is good for getting general feedback, but what if you want to see results by support rep? It requires a little more work, but this is entirely possible.

Note that the method below assumes the user who closes the survey in SalesForce is the representative whose performance you want to measure.

First you’ll need to create a custom field in your users table. This is necessary to properly merge your user’s name into the survey URL

  1. Click Setup » Users » Fields.
  2. At the bottom of the Fields list, click New.
  3. Select Formula and click Next
  4. Give it a label like “URL version of user name,” then select Text under Formula Return Type.
  5. Now go back to your email template under Email » My Email Templates, and add this field to the end of the survey url as the variable name rep (make sure to separate it from any other parameters with an ampersand). The url will look something like this:
    http://www.surveygizmo.com/s/31114/zn0oi?caseid={!Case.Id}& rep={!User.yourcompany__URL_version_of_user_name__c}
    Detail of SalesForce Email Template Editor
  6. Now when the link is clicked the variable “rep” will automatically be stored with the response. When doing your reporting you can filter on this value to see how each representative is performing.

Special thanks to Glenn and Murray Elliot at MyriadMinds in the great country of Australia for assistance with that url encoding trick.

Have you tried SurveyGizmo yet? Try our 14 day free trial

The Survey Expert Blog

By

Why Survey Design Matters for Feedback Surveys

February 3 2012 -

Survey Expert Ryan Farmer observes that many well-known companies aren’t branding their surveys, and discusses why survey design is hyper-important when you want to gather customer feedback.

By

New Team Management & User Permissions System

Starting February 2nd, SurveyGizmo is launching a new set of user management features. Learn more about them here!

By

5 Questions with SurveyGizmo co-founder and CEO Christian Vanek

Boulder’s Daily Camera newspaper interviews Christian Vanek, who shares what’s next for the company.

More from our Survey Experts