---
schema_version: "1"
id: e5434ddcd0f4b5373f50ffe8961b6a079e3fe8229bdc70063ce70c2152b1a40e
title: Use the Salesforce Merge Language in Lightning Email Templates
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/merge_fields_email_templates_lex.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.merge_fields_email_templates_lex.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7b63b430d52e83bc87458b178c9147965780343dcd5b4cdb3c8746dc82ab90fa
description: Read these considerations for using merge fields from the Salesforce Merge Language in Lightning email templates.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Use the Salesforce Merge Language in Lightning Email Templates

Read these considerations for using merge fields from the Salesforce Merge Language in Lightning 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;">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>
      </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.

## Guidelines for Syntax and Formatting

The syntax consists of an open curly brace and exclamation point, followed by the object name, a period, the field name, and a closing curly brace. For example, if you want to include the account number of your recipient, enter ID: {!Account.AccountNumber}, and the recipient’s email displays ID: 001234567890123 when you send or preview it.

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

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

Important

- 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.

## Guidelines for Using Merge Fields

In Lightning email templates, merge fields defined for an object that doesn't match the recipient or Related To record don’t have any value.

![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 Enhanced letterheads support the Handlebars Merge Language only.

If you use a merge field for which there’s no data in a particular record, that field doesn’t appear in the sent email.

The following types of merge fields aren’t supported in Lightning email templates:

- {!Receiving\_User.field\_name}
- {!Sending\_User.field\_name}
- {!BLANKVALUE(Contact.FirstName, "Valued Customer")}
- {!Contact.FirstName, Valued Customer}
- Campaign merge fields (can’t be used in list emails)
- Email message merge fields

#### See Also

- [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.")
- [_Knowledge Article:_ Use Fields from a Related Object in a Mail Merge](https://help.salesforce.com/s/articleView?id=000384840&type=1&language=en_US)