Posted by Sushma Rajput
January 3rd, 2014

One of the great features of Salesforce.com is the Email Templates. This article consolidates various knowledge articles and addresses some of the configuration nuances of this functionality as well as provides some tips and tricks.

Explained below are the details of the visualforce email template feature that I have implemented in one of my projects.

Description: Implementation phase of the project to automate advisor updates from SalesConnect maintenance files into Salesforce.

Requirements:

  • Automated Email Notifications
    SalesConnect Advisor Updates : Some of the records before being updated in SFDC need to be approved by channel heads.
  • Also, email notifications must sent to channel heads and BDOs of the rep/office records

Solution:For that I had to create‘6 visualforce’ email templates which were passed into apex class named as ‘CaseTriggerHandler’to send email notification to the Users.

Types of Email Templates and when to use them.  Salesforce provides 4 types of email templates:

  • Text – All users can create or change text email templates.
  • HTML with letterhead – Administrators and users with the “Edit HTML Templates” permission can create HTML email templates based on a letterhead.
  • Custom HTML – Administrators and users with the “Edit HTML Templates” permission can create custom HTML email templates without using a letterhead. You must either know HTML or obtain the HTML code to insert in your email template.
  • Visualforce – Administrators and developers can create templates using Visualforce. Visualforce email templates allow for advanced merging with a recipient’s data, where the content of a template can contain information from multiple records. See Creating Visualforce Email Templates.

Fig. 1

All of these email templates can include text, merge fields, and attached files. You can also include images on your HTML and Visualforce templates. A button to check the spelling of your template is available for text templates and Visualforce templates without HTML tags.

Following User Permission needed:

To access your email templates, do one of the following:

  • If you have permission to edit public templates, from Setup, click –

Communication Templates | ‘Email Templates’.

  • If you don’t have permission to edit public templates, at the top of any Salesforce page, click the down arrow next to your name. From the menu under your name, select Setup or My Settings. Then from the left side of the page, click Email | My Templates.
  • Click on name of any email template to go to Viewing Email Templates page.
  • To edit or delete a template, click Edit or Del next to the template name in list.
  • Click New Template to create any type of email template.

Fig.2

Fig.3

Reason behind why visualforce email type was chosen is shown in the below table:

Conclusion: Email template is very important feature of SFDC.


Comments (0)