Convert a Lightning Email Template from SML to HML

Take advantage of the Handlebars Merge Language (HML), which is more flexible than the Salesforce Merge Language (SML).
Available in: Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions

User Permissions Needed
To create email templates: Send Email
To attach files to email or templates: Access to the file you’re attaching
To delete email templates: Modify All Data or template ownership
To update email templates: Modify All Data or template ownership

All Lightning email templates created before Summer ‘18 are SML email templates, even if they don’t have any SML merge fields. All Lightning email templates created in Summer ‘18 and later are HML email templates, even if they don’t have any HML merge fields.

You have several choices:
  • If the email template doesn’t have any merge fields, it’s converted to an HML email template when you save it.
  • You can continue to use Classic email templates and Lightning email templates with SML merge fields. You can update and save these email templates without having to remove SML merge fields.
  • If you want to enter SML fields, do so manually. The merge picker shows HML fields only.
  • If you add SML merge fields to an HML email template, you can’t save the template until the SML merge fields are removed. You can still preview and send an email using an HML email template with SML merge fields, but the HML merge fields appear as text, not as merged data from Salesforce.
  • If an email template is modified so that it only has HML merge fields, and no SML merge fields, it’s converted to an HML email template when you save it.
Note

Note

HML email templates can't be converted to SML email templates.

To convert Classic email templates to HML email templates:
  1. Open the Classic email template.
  2. Copy and paste the content into a new Lightning email template. You can use either the Email Templates page or the email composer.
  3. Remove existing SML merge fields or replace them with equivalent HML merge fields.
  4. Save.