Newer Version Available
Try It Out: Build an Email Template
- From Setup, enter Email Templates in the Quick Find box, then select Email Templates.
Here you should see a list of all the email templates that have already been defined for your organization, including several sample templates from Salesforce.
- Click New Template.
We can choose to create a text, HTML, or custom email template. HTML and custom email templates are the same except that HTML templates allow you to specify a letterhead to give your email the same look and feel as other emails from the same source.
To keep things simple, we'll just stick with a plain text email for now.
- Select Text, and click Next.
The New Template page allows us to define the email template itself. The area near the top is where we'll generate the merge field codes for the fields in the email template below it, so let's skip past it for now and start with the Folder drop-down list.
- In the Folder drop-down list, choose Unfiled Public Email Templates.
The Unfiled Public Email Templates folder is a standard, public folder available in every organization. By keeping the email template in a public folder, it'll be available to other users who have permission to view and edit email templates.
- Select the Available For Use checkbox.
This option will make our email template available when we create our workflow alert.
- In the Email Template Name text box, enter Recruiting App: New Position Alert.
- In the Encoding text box, accept the default of General US & Western Europe (ISO-8859-1, ISO-Latin-1).
- In the Description text box, enter Send update email to all Universal Containers employees.
Now we get to the heart of our email template—the email's subject and body text.
- In the Subject text box, enter New Open Position Alert:.
We want to put the title of the new position in the subject of our email, so we'll need to use our first merge field here, just after the colon in our subject. To get the proper code, we'll have to go back to the merge field area near the top of the page.
- In the Select Field Type drop-down list, choose Position Fields.
Although there are many objects to choose from in the Select Field Type drop-down list, because we're creating an email template for a workflow rule, we're limited to the fields for the object that will be associated with that workflow—in our case, Position. That's because the workflow rule that uses this email template won't know about any records other than the position record that triggered the workflow rule. If we put in fields from another object, they'd be left blank in our email.
Now let's grab the field we want.
- In the Select Field drop-down list, choose Position Title.
In the Copy Merge Field Value text box, a merge field code appears for Position Title. We can copy and paste it to the end of our subject line so the subject now looks like: New Open Position Alert: {!Position__c.Name}. When an email is generated from this template, {!Position__c.Name} will be replaced with the relevant position title.
Easy, right? Now let's finish the remainder of our email.
- In the text area just below the Subject text box, enter the following text:
1There's a new position open at Universal Containers!
2
3Title: {!Position__c.Name}
4Functional Area: {!Position__c.Functional_Area__c}
5Location: {!Position__c.Location__c}
6
7Job Description
8{!Position__c.Job_Description__c}
9
10Responsibilities
11{!Position__c.Responsibilities__c}
12
13Skills Required
14{!Position__c.Skills_Required__c}
15
16Educational Requirements
17{!Position__c.Educational_Requirements__c}
18
19If you know of anyone great who might be able to fill this role, please contact the hiring manager, {!Position__c.Hiring_Manager__c}.
20
21Thanks!- Click Save.
That's it for our email template. Now that it's done, we're ready to create our New Position workflow rule and alert.
