Learn how to use unless conditional logic in your workflow message templates
unless
helper is the inverse of the if
helper. It executes the block if the conditional value is empty or equal to 0
.
unless
as “if not” - it’s particularly useful when you want to
check if something is missing or empty.lead.phone
is empty:
lead.phone
exists, nothing will be rendered.
if
helper, unless
can include an else
block:
quote.event_address
is empty:
quote.event_address
exists:
unless
when checking for missing or empty valuesif
when the logic is complex or needs multiple conditionsif
helper, unless
treats zero (0
) as a falsy value. If you need
to treat zero differently, consider using the if
helper with
includeZero=true
.unless
and if
:
Using unless
:
if
: