I'm trying to create an email template that will only display line items from the current transaction (Sales Order) with a quantity of 0. How can I achieve this?
In the template, we have a table with the following body:
<table align="center" border="1" cellpadding="4" cellspacing="1" style="width: 700px; font-size: 12px; font-family: arial;">
<thead>
<tr>
<th>Item Name</th>
<th>Item Description</th>
<th>Quantity</th>
<th>Amount</th>
</tr>
</thead>
<#list transaction.item as listItem>
<tbody>
<tr>
<td>${listItem.item}</td>
<td>${listItem.description}</td>
<td style="text-align: center;">${listItem.quantity}</td>
<td style="text-align: right;">${listItem.amount}</td>
</tr>
</#list>
</tbody>
</table>
We are triggering this email via a workflow that is driven by a saved search condition. The saved search finds any Sales Order with a quantity of 0. When new results are created, the workflow is triggered and an email is sent.