Salesforce: Creating User Record Merge Fields in Email Templates

Body

Summary

This article details two main steps of creating a user record merge field in email templates for both Classic UI and Lightning UI users.

 

How-To

Task: To create user record merge fields in email templates

When sending emails from a record in Salesforce you can dynamically merge in information about the user who is sending the email by using merge fields. This is common when sharing templates within a department and the email signature needs to match the user's details who is actually sending the email. This can be done when using the Classic or Lightning User Interface (UI), and can also be done for Classic or Lightning Email Templates. There are two main steps to complete.

Instructions

Step 1 - Update the user record's profile to include data in the fields being merged

Classic UI: Click your name in the top right corner > My Settings > Personal > Personal Information. Populate the fields you plan to use*. 

Lightning UI: Click your avatar in the top right corner > Settings > Personal Information. Populate the fields you plan to use*. 

*Common fields used are: First Name, Last Name, Title, Email, Phone, Mobile. These can all be edited by the user by using the steps above.

There is also a custom field for "Appt Scheduling URL" that allows users to merge in their Booking or Calendly link. This field can be edited in the same areas as mentioned above, except you'll need to go to "Advanced User Details" > EditAppt Scheduling URL field > [Add full URL] > Save.  If you're concerned about the length of the URL that will merge in, you could generate a bitly link to use instead.

Step 2 - Add the merge fields in the email template (merge field formatting is different in Classic and Lightning)

To Use Classic Email Templates

  • In Classic UI: Email Content tab > Email Templates (Under Archived Email Editor) > New Template or find a template to Edit in an existing folder > Use the Merge Tool to select:  Field Type = "User Fields" > Select Field [select field you're looking to add] > Copy Merge Field Value and add to your email template. 
  • In Lightning UI: Setup (Gear Icon in to right) > Email > Classic Email Templates >  New Template or find a template to Edit in an existing folder > Use the Merge Tool to select:  Field Type = "User Fields" > Select Field [select field you're looking to add] > Copy Merge Field Value and add to your email template. 

 

Common merge field used in Classic email templates: 

{!User.FirstName} {!User.LastName}
{!User.Title} - {!User.CompanyName}
{!User.Phone} - {!User.Email}
{!User.Appt_Scheduling_URL__c}

 

To Use ​​​​​​​Lightning Email Templates

  • In ​​​​​​​Classic UI: Lightning templates cannot be accessed in the Classic UI. 
  • In ​​​​​​​Lightning UI: App Launcher (Square with 9 dots in top left) > Email Templates > New Template or find a template to Edit in an existing folder > In a Rich Text content box you can use the "{ } Merge Fields" button at the bottom right side of the window.  Use the Merge Tool to select:  Sender  >  [Select field you're looking to add] > Insert

 

Common merge field used in Lightning email templates: 

{{{Sender.LastName}}} {{{Sender.FirstName}}}
{{{Sender.Title}}} - {{{Sender.CompanyName}}}
{{{Sender.Phone}}} - {{{Sender.Email}}}
{{{Sender.Appt_Scheduling_URL__c}}}

 

Outcome

You have set up the merge fields in your email template.

 

Need additional help?

If you have any additional questions, please submit a ticket by using the ECRM Services Support Form.

Details

Details

Article ID: 4284
Created
Wed 12/8/21 9:57 AM
Modified
Thu 11/2/23 10:31 AM
Applicable Institution(s):
Keene State College (KSC)
University of New Hampshire (UNH)
USNH System Office