---
schema_version: "1"
id: 5342c2cb8304efcf9aabfcba73b427025d606283df05a2b46302248caa801f5c
title: Use the Handlebars Merge Language in Lightning Email Templates, Enhanced Letterhead, and Email Template Builder
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/handlebars_template_language.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.handlebars_template_language.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 332b6fcf208ecd5cd560b5469c33c531676a170bff8162f985750f660512b56f
description: Use the Handlebars Merge Language—available in Summer ‘18—to add dynamic content to your Lightning and Email Template Builder email templates.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Use the Handlebars Merge Language in Lightning Email Templates, Enhanced Letterhead, and Email Template Builder

Use the Handlebars Merge Language—available in Summer ‘18—to add dynamic content to your Lightning and Email Template Builder email templates.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
      <colgroup>
        <col>
      </colgroup>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Lightning Email Templates are available in: Lightning Experience</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>All</strong> Editions</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p style="margin-bottom:0;">List email not available in: <strong>Personal</strong>, <strong>Contact Manager</strong>, and <strong>Group</strong>
              Editions </p>
          </td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">&nbsp;</td>

        </tr>
      </tbody>
    </table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience for email templates created in Email Template Builder and Email Content Builder</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Unlimited</strong>, <strong>Performance</strong>, and <strong>Developer</strong> Editions.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Account Engagement Lightning App for all Account Engagement editions</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_note.png)

Note

In Summer ‘18, we introduced the Handlebars Merge Language (HML) for email templates in Lightning Experience. If your email template has merge fields with three curly braces ({{{), you’re using an HML email template. If the merge fields have one curly brace ({), or an exclamation mark (!), you’re using a SML (Salesforce Merge Language) email template. Lightning templates created since Summer ‘18 are HML email templates.

Although based on the Handlebars template language, our HML implementation doesn’t contain every Handlebars feature.

New ways to use merge fields include:

- Recipient merge fields that work with contact, lead, and person account records, in one email template
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_note.png)
    
    Note
    
    Not every merge field can be used with every email recipient. For example, the {{{Recipient.Department}}} merge field can be used with contacts only, while no recipient merge fields can be used when a user is the recipient.
    
    ![Inserting a merge field](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/sales_productivity/images/sales_users_email/handlebars_merge_fields.png)
    
    The Insert Merge Field window shows you which fields work with both Lead and Contact (1), with Contact only (2), or with Lead only (3).
- ID merge fields that create links to Salesforce records
- More organization-level fields, such as FY Start Month

Email templates using HML can be used in list emails.

## Guidelines for Syntax and Formatting

The syntax consists of three open curly braces, followed by the object name, a period, the field name, and three closing curly braces.

For example, to include your recipient’s first name, the merge field is {{{Recipient.FirstName}}}. If you want to include the account ID number of the account related to the email, enter or choose this merge field: {{{Account.Id}}}. When you preview or send the email, ID: 001234567890123 displays where you inserted the merge field.

If two or more custom objects have matching names or labels, only one of the objects appears when you select from available merge fields. Make sure that all custom objects have unique names and labels so that you can select merge fields from any of the objects.

To make sure you’re using the correct syntax, select merge fields from the merge field picker.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_tip.png)

Tip Most merge fields for email templates correspond directly with email template fields. If there’s a merge field you want to use that’s not listed in the picker, type it as plain text.

To use the merge field {{{Sender.Signature}}}, have users set up their signature in My Email Settings.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_productivity-264-0-0-production-enus/b2f6c36a-fa61-4a3c-9752-032ce1818a69/images/icon_note.png)

Note In the merge picker, the merge field is listed as Email Signature.

#### See Also

- [Convert a Lightning Email Template from SML to HML](https://help.salesforce.com/s/articleView?id=sales.email_template_convert_from_sml_to_hml.htm&release=264.0.0&type=5 "Take advantage of the Handlebars Merge Language (HML), which is more flexible than the Salesforce Merge Language (SML), by converting existing Lightning email templates.")
- [Considerations for Using Merge Fields in Email Templates and Letterheads](https://help.salesforce.com/s/articleView?id=sales.merge_fields_email_templates.htm&release=264.0.0&type=5 "A merge field is a placeholder used in an email, a letterhead, a mail merge template, a custom link, or a formula to incorporate values from a record. When you send the email, the placeholder is replaced with the data from the record or records of the people you’re emailing.")