DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Performs a logical AND operation between multiple values. Returns true if all values are truthy, and false otherwise.
This helper is available in the Winter ’26 release of Marketing Cloud Next (API version 65.0).
1{{and value1 value2 [value3 value4 ...]}}| Parameter | Type | Description |
|---|---|---|
value1 | Any | The first operand for the AND operation. |
value2 | Any | The second operand for the AND operation. |
value3, value4, ... | Any | Additional operands to evaluate. |
The function returns true if all parameters evaluate to true, and false otherwise. If no parameters are provided, the function returns true. If one parameter is provided, the function returns the truthiness evaluation for that parameter.
Truthiness evaluation follows these rules:
null is falsetrue, but zero is falsefalse, and non-empty strings are true[]) and empty objects ({}) are falseThis function is often used together with conditional helpers to handle multiple conditions. For example, this code example checks if the user is both an admin and is active and handles it accordingly.
1{{#if (and (equals user.role "admin") (compare user.status "==" "active"))}}
2 <!-- Handle the case where the user is both an admin and is active -->
3{{else}}
4 <!-- Handle the case where the user isn't an admin, isn't active, or both -->
5{{/if}}