Skip to main content

Return to TX Community

Liaison

Creating Surveys

You can distribute polls or surveys to specific student groups or any contacts within Salesforce. Gather the responses directly within the system and disseminate the results to fellow members within your organization.

Creating a New Survey

  1. Navigate to the Surveys tab.
  2. Select New to create a new survey.
  3. Enter the options detailed below:
    • Survey Name: The unique name displayed in the Header of the survey when users respond.
    • Redirect Link: Location the survey-taker will be directed after they submit the survey. This should be the full URL (including http:// or https://).
    • Include Response Review: Allows users to review their responses before submitting the survey.
    • Include Backwards Navigation: Allows users to return to questions and change their responses.
    • Progress Bar: Displays the users' progress in completing the survey.
    • Rating Style: Displays as Radio Buttons or Stars. The radio Button will display a number 1-5 with a radio button beneath it; Stars will display five stars (no numbers display).
    • Survey Styling (CSS) options:
      • Background Color: The background color for the survey page.
      • Background Texture: Indicates the texture shown in the background of the survey. Its opacity is 75%, so it may be used with Background Color to create a colored background texture.
      • Body Font Color: The color \used for the font in the body of the survey question. E.g. ‘Times New Roman’ or ‘Arial’
      • Button Color: The color of the buttons used to navigate the survey.
      • Button Font Color: The color of the font on the buttons.
      • Button Font Family: The font used for the questions. E.g. ‘Times New Roman’ or ‘Arial’
      • Header Image: The image displayed on the top of the survey page. This must be a URL. It is recommended that you use an image 1140px x 200 to 300px
      • Header Font Family: The font that will be used for the ‘Header’ of the survey.
      • Header Font Color: The color that will be used for the font in the ‘Header’ of the survey.
      • Progress Bar Color: The color that will display for ‘% complete’ as the respondent moves through the survey.

Note: Color fields accept labels (ie. white or red) or hexadecimal (i.e. #FFFFFF)

  1. Save the Survey details and begin creating Survey Questions.

Creating Survey Questions

  1. Navigate to the Survey where you want to add questions.
  2. Under the Survey Questions related list, select New Survey Question. The Survey Name will default.
  3. Indicate whether the question is Active. When a new question is created, this will default to checked.
  4. Indicate the Order in which the question should appear on the survey. If left blank, the system will default it to the next available number.
  5. Select the Question Type for the survey question. You can select Plaintext, 1-5 Rating or Picklist.
    • If you selected a Picklist Question Type; indicate the picklist options by entering each item on a separate line. 
    • Note: When entering picklist values, be sure that no extra spaces are included at the end of each value; otherwise, your Survey reports will not display properly.
  6. Enter the Question Text. This will display above the response options.
  7. Indicate whether the question is Required.
  8. Save the question or select Save & New to create another question.

Deploying Surveys

In order to ‘deploy’ a Survey, several steps need to be completed after you’ve created the Survey and associated questions.

Step 1: Quick Test/Preview

  1.  Navigate to Setup and search for Visualforce Pages.
  2. Select the SurveyResponder page and click Preview.
  3. On the end of the URL, add ?id=[SurveyID], replacing value with your Survey ID.

Example:

…/SurveyResponder?id=a021a000001qheB

Locating the Survey ID

The Survey ID is important to deploy your survey and view survey results. Once you’ve created your survey and saved you can find the Survey Id by following these steps:

  1. Navigate to the Surveys tab.
  2. Select the Survey from the list. 
  3. The  15-18 digits at the end of the url represent the Survey Id.

Step 2: Create a Survey Site

  1. Navigate to Setup and search for Sites.
  2. Enter a Site Label, Site Name and Site Description.
  3. For Site Contact, select the User who will be contacted regarding this site.
  4. Default Web Address will be populated and you must enter a Suffix. Enter ‘Survey’.
  5. For the Active Site Home Page enter ‘SurveyResponder’.
  6. Save your changes.
  7. Select the Activate button to check the ‘Active’ checkbox the Site.

survey site details
 

Step 3: Enable VisualForce page access

  1. Navigate to Setup and search for Sites.
  2. Select the Site Label for Survey site you created in Step 1.
  3. Scroll to the Site Visualforce Pages section.
  4. Select the Edit button.
  5. From the Available Visualforce Pages list, Add the following pages to the Enabled Visualforce Pages list:
    • SurveyResponder
    • SurveyResponsesSummary
  6. Save your changes.

Step 4: Configure Access to the Survey Site

  1. Navigate to Setup and search for Sites.
  2. Select the Site Label for Survey site you created in Step 1.
  3. Select the Public Access Settings button.
  4. Select the Edit button.
  5. Use the TargetX Permission Scanner  or Permission Viewer to update permissions.

 

Step 5: Sharing Settings Considerations

If Organization-Wide Defaults for Internal Users is set to Private for Contacts, or TargetX Communities is Activated, then a Sharing Rule must be set up to permit Read Only access to the Survey Site Guest User for the desired group of Contacts (ie. All Students).

Note: Review the Recommended sharing settings for Default External Access (Organization-wide Defaults) to verify your Default External Access.

Surveys require the following Sharing Rules:

Create a Surveys Sharing Rule
  1. Go to Setup and search for Sharing Settings.
  2. In Manage sharing settings for, select Survey.
  3. Under Sharing Rules > Survey Sharing Rules, select New.
    1. In the Step 1: Rule Name, enter Label = Surveys Site Users.  Rule Name will automatically populate with this value.
    2. In Step 2: Select your rule type, select the radio button option Guest User Access, Based on criteria.
    3. In Step 3: Select which records to be shared:
      1. Enter criteria of Field of Created By ID starts with 005.
    4. In Step 4: Select the users to share with > Share with, select Surveys Site Guest User.
    5. In Step 5: Select the level of access for the users > Contact Access, select Read Only.
  4. Delete any existing Sharing Rules that are based on Public Groups for the Contact object.
  5. Select Save.
Create a Survey Response Sharing Rule
  1. Go to Setup and search for Sharing Settings.
  2. In Manage sharing settings for, select Survey Response.
  3. Under Sharing Rules > Survey Response Sharing Rules, select New.
    1. In the Step 1: Rule Name, enter Label = Survey Response Site Users.  Rule Name will automatically populate with this value.
    2. In Step 2: Select your rule type, select the radio button option Guest User Access, Based on criteria.
    3. In Step 3: Select which records to be shared:
      1. Enter criteria of Field of Created By ID starts with 005.
    4. In Step 4: Select the users to share with > Share with, select Surveys Site Guest User.
    5. In Step 5: Select the level of access for the users > Contact Access, select Read Only.
  4. Delete any existing Sharing Rules that are based on Public Groups for the Contact object.
  5. Select Save.

 

Step 6: Sharing a Survey

Access Keys are utilized when users click a Survey link. Users can have an email sent to them with an updated link. The email will use the direct Site Path example, as shown below.

Surveys can be shared to collect respondent names or anonymously, depending on your preference.

Sending Surveys by TargetX Broadcast Email Campaigns

Note: You MUST use the Email Template Builder for Survey emails.

Step 1: Locate the Survey ID
  1. Navigate to the Surveys tab.
  2. Select the Survey from the list. 
  3. The 15-18 digits at the end of the url represent the Survey ID.
Step 2: Create an Email

Create an Email which includes your survey ‘Site’ link plus the following URL parameters:

?id=<<Survey Id>>&sid={!Contact.Id}&k={!Contact.TargetX_Base__Access_Key__c}

Note: Be sure to re-add the merge field for Contact ID when customizing your email template.

Step 3: Create and schedule an Email Campaign

Deploying Surveys linked to a respondent

To send a link to a survey that will track the responses related to a specific individual, include the Contact Id as a URL parameter (in addition to the Survey Id) when deploying your Survey link (URL)

Step 1:  Locate the Survey ID 
  1. Navigate to the Surveys tab.
  2. Select the Survey from the list. 
  3. The 15-18 digits at the end of the url represent the Survey Id.
Step 2:  Create an Email Template

Create an Email which includes your survey ‘Site’ link plus the following URL parameters:
id=<<Survey Id>>&sid={!Contact.Id}&k={!Contact.TargetX_Base__Access_Key__c}

Example 1: Using a Survey Site path

  • targetxsite.secure.force.com/surveys?id=<<Survey Id>>&sid={!Contact.Id}&k={!Contact.TargetX_Base__Access_Key__c}

Example 2: Using a Direct Site Path

  • targetxsite.secure.force.com/surveys/apex/TargetX_Survey__SurveyResponder?id=<<Survey Id>>&sid={!Contact.Id}&k= {!Contact.TargetX_Base__Access_Key__c}
  • targetxsite.secure.force.com/apex/TargetX_Survey__SurveyResponder?id=<<Survey Id>>&sid={!Contact.Id}&k= {!Contact.TargetX_Base__Access_Key__c}
Step 3: Create and Schedule an Email Campaign

When a contact uses the link in their email, the survey responses will be linked to that Contact.
 

Deploying Anonymous Surveys

Follow the same steps as above, but eliminate the &sid= {!Contact.Id}&k={!Contact.TargetX_Base__Access_Key__c} URL parameters from the Survey link.

 

  • Was this article helpful?