---
schema_version: "1"
id: c7879d0abba5ec7c3ba80a9a34ce64bce67a71147e603ef9607e5a4a0c87e3ce
title: Considerations for Using Merge Fields in Email Templates and Letterheads
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.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.merge_fields_email_templates.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 84984b878a4cd7688802f1714080ac43ac2f2578eee031e2db5bbf01962e5063
description: 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.
products:
  - Sales Cloud
  - Cross Cloud
  - Service Cloud Voice
release: "264"
---
# Considerations for Using Merge Fields in Email Templates and Letterheads

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.

### 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: Salesforce Classic
            and 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 id="merge_fields_email_templates__mass_email_edition_exceptions"><a name="merge_fields_email_templates__mass_email_edition_exceptions"><!-- --></a>Mass email not available in: <strong>Essentials</strong>,
              <strong>Personal</strong>, <strong>Contact Manager</strong>, and <strong>Group</strong> Editions
            </p>
            <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;">
            <p style="margin-bottom:0;">HTML and Visualforce email templates aren’t available in Salesforce Classic:
              <strong>Essentials</strong> and <strong>Personal</strong> Editions
            </p>
          </td>

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

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.

- The Recipient merge field isn’t supported in email templates used for automations.
- The Created Date and Last Modified Date fields display the date only, not the date and time.
- If your template contains a merge field for which a record has no data, that field doesn’t appear in the email you send.
- Give objects and fields unique names and labels. If two or more custom objects have matching names or labels, only one of the objects appears when you select from available merge fields. For example, an object has two fields have the same name, and one field is custom and the other isn't. Create an email template with either or both of the merge fields. The merge fields always resolve to the value of the custom field.
- Merge fields have no value if they’re defined for an object that doesn't match the recipient or related to record.
- When using the Recipient merge field in a Lightning email template in the Email Composer, the data for the first recipient in the To: field is used. When using list email, the Recipient merge field gets the data for each recipient as Salesforce sends out individual emails in bulk.
- In Enhanced letterheads, only the Handlebars Merge Language and global merge fields are supported.
- If you forward or reply to an email, and the email includes characters from Salesforce merge field syntax, those characters are ignored. They aren't resolved as if they are merge fields. Instead, the email reply preserves the unresolved text and ensures that it can’t be confused with Salesforce merge fields. Correctly formatted merge fields included in forwarded or reply-to emails are resolved normally.
- The Subject field has a limit of 1,000 characters in Lightning Experience and 230 characters in Salesforce Classic. Merge fields use hidden encoding characters that count against the character limit. If the field exceeds the character limit, we remove excess characters from the end of the field.

![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 Merge fields can be used in an email, a letterhead, a mail merge template, a custom link, or a formula to incorporate values from a record.

#### See Also

- [Use the Handlebars Merge Language in Lightning Email Templates, Enhanced Letterhead, and Email Template Builder](https://help.salesforce.com/s/articleView?id=sales.handlebars_template_language.htm&release=264.0.0&type=5 "Use the Handlebars Merge Language—available in Summer ‘18—to add dynamic content to your Lightning and Email Template Builder email templates.")
- [Use the Salesforce Merge Language in Lightning Email Templates](https://help.salesforce.com/s/articleView?id=sales.merge_fields_email_templates_lex.htm&release=264.0.0&type=5 "Read these considerations for using merge fields from the Salesforce Merge Language in Lightning email templates.")
- [Use the Salesforce Merge Language in Classic Email Templates](https://help.salesforce.com/s/articleView?id=sales.merge_fields_email_templates_cex.htm&release=264.0.0&type=5 "Classic email templates use the Salesforce Merge Language (SML) only. Read these considerations for using SML.")
- [Merge Fields for Experience Cloud Sites](https://help.salesforce.com/s/articleView?id=experience.merge_fields_communities.htm&type=5&language=en_US)
- [Customize Email Sent from Experience Cloud Sites for Email Verification](https://help.salesforce.com/s/articleView?id=experience.networks_customize_email.htm&type=5&language=en_US)