---
schema_version: "1"
id: 970bb6cc03e27df787b639128f17e7eaa92361621b46c05d8e85b853bfc3783d
title: Use HML Conditional Merge Fields
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/pardot_hml_conditional.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.pardot_hml_conditional.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0d0419b5023479d51e1b856fb6a472a88fd42590a85dc430265aa11b1b2d6ca9
description: You can use Handlebars merge fields to create simple conditional logic statements in your Account Engagement content. These statements render default content when prospect records don’t contain a value for certain fields.
products:
  - Marketing
  - Marketing Cloud Account Engagement
release: "264"
---
# Use HML Conditional Merge Fields

You can use Handlebars merge fields to create simple conditional logic statements in your Account Engagement content. These statements render default content when prospect records don’t contain a value for certain fields.

### 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: <span>All Account Engagement Editions</span></td></tr></tbody></table>

Keep these considerations in mind when you work with conditional content statements:

- Conditional statements create one-to-one replacements for empty field values, but they don’t evaluate fields for the type of data they contain. For example, you display certain content based on whether a prospect has data for their City field, but not based on whether their city is San Francisco.
- If you specified a default value for a field and created a conditional logic statement, the default value populates instead of the statement.
- You can nest up to 3 conditional logic statements.

Format your merge fields like this to create your conditional content statements:

```html
{{#if field.name}} {{else}} {{/if}}
```

For merge fields that contain links, place each link on a separate line like this:

```html
{{#if Merge.Field}}
https://www.example.com{{Merge.Field}}
{{else}}
https://www.example.com/signup
{{/if}}
```

This table shows the syntax and an example of a conditional statement.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:50%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d15466e86">Syntax</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d15466e89">Example</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d15466e86 ">
            <p>{{#if Merge.Field}}</p>
            <p>Show this text when a prospect record includes a value for the specified field.</p>
            <p>
              {{else}}
            </p>
            <p>Show this text if the field is blank.</p>
            <p style="margin-bottom:0;">{{/if}}</p>
          </td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d15466e89 ">
            <p>{{#if Recipient.FirstName}}</p>
            <p>Hi {{Recipient.FirstName}},</p>
            <p>
              {{else}}
            </p>
            <p>Hello!</p>
            <p style="margin-bottom:0;">{{/if}}</p>
          </td>

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

#### See Also

- [Add Default Mail Merge Values to Fields](https://help.salesforce.com/s/articleView?id=mktg.pardot_add_default_mail_merge_values.htm&release=264.0.0&type=5 "Set up a default mail merge value to appear when there’s no value available for a prospect field. For example, set the First Name field to show 'Valued Customer' if the first name is missing from a prospect record.")