Red Argyle Logo

Patterns
The Salesforce Blog with Tailored Goodness

Utilizing Salesforce Surveys in 2020

A few releases ago Salesforce gave us a native Survey application and there was much rejoicing! But they were a little bit beta and tied to paid licenses and there was gnashing of teeth. But then Salesforce put in a lot of elbow grease and released a lot of powerful improvements and made Surveys more robust and free, and again there was much rejoicing!

Now is a great time to get started with Salesforce Surveys. If you’ve been on the fence or tried them and found they were missing a feature you needed you may be surprised by all of the improvements. We’ve recently implemented a few different takes on Surveys and have found some useful pieces of information for anyone getting started with their own Surveys.

Surveys are created in an intuitive user interface. You have some easy styling options, like font and text and colors, and you can add background images. You can pick from a handful of question types (rating, free text, radio buttons, etc.), and you suddenly have a survey!

What may not be intuitive is that, similar to Knowledge Articles, each Survey can have multiple versions, only one of which can be active at a time. So before you can make any modifications to a Survey that has been made active you must first make a new version (a draft) of the current Survey. 

Working with  Surveys

Potential Error:
You can’t activate this survey version. Either another version is referenced by one or more objects or you don’t have the required permissions.

If you get an error message when you try to activate a new version it may be because you have the current version tied to an automation in Process Builder. The only way to get a new version active is:

  • Delete the current action in Process Builder
  • Activate the new version of the Survey
  • Recreate the action in Process Builder

Note that this only occurs when you are using the standard “Send Survey” action and will not occur if you are using a customized process like the one outlined below.


Sending Surveys

The most common use case for a survey is a Customer Satisfaction survey. This means sending a survey after a customer interaction and sending it to someone that is not a User inside of your Salesforce Org. Sounds simple enough right?

Send Strategy

We could send out a survey every time a Case is closed, for example, but people might get tired of them, which could lower our CSAT scores!  How about if we send on every 5th Case Closed? What if we want to take into account the last time someone received a Survey? We shouldn’t send them a survey if they have received one in the last 90 days. Can an administrator set the number of days? Can we protect ourselves from sending out surveys when we do a mass import or bulk update Cases? These are a few of the scenarios that we have solved for our clients recently using Custom Apex, Custom Metadata, Flow, Formula Fields, and Process Builder. When building your solution it is important to first determine your business strategy behind the send.

Sending outside of your Org

Now that you’ve got your strategy straight it’s time to determine your mechanism. It’s important to first note that sending to recipients that are not Users requires you to have a working Salesforce Community. 


Community Considerations

The Community does not have to be fully fleshed-out and have a million features, it just has to exist. It’s not rocket science to set up a Community but if you don’t have any experience with Communities it can be a daunting amount of information and you may not know where to start. There are a few important bits to know, however.

  • The Community must be Public
  • The Community User Profile must have access to the required Survey objects
  • Don’t use the Help Center template. It currently does not show the option to make the Community Public or Private. If you already have a Community and it uses the Help Center template you can either change the template (which will delete all of your Pages) or you can create a new Community just for the Survey(s) you are sending.
  • The Community must be set as the default Community in Setup->Survey Settings

Sending Surveys from organization-wide addresses using Email Alerts and Email Templates

Another consideration is that if you are using automation, i.e., Process Builder, to automatically send Surveys using the newly-released Survey Action the Survey will be sent from the current User, the User that triggered the automation. This is currently not configurable. If you have a requirement to send Surveys from specific email addresses you’ll need to customize your sending mechanism. 


  1. Create a Process on the object from which the Survey should be sent.
    We used the Cases object. When a Case was Closed we fired a Process that created a Survey Invitation Record. When creating the Survey Invitation you will likely want to populate custom fields (one of which is an Email data type) on the Survey Invitation that will inform the following process. We linked the Survey Invitation to Person Accounts, the originating Case, and a custom object.

  2. Create a Process on the Survey Invitation.
    When a Survey Invitation is created we use the key fields populated in the previous Process to send an Email Alert. This Email Alert uses the Email field, along with values from the other custom fields, in order to send a customized email to the recipient. 

Security and Schema Considerations

We can’t do much without granting access to all of our new Survey-related objects! When you’re granting access to internal Users who will be sending Surveys don’t forget that per Salesforce Help they must have Created, Read, Update and Delete for all four objects! This was somewhat surprising to me but hey, who am I to argue with a Salesforce Help article? 

In addition to that, you have to give access to the Community User Profile that will be used. Here we just need Read on Surveys, Read on Survey Invitations, and Read, Create and Edit on Survey Responses.

If you work in an org where security concerns are paramount you’ll want to make sure to take these permissions into account.

Survey Responses

Great! You’ve determined when and how you’re sending, and you’re ready to send, right? Hold the horses! What if someone has an extremely positive or negative response? You want to alert someone!

If Survey Responses are anonymous you’ll find that the Community User Profile that is used by the anonymous recipient cannot affect changes to the Survey Invitation object. They can only affect the Survey Question Response object. So we need a creative way to have that interaction trigger a notification inside of Salesforce. 

Our solution was to have a Survey Question Response record creation trigger a Flow. The Flow looks at the value of the Survey Question Response to check if it was extremely good or bad and, if so, updates a value on the related Survey Invitation. Next, a Process on the Survey Invitation object notices this change and sends an Email Alert to a User that we related to the Survey Invitation in an earlier step. A Chatter post or a custom notification or a Report subscription could also be used.

Summary

Salesforce seems to be very actively developing the Survey product. It’s been exciting to watch it through the last few releases. They’ve implemented some key functionality like Net Promoter Scores and made it easier to send Surveys using the new Process Builder action. If you’re just getting started with Salesforce Surveys make sure you plan and research first!


Leave a Comment

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