HML
HML is the acronym for Handlebars Merge Language.

Handlebars Merge Language
A lightweight templating syntax used in email and content personalization, enabling marketers to insert customer data and logic into content blocks dynamically. Initially developed by Salesforce to replace the more complex AMPscript and proprietary personalization languages in Marketing Cloud, HML is based on the Handlebars.js open-source templating engine, making it easier to read, write, and maintain.
HML enables marketers to create more responsive, personalized messaging by referencing data extensions and profile attributes in a clean, logic-friendly format. Its adoption has streamlined personalization efforts, especially for users without a deep background in scripting or development. By using double curly braces (e.g., {{FirstName}}
), marketers can insert fields, conditional statements, and fallback values directly into their HTML or text-based content.
Beyond basic personalization, HML supports conditional logic, fallback values, nested expressions, and helper functions—making it a robust solution for dynamic content across email, landing pages, and other outbound messaging assets. Its main advantage lies in its simplicity and readability compared to traditional scripting options.
Platform Differences in HML Implementation:
Each marketing automation platform interprets dynamic content and personalization differently. While HML is specific to Salesforce Marketing Cloud, comparable templating systems exist across other platforms with varying syntax, capabilities, and integration points.
- Adobe Marketo Engage: Dynamic content and tokens are central to Marketo. Instead of HML, Marketo uses token-based personalization (e.g.,
{{lead.First Name}}
) and offers segmentation-based dynamic content. While this is conceptually similar, it lacks native logic-based helpers like#if
or#unless
unless paired with Velocity scripting in email scripting blocks. - HubSpot Marketing Hub: HubSpot uses HubL (HubSpot Markup Language), which is proprietary and comparable in power to HML. It allows for personalization tokens, conditional logic, and modular content, but is exclusive to HubSpot’s ecosystem and requires some familiarity with its CMS.
- Microsoft Dynamics 365 Customer Insights – Journeys: Microsoft supports personalization via Liquid templates, a language created by Shopify. Similar to HML, Liquid enables conditional logic and merge fields within emails and content blocks. Syntax and capabilities are slightly more complex but powerful for developers.
- Oracle Eloqua: Eloqua uses field merges and dynamic content rules, which allow users to insert contact and custom object fields directly into emails (e.g.,
{{Contact.Field(FieldName)}}
). However, conditional logic is managed through Eloqua’s campaign logic and not inline within the content like HML. - Salesforce Marketing Cloud (HML): Salesforce Marketing Cloud’s HML replaces AMPscript and legacy personalization strings for many use cases. It supports logic (e.g.,
{{#if FirstName}}Hi {{FirstName}}{{else}}Hi there{{/if}}
) and is more user-friendly for non-technical users building dynamic emails. AMPscript is still available for advanced scenarios, but HML is now the preferred method for personalization in content blocks and subject lines. - Zoho Marketing Automation: Zoho supports merge tags (e.g.,
{{first_name}}
) for basic personalization but does not currently support logic-rich templating natively within the content itself. More advanced conditional formatting requires scripting within Zoho Campaigns or integration with Deluge.
HML provides a more accessible, readable way to personalize content within Salesforce Marketing Cloud and is part of a broader movement among platforms to democratize dynamic content creation through simplified templating languages. While each platform has its version of personalization logic, HML stands out for its clarity, flexibility, and suitability for marketers without a development background.