Skip to main content

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!

An image depicting the automation of surveys. Two robotic hands are adjusting survey elements on a computer screen.

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. 

  1. Click Setup and select Setup.
  2. Enter Flows in the Quick Find box, then select Flows.
  3. Click New Flow and select Record-Triggered Flow.
  4. Click Create.
  5. On the Configure Start screen, select Case as the Object.
  6. For Trigger the Flow When, select A record is updated.
  7. For Entry Conditions, select All Conditions Are Met (AND) and define the condition:
    Field: Status
    Operator: Equals
    Value: Closed
  8. Select Only when a record is updated to meet the condition requirements.
  9. Below Optimize the Flow for, select Actions and Related Records.
  10. Click Close to close the panel.

The Configure Start panel showing the configuration of a flow in the Flow Builder to identify service cases marked as Closed.

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. 

  1. On the flow canvas, hover over Add Element and click Add Element . Select Action.
  2. In the New Action window's side panel, select Surveys.
  3. In Action, select the Customer Satisfaction survey.
  4. In the Label field, enter CSAT Survey. The API Name is automatically set to CSAT_Survey.
  5. For Survey Subject, click + New Resource and select Variable as the Resource Type.
  6. Enter Subject as the API Name.
  7. Select Text as the Data Type.
  8. In Default Value, enter {!$Record.Id} and click Done.
  9. For Recipient Type, select Contact.
  10. In the Recipient field, click + New Resource and select Variable as the Resource Type.
  11. Enter Case Contact as the API Name.
  12. For Data Type, select Text.
  13. In Default Value, enter {!$Record.Contact.Id} and click Done. The variable name populates the Recipient field.
  14. Select Unique link and Don't require authentication.
  15. Select Invitation expires in days and enter 7 in the text box.
  16. Click Done and save the flow. In the Flow Label field, enter CSAT Flow. The API Name is automatically set to CSAT_Flow.
  17. Click Save.

The Edit customer satisfaction core action window with the Survey Subject, Recipient Type, and Recipient fields filled in.

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.
Note
 You can only select one option between Unique Link and Anonymize responses, not both. When you select one, the other gets grayed out.

The Right Permissions

Maria must enable the right permissions for flows. Here’s what she does. 

  1. Click Setup and select Setup.
  2. Enter Experiences in the Quick Find Box.
  3. 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.
  4. Click Builder for the site Ursa Major Surveys.
  5. Click Setup and under Guest User Profile, click the site Ursa Major Surveys.
  6. On the Profile page, click Edit and navigate to Standard Object Permissions.
  7. Select Read for Surveys and Survey Invitations, and for Survey Responses, select both Read and Create.
  8. 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.

  1. Click Activate on the header of the flow bar in Flow Builder.
  2. Click App launcher to open the App Launcher, enter Cases in the search box, and select Cases.
  3. Click the dropdown on the top and select All Open Cases.
  4. Click any open case record and update its status to Closed. The case contact gets an email with the CSAT survey invitation within moments.


A case record page showing survey invitations and responses and the status as closed.

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.

Note

To close a case, Maria needs an active Experience Cloud site assigned for sending survey invitations to participants outside the organization. To test this flow in your Trailhead org, you can send it to users within your organization.

The Closed status for a case isn't automatically available. Maria needs to enable this in Setup. Here's how she does it.

  1. Click Setup and select Setup.
  2. Enter Support Settings in the Quick Find box and click Support Settings.
  3. In the Support Settings page, click Edit.
  4. Enable Show Closed Statuses in Case Status Field.
  5. Click Save.

In the next unit, follow along as Maria automates survey reminder emails.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities