Handlebars - Logical Helpers
Table of Contents
Logical Helpers allow you to compare values in two ways. The Logical Helpers allow you to compare conditions with AND or OR statements to return more nuanced text to contacts receiving the emails.
- and - Returns true if ALL arguments are true (not null, false, 0, "", empty)
- Syntax: {{#if (and value1 value2 value3 ...)}}
- Example: {{#if (and [Has-Newsletter] [Has-Promotions] [Email-Verified])}}
<p>You're subscribed to all our communications!</p>
{{/if}}
- Example: {{#if (and [Has-Newsletter] [Has-Promotions] [Email-Verified])}}
- Syntax: {{#if (and value1 value2 value3 ...)}}
- or - Returns the first value that's true or the fallback if the first value is false
- Syntax: {{or value fallback}}
- Example: Hello {{or [First-Name] "Valued Customer"}}!
- Syntax: {{or value fallback}}
Pinpointe Newsletter
Join the newsletter to receive the latest updates in your inbox.