Skip to main content

Salesforce

Automating the Survey Invitations with Flows

Bulk user profiles from laptop

Hello Trailblazers!

With Salesforce Survey, gaining valuable insights and feedback from your audience becomes a seamless and insightful experience. In this blog post, we’ll learn how we can Automate Survey Invitations with the help of Flows.

This innovative capability empowers you to integrate surveys into your Salesforce Flows effortlessly, ensuring timely and targeted feedback collection. So say goodbye to manual processes and hello to a smarter, more automated approach to gathering and analyzing customer input.

Before you Begin:

This is the Part 4 of the Salesforce Survey Blog Series. You can go with these links if you are unfamiliar with “What is Salesforce Survey?” and “How to Send Salesforce Survey Invitations to Customers?”.

So, let’s get started.

Salesforce Flows

As we know, Salesforce Flow Builder has revolutionized business processes by providing a user-friendly, visual interface. It allows organizations to automate and solve complex workflows without the need for extensive coding. With its drag-and-drop functionality, Flow Builder empowers business users to design, execute, and manage complicated processes seamlessly.

So, here too, we are using these functionalities of Flows to automatically send Survey Invitations.

Create a Flow   Img1

We have our Survey form ready, which is the “Shopping Website Survey,” which will survey for its Orders or Products. We have here a Custom Object “Order__c” and there is a custom picklist field called “Status__c”.

When the order status is “Delivered or Closed”, the flow automatically sends a Survey form to the respective customers.

Follow these steps to create a flow:

  1. Go to the Setup.
  2. Enter Flow in the quick find box and select “Flows”.
  3. Click New Flow.
  4. Select Record-Triggered Flow and click Create.
  5. Select Order as an object.
  6. Select A record is updated in the Configure Trigger Section. (As flow should trigger when the record will update to Delivered or Closed)
  7. For the Entry Conditions criteria, select Any Condition is Met (OR) and define the conditions as shown below:
    Condition 1:-
    Field: Status__c
    Operator: Equals
    Value: DeliveredCondition 2:-
    Field: Status__c
    Operator: Equals
    Value: Closed
  8. Select Only when a record is updated to meet the condition requirements once done with specified conditions.
  9. Select Actions and Related Records in the Optimize the Flow for section.
  10. Click Done or Click the “Close” sign at the top right as per the new updates.

Your flow will look like this:

Img2

 

Add New Resources to the Flow

Here, we’ll create two resources that we will use to set up the flow.

  1. Click “Toolbox” at the extreme top-left beside the “Select Element” box.
  2. Select New Resource.
  3. Select Variable as the resource type.
  4. Enter Context as the API Name.
  5. For Data Type, select Text.
  6. In the Default Value, enter {!$Record.Id}.
  7. Click Done.
  8. Click New Resource.
  9. Select Variable as the resource type.
  10. Enter Recipient_mail as the API Name.
  11. For Data Type, select Text.
  12. In Default Value, enter {!$Record.OwnerId}. (This default value may vary. Remember that you have to send mail to the owner of that record only. So, it will be the Owner’s ID)
  13. Click Done.

Add an Action to the Flow

In this step, we’ll add an action to the flow that will trigger the survey invitation once an order is set to “delivered or closed”. But in this action, we will use our created survey.

Follow the below steps to create an action in Flow:

  1. In the Flow Builder page, click + under the Start element (below Rum Immediately) and select Action.
  2. In the New Action, keep the Category on “Filter By”, scroll down, and select Surveys. The available surveys will populate in the Action Search Bar.
  3. Select Survey. Here I’m selecting the “Shopping Website Survey”, that we’ve created in the previous part of this blog.
  4. In the label, enter “Send Survey Invitation to Product Owners”. API name will automatically be populated.
  5. In the Survey Subject field, select “Context”, a resource that we already created.
  6. For Recipient Type, select User in Your Org.
  7. For the Recipient value, select the created resource called “Recipient_mail”.
  8. After, select the Unique link checkbox.
    It should look like this.Img3
  9. Click Done.
  10. Save the Flow. Enter the flow label as “Automate Survey Invitation Flows”. Its API name will set automatically.
  11. Click Save and Activate.

Your flow will look like this…

Img4

 

Test the Flow

With this, we created a flow to send survey invitations automatically. Now, to test the flow, create an order and set its Status field equal to Delivered or Closed.

  1. Click the “App Launcher” icon.
  2. Enter “Orders” in the search box, and select Orders.
  3. Click New.
  4. Enter Order Name: “Test Order”.
  5. Select Status__c: “In-Process” and click Save.
    An order will be created.
  6. Again click on the same order, and update Status__c: “Delivered”.

 

Explanation

We implemented this approach because the flow is set to trigger “After the record is updated.” Consequently, when an order is created, it progresses through each status step, including in-process, shipped, and dispatched, until it reaches its final state of being delivered or closed. And, as the status condition matches to “Delivered or Closed”, the survey form will go to the product owner.

Otherwise, you can change the previous condition, i.e., Configure the trigger to “A record is created” for testing purposes only because this will directly hit the flow when you create a new record and the status condition matches.

Note: The flow we designed here specifically targets “Participants in your Company,” ensuring that only authorized users receive survey invitations, and not “Participants Outside your Company”. If there is a need to send invitations to external users, as previously discussed, you can refer to the below provided links for guidance.

So, in this way, we learned to send the survey forms automatically to the customers with the help of Salesforce Flows.

Thus, you can accumulate numerous survey responses and subsequently analyze them. How to do it? We already discussed it in the previous part of this blog.

Happy Reading!

“Expand your horizons with every click because reading is the gateway to continuous learning and growth.”

References:

  1. Salesforce Survey Basics
  2. Create Salesforce Survey

You Can Also Read:

  1. An Introduction to Salesforce CPQ
  2. Salesforce CPQ and its Key Features
  3. Unlocking the Power of AI: Einstein for Developers
  4. Revolutionizing Customer Engagement: The Salesforce Einstein Chatbot

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Abhinav Masane

Abhinav Masane is an Associate Technical Consultant at Perficient based in Nagpur. He is a Salesforce Certified Associate and Developer. Abhinav is always keen to learn and explore new technologies.

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram