loader

Set up Survey in Salesforce effectively

Table of Contents

Introduction

It is a trivial requirement to gather the feedback after ticket resolution. In this scenario, goal is to setup Salesforce Survey that will go out to customer when support ticket is closed. 

Prerequisites

Before embarking on this integration journey, ensure that both Surveys and Communities are enabled for your organization.

1. Activate Survey

To get started, follow the steps outlined in the Salesforce Documentation to enable Surveys for your organization

2. Enable Community

Next, enable the Community feature by referring to the Salesforce Documentation for detailed instructions: https://help.salesforce.com/s/articleView?id=ind.v_contracts_enable_salesforce_communities_374704.htm&language=en_US&type=5 

3. Custom Field Configuration

Begin by creating essential custom fields necessary for the automation process. This includes adding a URL field named “Survey Link” on the Case object and establishing a Case lookup on Survey Invitation Objects.

4. Tailored Email Communication

Craft a customized email template that resonates with your brand’s tone and style. Ensure it’s readily available for use.

Sample Email Content:

Dear {!Contact.FirstName},

Thank you for submitting case number {!Case.CaseNumber}. Now that the issue is resolved, we value your feedback. Kindly take a moment to complete our survey.

{!Case.Survey_Link__c}

Thank you,

[Your Name]

email
Setting Up Email Alerts

Create an Email Alert with the following specifications:

Object: Select Case

Email Template: Choose the customized template from the previous step.

For Selected Recipients: Move “Related Contact: Contact Name” to the right. Save.

email

Automate Survey Distribution

Develop a new Process Builder to trigger survey distribution upon Case closure:

Object: Case

Select “when a record is created or edited.”

Define Criteria:
  • Name it/ Select “Conditions are met.”
  • Set Conditions:
    • [Case].Status/Equals/Picklist/Closed.
    • [Case].ContactID/ISnull/Boolean/False
  • Select “All of the conditions are met (AND).”
  • Execute actions only when specified changes are made to the Record? = True
email

Creating Survey Invitation Records

For Immediate Actions, establish Survey Invitation Records with the required Field Values. Remember to retrieve the survey ID from the corresponding Salesforce record.

email

Obtaining Network ID

Navigate to Digital Experience/All Sites to acquire the Network ID. Right-click on the Community URL, select “Copy Link Address,” and save the link for reference.

  • Please exclude the trailing “&” from the ID.

Email Alerts Integration

In Immediate Actions, integrate Email Alerts. Specify the name of the Email Alert created earlier.

Save and Activate Process

Proceed to save and activate this process.

Secondary Process Builder

Create a second Process Builder for Survey Invitation:
  • Object: Survey Invitation
  • Start: Only when a record is created
  • Criteria: “No criteria-just execute the actions!”
Update Survey URL

In Immediate Actions, choose Update Records, and for the Record, select Case. Set the Field to Survey URL, Type to Formula. Create the formula for the Value.

Customizing Survey Link

Retrieve the Survey Link from the latest survey version. Click Send and select “Don’t require authentication.” Copy the link.

    • Paste the URL in a document. Replace the hardcoded IDs in the link with [SurveyInvitation].Id & [SurveyInvitation].UUID.
    • Modify the link as follows:

“https://your-developer-edition-link.com/survey/runtimeApp.app?invitationId=” + [SurveyInvitation].Id + “&surveyName=customname&UUID=” + [SurveyInvitation].UUID

Finalize Survey URL Formula

Paste the updated formula URL into the designated box and select “Use this formula.”

Save and Activate Process

Save and activate this process.

Ensure Guest User Permissions

Confirm that the Guest User in the Community possesses CRUD permissions. Follow these steps:

  • Search for Digital Experience in the Quick Find box, then select All Sites.
  • Open the Community Builder designated for creating public survey invitations.
  • In Community Builder, access Settings and choose General.
  • Click the profile name under Guest User Profile.
  • Click Edit.
  • In the Standard Object Permissions section, grant the following permissions:
				
					  - Object: Survey
  - Permission: Read
  - Object: Survey Invitations
  - Permission: Read
  - Object: Survey Responses
  - Permission: Read, Create, and Edit

				
			
  • Save.

Make your transition to Salesforce a success with our Data & System Migration services. Contact us today to explore how we can facilitate a seamless migration and ensure a smooth start on Salesforce!