Skip to content

Setting up embeded surveys

Embed surveys only works from version 1.11 or later

Embedded surveys will only works on version 1.11 or later. We always recommend you to install that lates version of nps for Salesforce.

Read here for more infomation.

1. Manual delivery on campaign

Embed surveys use Salesforce as the email provider. It is therefore important that you turn off automatic delivery in your campaign. If not, two email services will be used and customers will receive duplicate surveys. This can be done by editing or creating a campaign and setting "deliver campaign manually" to on.

2. Campaign id and email template name on case

Make sure that your case object has 'campaign id' and 'email template name' set to visible:

  • settings → object manager → fields & relationships → case → Campaign Id → Set Field-Level Security → set to visible.

  • settings → object manager → fields & relationships → case → Email Template Name → Set Field-Level Security → set to visible.

3. Drag-and-drop content builder permission

Make sure that the permission set for your user has permission enabled for "Access drag-and-drop content builder". In this example the role " admin" is being given the permission.

  • settings → users → permission sets → admin → object settings → system permissions → edit → toggle enabled for "Access drag-and-drop content builder" → save.

This permission allows making use of the email template builder.

4. Adding api key

This step is only necessary for a first-time setup of the Salesforce package. Check if apikey has been saved to Salesforce, and that you are using the production environment. If you are unsure, please follow the video below. Note that the api key is inserted on to the password field.

5. Closed case panel on case page

check if you have the "closed case" custom component on case page:

  • edit page → drag "NPS P-Gap Closed Case Panel" somewhere on the page → click save → click activate.

This component can only be seen by an admin/ admin.

6. Embed survey html code page

Gaining access to this page allows you to copy the html code needed for an embed survey in an email template:

  • setup → user → permission sets → object settings → survey html → edit → toggle available and click save.

7. Setting up embed survey email template

With the email template builder, it is now possible to embed the survey code:

  • new email template → give name and entity type case → edit in builder → drag html box → insert survey html code → write some rich text with case information etc. → save.

8. Flow builder

A flow is needed in order to map a case scenario to an email template and an campaign. You can also achieve this using process builder, however Salesforce has declared it to be obsolete.

In the example in the video, the flow checks if the origin of the case is of type "email". If the statement is true, then the campaign with id "12048" and an email template with name "my embed survey" is set to be related to the case.

9. Sending the survey

Make sure to check the box that says "Use Salesforce Email Template". If this box is not checked, the Salesforce email service is not being used and no survey will be sent since the campaign has been set to deliver manually. A licensed Salesforce org can send out 5000 external emails on a day. A contact is required on the case with an email in order to send the email containing the survey.

The setup is now complete and sending an embed survey is possible. Closing the case will trigger a survey being sent to the contact.