5 tips to create email templates in Salesforce
10 min
Anyone who has been in Sales or Service for more than a couple months quickly realizes that they end up sending the same email several times every week. Once they get that perfect message that resonates with clients and customers, just rinse and repeat.
Managers find the same to be true. To get a consistent theme and message from the team to the customer, it’s better to use a standardized email.
While copying and pasting can get the same basic message, it would be even better to have the key piece of information such as client name, organization names, key dates, and other items to pre-populate in the email, without having to run through and change it (a huge opportunity for error).
Finally, in a perfect world we wouldn’t even need to trouble our Sales and Service team members with sending the email at all. Let’s just automatically send it out when we know the circumstance calls for it. For example, a simple message to let them know we received their customer support request or a reminder of their upcoming renewal.
All of these scenarios can be solved quickly and easily with Email Templates in Salesforce. This article will lay out some solid tips for utilizing templates and making the most of this critical feature.
1. Know the Components
Salesforce has largely moved over to Lightning in 99% of situations. However, you’ll notice that Email Templates is one place where they still utilize the “Classic” name, specifically with Letterheads and Email Templates. Don’t worry, though! These templates are usable in both Classic and Lightning. Also users can set up templates and letterheads in Lightning without toggling back and forth to Classic.
Classic Letterheads
Letterheads allow companies to set up a format for all sections of the email. Keep in mind that you do not have to use Letterhead formatting for your email, unless you select “HTML” as the type. The plus and minus of letterhead will be discussed in section 2.
Background Color
Change the color of the border that runs around the header, main body, and footer.
Header + Footer
Change the properties such as font, alignment, and add a logo.
Main Body
The actual text of the main body will be done in the template (not the letterhead), but here we can adjust the color scheme of the main body.
Top Line + Middle Line + Bottom Line
Adjust the width and color of the lines dividing the section. Tip – making the line the same color as the background essentially makes it invisible
Email Footer
Set up an organization-wide email footer to be used by the entire organization. This works well for auto-response emails, emails from a queue (rather than an individual), and other automated emails that are coming from the organization rather than a specific person.
Classic Email Template
Where we actually design the email layout, content, and variable fields.
Lightning Email Template
Just an “enable” toggle switch for creating, editing, and deleting nested email template folders.
Email Alerts
Combining an email template with other details such as who will be sending and receiving the email. These alerts enable the templates to be automated in certain circumstances.
There are many other components to email in Salesforce. For example, Gmail and Outlook integration. Deliverability and Organization-wide Addresses are important as well. These will not be covered in this article.
2. Template Types
Now we are ready to build our first template. In set-up under Email, selected Classic Email Templates and you will have the following choices:
The first option is Text. Text is very plain and as its name implies, that’s all there is to it. There are pluses and minuses to each of the different types. With Text format, we know exactly what we are going to get, and how it is going to render, since its only words. It will essentially look the same whether the recipient is receiving it via desktop or mobile, and they will most likely get the complete message in all circumstances (notwithstanding protective filters or other programs the company may use to regular incoming mail).
The second option - HTML
Makes use of the Letterhead described in the previous section. This gives the email a professional look and feel with the color schemes and fonts coming from the letterhead settings. The same HTML design can be created with Custom, but the combination of HTML type with letterhead is the easiest option, especially for those who are adverse to code. After selecting and designing the HTML version, Salesforce will allow us to automatically create a “dumbed down” text version to be rendered in situations where the recipient cannot receive the HTML version. Unlike Text, HTML allows us to use the language to make the email much more vibrant and interesting with links, pictures, other HTML enabled features.
Like HTML, the Custom option allows quite a bit of customization using HTML mark-up, but forgoes the Classic Letterhead preconfiguration. As mentioned above, the Classic Letterhead has benefits and drawbacks. The pre-formatted style definitely looks professional. However, some may interpret it as a “form letter” or “spam marketing”. The decision of whether or not to use Letterhead – and hence the choice between HTML and Custom for the Template – should be tied to the purpose. For emails that come from the organization, such as confirmation emails, auto-response emails, and reminders, the sharp professional layout of a Letterhead is a benefit. However, for Sales and Business Development emails, the Custom option typically give the email a more personal and one-to-one feel.
For those wanted to leverage the power of VisualForce, the last option is perfect. While VF may not be the long-term future of Salesforce, it certainly has been integral throughout the years. This version will give a consistent look and feel to other VF pages that may have been used by internal or external users and allows some functionality that just isn’t there with standard HTML.
Once we have selected a type, it’s time to fill out the subject and body of the email. In addition to the raw text and HTML (described in the following section), we can insert field reference. This is a great way to personalize email. Salesforce makes it easy by provide a little snippet of code to insert for each field. For example, if I want to say, “Good Afternoon John” to a Contact named John. I can say “Good Afternoon {!Contact.FirstName}”. Now the template will automatically insert the Contact’s first name. Just select the field you want and Salesforce will provide the information to put between the { }’s.
3. HTML Version
The first three types (Text, HTML, Custom) are the most commonly used Email Templates. While text has the aforementioned benefits, this section adds a bit of color to the HTML/Custom features.
Salesforce is great at no code/low code development. This section adds a bit of simple tricks that to the “low code” bucket.
<br> or <br /> Use this simple tag to add a line break to the email. Three <br /> add three lines, etc.
<hr /> Use this to put a horizontal line between lines or paragraphs to divide content into sections.
<a href =”www.salesforce.com”> Click Here </a> This small bit of code “wraps” the works “Click Here”. They will then be hyperlinked to the website located inside of quotes after a href.
<img src=”image.png”> Insert a picture.
Of course there are a boatload more HTML tags and other bits of code, but these are some quick and easy ones to use in email template. They are especially useful for Custom type templates, where we want the upside of hyperlinks and good-looking formats, but without the full letterhead block form.
4. Test
Once you’ve got your email template laid out, with field reference, hyperlinks, footers and anything else, it is time to test it. Select the “Send Test and Verify Merge Fields” button. This will give you an option to select and actual record from your system to prepopulate the email and you can send it to yourself so you see what it will actually look like when it comes through.
This example above has a field reference to the Contact’s First Name, the Organization’s name, the Account Name, and even the User’s first name who is sending the email.
5. Using the Template
Now that we have our perfect Email Template, where can we use it? Several places. First when I’m directly on the record page of a lead or contact, I can pull up available templates right from the bottom.
This is really handy when automated rules don’t really apply, but a sharp team member can categorize different situations into a few canned responses.
For our next few options, we will first want to set up an email alert. This can be done in a few quick steps. Just select the object (i.e. Contact, Lead, etc), the template, the recipient (such as user, role, contact, etc), and who the email will be coming from. It can be the Current User or approved Organization-wide email addresses. Once the Email Alert is created, it can be used with automated processes like Workflows, Process Builders, and Flows.
Templates can also be used for Lead and Case Auto-Response Rules. This is great for a message that lets the customer or client know that the company has received their submission and will be getting back to them soon.
With the tools above, save your team time and potential errors by building the perfect template.