Build a Flow to Send Survey Invitations
Learning Objectives
After completing this unit, you’ll be able to:
- Describe how automation can help support teams.
- Create a flow to send surveys when a record changes.
- Select a survey and recipient for the flow.
- Activate a flow.
Why Automate Survey Invitations?
Ursa Major Solar, Inc., a supplier of solar solutions, is doing great: Sales figures are impressive, service is customer-approved, and employees are happy. As a customer-centric company, Ursa Major Solar always uses customer feedback to identify weak links, reinforce strengths, and recalibrate operations. And it uses surveys to collect customer feedback, measure customer sentiment, and promote engagement.
But as the company pursues higher glory, one area needs attention, and is worrying Carlos Sanchez, the support team lead. Whenever a support case is closed, the support agent sends out a CSAT (Customer Satisfaction Score) survey to the customer and watches for a response. If there’s no response after a week, the agent sends a reminder email requesting the customer to take the survey. This process of sending survey invitations and reminders is manual, and therefore resource-heavy and error-prone. It also dilutes the team’s focus on core areas. Carlos realizes that if the process is automated, his team can save time and focus better on handling customer requests, complaints, and queries. Automation is the need of the hour!
Want to Get Hands-on with Salesforce Surveys?
In this module, we show you the steps to automate survey invitations using Salesforce Flow. We don’t have any hands-on challenges in this module, but if you want to follow along and try out the steps, here’s how to launch your Trailhead Playground. First, make sure you’re logged in to Trailhead. Then click your user avatar in the upper-right corner of this page and select Hands-on Orgs from the dropdown. Click Launch next to the org you want to open. Or, if you want to create a new playground, click Create Playground.
Create a Flow to Identify Closed Cases
Carlos gets in touch with Maria Jimenez, the Salesforce admin at Ursa Major Solar. Maria understands that Carlos wants to automate survey invitations and reminders. When a support case is closed, they want a survey to be sent to the customer automatically. They need a no-code solution that starts a behind-the-scenes process when a record is updated, and Maria has a magic wand. Well, almost a magic wand.
Using Salesforce Flow, Maria can automate survey invitations for Carlos’ team. Surveys are a part of Salesforce Flow, so no additional license, cost, or setup is required! Just make sure you enable Surveys in Setup. Maria decides to set up a criteria-based flow that runs whenever a service case is closed. Here’s how she does it.
- Click and select Setup.
- Enter
Flows
in the Quick Find box, then select Flows.
- Click New Flow.
- Make sure Start from Scratch is selected, and click Next.
- Select Record-Triggered Flow and click Create.
- On the Configure Start screen, select Case as the Object.
- For Trigger the Flow When, select A record is updated.
- For Entry Conditions, select All Conditions Are Met (AND) and define the condition:
Field: Status
Operator: Equals
Value: Closed
- Select Only when a record is updated to meet the condition requirements.
- Below Optimize the Flow for, select Actions and Related Records.
- Click to close the panel.
Maria configured a flow that’s triggered when there’s a change in the status of an open case. She’s specified that whenever the status is updated to closed, the flow sends out a survey. But she must select an active survey and configure the flow to choose the case contact as the recipient.
Select a Survey and its Recipient
Here’s what Maria does to specify the survey and its recipient.
- On the flow canvas, hover over and click . Select Action.
- In the New Action window's side panel, select Surveys.
- In Action, select the Customer Satisfaction survey.
- In the Label field, enter
CSAT Survey
. The API Name is automatically set to CSAT_Survey.
- For Survey Subject, click + New Resource and select Variable as the Resource Type.
- Enter
Subject
as the API Name.
- Select Text as the Data Type.
- In Default Value, enter
{!$Record.Id}
and click Done.
- For Recipient Type, select Contact.
- In the Recipient field, click + New Resource and select Variable as the Resource Type.
- Enter
Case Contact
as the API Name.
- For Data Type, select Text.
- In Default Value, enter
{!$Record.Contact.Id}
and click Done. The variable name populates the Recipient field.
- Select Unique link and Don't require authentication.
- Select Invitation expires in days and enter
7
in the text box.
- Click Done and save the flow. In the Flow Label field, enter
CSAT Flow
. The API Name is automatically set to CSAT_Flow.
- Click Save.
Let’s look at what some of the selections mean.
-
Unique Link: Each contact is sent a unique link, which helps to map the response to the recipient’s contact ID.
-
Anonymize responses: The survey doesn’t attribute the response to the respondent.
-
Don't require authentication: The recipient can take the survey without logging into their account. All they must do to take the survey is click the survey link.
The Right Permissions
Maria must enable the right permissions for flows. Here’s what she does.
- Click and select Setup.
- Enter
Experiences
in the Quick Find Box.
- Below Digital Experiences, click All Sites.
Note: You must enable digital experiences in your org to see the All Sites option. Maria has already enabled digital experiences in her org for Ursa Major. She has also created a site called Ursa Major Surveys. To learn how to enable Digital Experiences and set up a site, see Set Up an Experience Cloud Site.
- Click Builder for the site Ursa Major Surveys.
- Click and under Guest User Profile, click the site Ursa Major Surveys.
- On the Profile page, click Edit and navigate to Standard Object Permissions.
- Select Read for Surveys and Survey Invitations, and for Survey Responses, select both Read and Create.
- Click Save.
It’s Test Time
Maria created a flow that sends survey invitations to customers when their support cases are closed. Customers get 7 days to take the survey, after which the link expires. To test the flow, she activates it and updates the status of an open case. Here’s how she does it.
- Click Activate on the header of the flow bar in Flow Builder.
- Click to open the App Launcher, enter
Cases
in the search box, and select Cases.
- Click the dropdown on the top and select All Open Cases.
- Click any open case record and update its status to Closed. The case contact gets an email with the CSAT survey invitation within moments.
Maria has already added the Surveys Invitations & Responses Related List to the page layout. To learn how to do that, check out the Add the Survey Invitations and Responses Related List to Objects.
The Closed status for a case isn't automatically available. Maria needs to enable this in Setup. Here's how she does it.
- Click and select Setup.
- Enter
Support Settings
in the Quick Find box and click Support Settings.
- In the Support Settings page, click Edit.
- Enable Show Closed Statuses in Case Status Field.
- Click Save.
In the next unit, follow along as Maria automates survey reminder emails.
Resources
- Salesforce Help: Send Survey Invitations Using Flows
- Salesforce Help: Flow Core Action: Send Surveys
- Salesforce Help: Flow (Experience Builder Component)