Out of the box, Salesforce surveys are a great way to solicit feedback from your customers. However, they do come with some limitations. For instance, after setting up your survey questions, the only place you can send your survey to others is from the survey builder itself. Here you are given the option to generate a link or QR code and then manually send it to people. You can also use the email feature on the survey to email it to Contacts or Leads. In both cases, you are required to navigate to the survey first.
But what if you want to send it from another location? Suppose you want to send it from an Opportunity to get feedback on a customer’s experience related to that sale. Or you want to look up a Contact and then send the survey to that Contact directly from the Contact page. And to go even further, what if you want to send surveys automatically to customers once an Opportunity hits a certain stage? None of these options are available out of the box. However, with a little bit of automation, we can set them up.
What You Need
To start, you will need a few components to increase your survey-sending capabilities. You will need:
- A Salesforce Org with Surveys enabled
- A survey with the specific questions you’d like to ask
- A Community (to send surveys to external users, you need a Community to host the survey)
- A custom setting to house parameters specific to the surveys
- Custom fields and relationships on your objects for robust survey reporting and tracking
- An email template that houses the survey link
- An email alert that will send the template
- A flow that will manage all the data in Salesforce. This will create records where needed, trigger the email alert and send the survey when either the button is pressed (# 9 below) or criteria is met (# 10 below)
- A button/action on the object where you want to send the survey (if manually sending a survey)
- A process that will evaluate certain conditions to send a survey (if automatically sending a survey)
Setting Up The Basics
First, create your survey by checking out our article on how to leverage surveys for your business. Because you need a Community to host your survey for external users, make sure you have a Community set up and create a custom setting linking your Community ID to the Survey ID that you just created. This will ensure that your survey will be associated with your Community and that the right survey is sent (in case you have multiple surveys in place).
After that, you need to create custom fields on different objects to link them with the survey you are sending. For the purposes of this article, we will be sending the survey from an Opportunity. To do this, you need an Opportunity lookup field on the Survey Invitation object. Similarly, you will need an Opportunity Contact field on the Survey Invitation so the system knows where to look on the related Opportunity to get the survey recipient information. You will also decide what Contact you want to send the survey to. This will either be through a new Custom Field on the Opportunity or using Contact Roles. All Contacts need a valid email address or the Surveys cannot be sent correctly.
Once you’ve done this, set up an email template with the content you’d like to send to your survey recipients and an email alert to use that email template. While creating the email template, you can merge fields created above to provide more information in the email. This email template and alert will then be referenced in the following flow.
The Flow
Next, you need to create the flow that will actually send the survey. You can do this by creating a flow that:
- Gather Community and Survey information from the Custom Setting
- Gathers all relevant information from the object (in this case Opportunity)
- Creates a Survey Invitation Record
- Populates the Survey Invitation with data from the Opportunity and Community (from steps 1 and 2)
- Populates the Opportunity with the survey link from the Survey Invitation
- Sends out the Email based on the template and alert
Once you have this flow finalized, you will then need to configure components that will launch this flow. In this article, we will cover how to do it manually via a button on an object or automatically by defining send criteria.
Send Survey Button (Manually Sending From An Object)
The send survey button allows you to send a survey from the Opportunity object without having to navigate to the survey and manually enter an email address. To create this button:
- Navigate to the Object Manager and select Opportunity.
- Click on Buttons, Links, and Actions.
- Click New Action.
- Set Action Type to Flow
- NOTE: the Record ID is passed as a record Id variable on the Flow. Please be sure to have this variable in place.
- Choose the flow we created earlier from the dropdown menu
- In the Label field, type in the name you want to appear on the button
Now, when a user clicks on the button, it will launch the flow and send the survey via email!
Send Survey Process (Automatically Sending When Criteria Is Met)
On the other hand, if you want to configure an automated process, you can use the process builder. For this example, we want the survey to be sent automatically once an Opportunity moves to stage Closed Won. To create this process:
- Navigate to the Process Builder
- Create a new process on the Opportunity
- Set it to evaluate when Opportunity is created or edited
- Add decision criteria to determine if the Opportunity stage moves to Closed Won
- When the criteria become true, launch the flow created earlier
Now, when an Opportunity enters the stage Closed Won, a survey will automatically be sent!
Setting Up All Of The Extras
So you’ve automated your surveys and created ways to send them from objects – now what? Surveys are all about collecting data, and there are many ways to use this data to fuel business decisions. However, in order to create reports and dashboards that draw on the surveys you’ve sent above, you need to create custom report types. When it comes to this, there are many different use cases and many different reports that you can use.
If you’d like help setting up these analytics, reach out to Ntegro online! We can help you create comprehensive reports and dashboards to get the most out of your survey data. If you need help setting up any of the above processes, flows, or other survey automation, we can make that happen for you as well. Just get in touch with our team for a demo, consultation, or quick call, and we’d be happy to help!