Skip to main content

Automate Your Survey Invitations

Learning Objectives

After completing this unit, you’ll be able to:

  • Create a flow on the Opportunity object.
  • Automate a survey invitation.

Make a Copy

Ursa Major Solar is growing at an unbelievable pace, all thanks to its sales reps. And it’s important to take feedback from sales reps about opportunities that are won or lost. Gabriela wants to send the customer satisfaction survey to sales reps every time an opportunity is lost or won. 

Maria tells her that they can create a Salesforce Flow to automate the survey invitations. But Maria must first make a copy of the customer satisfaction survey and activate it for the flow. Here’s how she does that.

  1. Click App launcher to open the App Launcher, enter Surveys in the search box, and select Surveys.
  2. Click the dropdown arrow on the right for the Customer Satisfaction survey.
  3. Select Open Latest Version.
  4. On the Survey Builder page, click three dots and select Make a Copy.
  5. Name the copy: CSAT 01
  6. Click Make a Copy.
  7. Click three dots and select Default Settings.
  8. Click Email Templates and select Embed_a_Survey_Link.
  9. Click Save.
  10. Click Activate.

If you don’t see the option to select Embed_a_Survey_Link in Email Templates, do the following.

  1. From the App Launcher, find and select Email Templates.
  2. Click the dropdown menu next to Embed_a_Survey_Link and select Edit.
  3. Click Save.

Create a Flow on the Opportunity Object

Having set up the survey, Maria creates a flow on the Opportunity object.

  1. Click Setup and select Setup.
  2. Enter Flows in the Quick Find box, then select Flows.
  3. Click New Flow.
  4. Make sure Start from Scratch is selected, and click Next.
  5. Select Record-Triggered Flow and click Create.
  6. Select Opportunity as the Object.
  7. In the Configure Trigger section, select A record is updated.
  8. For Entry Conditions, select Any Condition is Met (OR) and define the conditions:
    • Condition 1
      • Field: StageName
      • Operator: Equals
      • Value: Closed Won
    • Condition 2
      • Field: StageName
      • Operator: Equals
      • Value: Closed Lost
  9. Select Only when a record is updated to meet the condition requirements.
  10. In the section Optimize the Flow for, select Actions and Related Records.

The Configure Start window showing the configuration of a flow.

Add New Resources

Next, she creates two resources that she will use to set up the flow.

  1. Click Toolbox and select New Resource.
  2. Select Variable as the Resource Type.
  3. Enter Context as the API Name.
  4. Select Text as the Data Type.
  5. In Default Value, select Triggering Opportunity then select Opportunity ID. The field should change to Triggering Opportunity > Opportunity ID.
  6. Click Done.
  7. Click New Resource.
  8. Select Variable as the Resource Type.
  9. Enter Participant as the API Name.
  10. Select Text as the Data Type.
  11. In Default Value, select Triggering Opportunity, then select Owner ID (the one that doesn’t have a > at the end of the line). The field should change to Triggering Opportunity > Owner ID.
  12. Click Done.

Add an Action

The last step is to add an action that triggers a survey invitation once an opportunity is closed. Here’s what Maria does.

  1. On the flow canvas, on the path after the Start element, click Add Element. Select Action.
  2. In the Search… field, enter csat.
  3. Select the csat_01 action.
  4. In the Label field, enter Send Survey Invitation to Sales Reps. The API Name is automatically set to Send_Survey_Invitation_to_Sales_Reps.
  5. In the Survey Subject field, select Context.
  6. For Recipient Type, select User in Your Org.
  7. For Recipient, select Participant.
  8. Select Unique link.

The New Action window with the key fields filled in.

  1. Save the flow. In the Flow Label field, enter Survey Invitation on Opportunity Closure. The API Name is automatically set to Survey_Invitation_on_Opportunity_Closure.
  2. Click Save.
  3. Click Activate.

Create an Opportunity

To test the flow, Maria creates an opportunity and sets its stage to Closed Won.

  1. Click App launcher to open the App Launcher.
  2. Enter Opportunities in the search box, and select Opportunities.
  3. Click New.
  4. For Opportunity Name, enter Test Opportunity.
  5. For Close Date, select the current date.
  6. For Stage, select Closed Won.

After the opportunity is closed, an email invitation for the CSAT 01 survey is sent to the sales rep. The invitation and response records are also available in the Survey Invitations and Responses list on the Related tab of the opportunity record. In the next unit, we’ll find out how to analyze survey responses.

Resources

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback