Share your ideas

Make handlebars if statement more flexible

There seems to be a limitation on the handlebars if/else statement to only allow the evaluation of a single value in the expression.

Also Acoustic Marketing cloud doesn't currently facilitate nested if else statements as shown below.


We have a scenario whereby there could be two Category codes passed in the payload when submitting an XML API request to do a transactional email send operation in Acoustic.


If the Item in the online basket is assigned either of these Category codes then We want to render 1 version of a email template region. else render something else.


{{#xif 'ITEM_PARENT_CATEGORY_CODE=="138150"' }}

<p style="margin: 10px 0 0 0;">Dispatched by: xxxxxxx Furniture</p>

<p style="margin: 10px 0 0 0;"> Furniture items will be delivered within 12 weeks</p>

{{else}}

{{#xif 'ITEM_PARENT_CATEGORY_CODE=="138877"' }}

<p style="margin: 10px 0 0 0;">Dispatched by: xxxxxxx Furniture</p>

<p style="margin: 10px 0 0 0;"> Furniture items will be delivered within 12 weeks</p>

{{else}}

<p style="margin: 10px 0 0 0;">Estimated delivery: <span style="color: #424242; white-space: nowrap;">{{ITEM_EDD_STARTDATE_D}}&ndash;{{ITEM_EDD_ENDDATE_D}}</span></p>

{{/xif}}

{{/xif}}

  • firstName lastName
  • Dec 21 2022
How will this idea be used?

Generation of Order Summary emails.

What is your industry? Retail
What is the idea priority? Medium