Salesforce Visualforce Email Templates

Use the GetFeedback email builder for Visualforce to create a survey email that you can paste into a Visualforce template in Salesforce.

  • Before automating emails, connect your survey to Salesforce. From the survey builder, go to Mappings > Salesforce Custom Mappings to connect the survey to your integrated Salesforce environment.
  • If you use a survey question as your email call to action, remove the title page of the survey. In the survey builder, hover over the title page and select X to remove the page. Then, publish your survey again.

To create your Visualforce template:

  1. From your survey, select Distribute > Email > Visualforce to start creating your template.
  2. Choose your Email call to action. Embed a button or survey question directly in your email.
    • If you choose a survey question, use the first question. If you use a later question, the survey still opens in the browser on the first question.
  3. Enter an Email subject.

Add the merge fields in your survey. Use any fields that you’re mapping data to so the survey responses map back to Salesforce correctly. You can also add other fields that you want to track. For example, if you’re sending surveys after closing a case, you can add the Case Owner field to track the agent who handled the case.

If you're mapping your survey to a custom object, make sure to include any lookup relationship information. For example, if you have a lookup relationship between Case and Account, include the accountid merge field here.

  1. Select the Salesforce object that will trigger your email. The object you choose determines which fields you can use in your survey. For example, select Case as your object if you want to send surveys after closing a case. Then, you can add fields from the Case object, such as Contact Name or Case Owner.
  2. (optional) Add merge fields from your object:
    1. Select +Salesforce field.
    2. Select the field to add.
    3. Select Add.
  3. (optional) Add other merge fields to track additional data:
    1. Select +Merge field.
    2. For Merge field name, enter the name to use for the merge field in GetFeedback.
    3. For Merge field value, enter the merge field to pull data from Salesforce.
    4. Select Add.

We apply the colors and background from your survey theme to your email template. You can optionally add your logo and customize your email message.

  • To add your logo, select Add a logo in the template preview. Then, upload your image.
  • To add a greeting, select Add an optional greeting in the template preview, then enter your text.
  • To add body text, select Add an optional message in the template preview, then enter your text.

You can use any merge fields you added to personalize your email subject, greeting, and message. For example, you can use the Name field to add your respondent’s name to the email subject. Salesforce automatically fills in this information for each email recipient when sending the email.

To personalize your email with merge fields:

  1. Place your cursor where you want to add a merge field in the subject, greeting, or message field.
  2. Select Personalize.
  3. Select the merge field to add.
  4. Enter a fallback term to use when the merge field is empty. For example, use “valued customer” as a fallback term when the contact’s name isn’t available.
  5. Select Insert. The merge field will display in your email template.

To export your template, scroll to the bottom of the left panel and select Export.

  • To copy the template code, select Copy & Close.
  • To send the code to someone else, such as your Salesforce administrator, enter an email address and select Send. We’ll send the template code to that email address.

You can now upload the template to Salesforce to use for your emails.