SurveyMonkey

SurveyMonkey for Salesforce: Web Link Encryption

Get the integration! SurveyMonkey for Salesforce is an Enterprise add-on. Contact Sales or your Customer Success Manager (CSM). The integration setup is only available in English.

If you’re sending a web link from the Salesforce integration, you can encrypt custom variables. Encryption protects user data by preventing respondents from seeing or editing the custom variables in your web link.

Need more help with the Salesforce integration? Check out our Getting Started guide >>

There are a few steps you need to take to set up encryption:

  1. Map your survey to Salesforce
  2. Create a web link collector in the Salesforce integration
  3. Turn on encryption
  4. Get an encryption key from your Primary Admin (this may be you)
  5. Set up encryption in Salesforce (we’ll provide instructions below)
  6. Send your survey

Read these instructions to get started.

Work with a Salesforce administrator to complete these steps, if possible - you may need to build custom code for your environment. SurveyMonkey’s support team can’t consult on coding issues in Salesforce.

Reach out to your Customer Success Manager to get the Encryption feature enabled. You’ll only need to get it enabled once.

Create your survey mappings. You can use our managed package or create your own mappings to standard and custom Salesforce objects. Learn how >>

Create a web link collector in the Salesforce integration. Make sure to add any custom variables you’d like to collect from your respondents. Learn how >>

Once you’ve created your web link, toggle on the option to Encrypt custom variables. We’ll show you an encrypted version of your survey link to send. However, this link won’t work until you set up encryption in Salesforce.

You’ll see instructions to set up encryption and a code sample. Copy this code sample to use later. You can always come back to this page and copy it later.

Ask your Primary Admin to create an encryption key and provide it to you. 

To generate an encryption key:

  1. As a Primary Admin, go to the header and select My Team > Settings
  2. Select Encryption key for Salesforce at the bottom of the page (you may need to scroll).
  3. Select Generate key.
  4. Copy the key and provide it to the person setting up encryption in Salesforce. They’ll add this key to the encryption code in Salesforce.

To set up encryption in Salesforce:

  1. From the web link collector page in the Salesforce integration, copy the code sample. This is the encryption code you’ll use in Salesforce.
  2. In Salesforce, create a custom field called SM_CV_ENCRYPTED_Data on the object that triggers your survey. For example, if your survey is sent when a Case is closed, place this custom field on the Case object. Make sure your encryption code references and places encrypted values in this field.
  3. In Salesforce, create an apex trigger that encrypts your custom variables when the event that triggers your survey occurs (for example, if your survey is sent when a Case is closed, make sure your trigger encrypts custom variables when this event happens). Or, paste the code sample from the Salesforce integration page and replace SM_ENCRYPTION_KEY with the encryption key your Primary Admin provided.

IMPORTANT! If you want to use the code sample we provide, read the information on using the code below.

We provide sample code for this trigger when you turn on encryption. However, there are a few things to keep in mind when using this code:

  • Make sure to review the trigger and update it for your environment as needed. For example, you may want to update the trigger for the survey.
  • This code only references the object you map your survey to (for example, if you map your survey to the Case object and then add mappings to the Account object, the sample code will only reference the Case object). If you map your survey to multiple objects, you’ll need to write custom code or update the sample to meet your needs.
  • This code places encrypted data in the SM_CV_ENCRYPTED_Data field on your object. If you don’t have a field with this name on your object, the code won’t work.

Set up any automations you need to send your survey link. If you’re sending this link from Salesforce, you’ll want to create an email template with your link, set up an email alert, and create a flow to send your survey. Learn how >>