Think. Build. Salesforce Solutions.

Salesforce Consulting Services across Salesforce Clouds & Across App Lifecycles


Dive deep into Salesforce Survey

By |2023-02-22T09:20:12+00:00January 27th, 2023|

The Survey in Salesforce provides an efficient way to gather feedback from customers. The process to build a survey is easy with the survey builder providing ready-to-use Question types namely- Date, Like or Dislike, Long Text, Multiple Selection, Net Promoter Score, Picklist, Ranking, Rating, Score, Short Text, Single Selection Slider.

The survey data such as responses, participant’s name, survey questions, etc. Are stored in the org. This is helpful in retrieving the records by means of reports and dashboards.

Survey is a standard object in Salesforce that can be accessed from the app launcher.

Salesforce Survey

Pre-requisite and behind the scenes:

Survey Settings:

Survey must be enabled in the salesforce org. This can be done from survey settings available in set up by searching Survey settings in Quick find box.

Once the survey is enabled, we have 2 ready to use surveys created by Salesforce – Net Promoter Score and Customer Satisfaction

There are also two lightning Email templates created by default when survey is enabled- Embed_a_Survey_Link and Embed_a_Survey_Question.

Permission and access:

The tab setting for Survey should be set to Default On for the profile who should have access to survey.

For the users who want to create and access survey, CRED permission must be given through a profile or Permission set on Survey objects- Survey Invitations, Survey Responses, Surveys, Survey Subjects

Default Community:

In order to send the survey to non-internal users like contact or lead, and unauthenticated users, a default community must be selected. This is useful in creating public survey invitations. Also, ensure that the Guest user profile of the community has read access to Survey and Survey Invitation object and Read and Edit access to Survey Responses.

Send Survey invitation using flow:

Requirement: Send survey invitation to the contact of a case when case is Closed.


Flow type: Record-triggered flow

Configure start:

Object: Case

Trigger the flow when: A record is created or updated.

Entry Condition: Case Status equals Closed.

Salesforce Surveys

The action component Survey is available in the flow.

Salesforce Survey

In the survey action, we can select the desired survey and provide the following details

Label: Action Label

API Name: Auto populates after label is filled, can be changed

Description: Add a description of the survey action (Optional)

Survey subject: To get all the case record, we created a text variable with value {!$Record.Id}

Recipient Type: we select contact as recipient type as per our requirement.

Note: Contact and Lead recipient type is applicable only when default community for creating public survey invitations is selected. When the default community is set to none, the flow will fail.

Recipient: Contact Id associated with case, a resource variable of type text with value {!$Record.Contact.Id}

Unique Link: Each recipient receives a unique link, and each response record is associated with the recipient’s name.

Anonymize responses: The response does not get mapped to any recipient.

Don’t require authentication: Allow to open survey without any authentication.

Invitation expires in days: Set the number of days within which the survey link will expire.

SF Survey

Test case:
Salesforce Surveys
Case Status: Closed
Contact is present with a valid email address.
Result: Survey is sent to the contact’s email address.

SF Surveys

On clicking the Open Survey button, a new tab containing the survey is opened.

Salesforce Surveys

Email Settings of survey:

  • The Email setting for survey is available in the Default setting obtained by clicking the more option on Survey builder.SF Surveys
  • Content: It could be a survey link or a survey question.
  • Email Template: This includes “Embed_a_Survey_Link” email which is automatically created when survey in enabled in the org. This email template contains a link to a survey. In the Survey Email Template, the primary object is “Survey Question” so we can only use merge fields from this specific object. When we use merge fields from other objects, the survey invitation email won’t work properly. We must take into consideration that survey link and Question merge fields must not be edited or removed.
  • Email Sender Address: The email address used to send survey invitations to participants. The org-wide email addresses are available here.

Survey Invitation and Responses in Record Page:

With Survey details present in Lightning record page, it becomes very convenient to access the response of the customers.

Survey Invitation and response is available in the page layout of the object.
Select the object from the object manager and go to the page layout. In the related list section, Survey invitation and responses is available which can be dragged and dropped to related list section.

Salesforce Survey

The properties tab of this related list allows us to add the fields we like to display in this related list.

Salesforce Surveys

Survey Invitation and response as displayed on a record page:

Salesforce Surveys

Deleting a survey:

Just like the flow, only one version of the survey remains active at a time. All the other versions are inactive and can be deleted.
We may find that the Delete button for surveys is not available. This is because an active survey version needs to be archived first in order to be deleted.

Salesforce Survey

SF Survey

Note: If a survey version is referenced by one or more records in salesforce, we cannot archive the survey.

Once you have archived the active version, make sure that all other versions are inactive and then you have the option to delete the survey.

Salesforce Surveys

SF Surveys

Leave A Comment