Follow

Parameters on Email Templates

The email templates for "Product Purchased”, “Product Purchased Single User” and “Product Upgrade” now have thymeleaf parameters you can use to enrich your email with details of the purchase made.

When a bundle of applications is purchased, multiple emails will be sent - one for each application in the bundle.

When addons are purchased with an application - the addons details will be present in the same email as the application - but when addons are purchased on their own (ie. upgrading or buying new addons on an already purchased application) - then no email is sent.

Below we will explain each one of the available parameters and how they can be used to fit your needs:

  • ORDERS_COLLECTION

This collection contains an entry for each item in your order that is not an addon. An item in this case can be defined as any recurring fee in an edition (there can be multiple of these fees per edition - for example users and gigabytes). Included in this collection as well is an item representing the tax to be charged for all the order items in this list (if the tax is not already included in the price of the item) and an item with a discount summary if a discount was applied.

The fields available on each item in the collection are as follows:

applicationName - the name of the application.
editionName - the name of the edition purchased.
perUnitPrice - the price per unit this item costs. If the item is one of tax or discount, the price will be the localized words for TAX or DISCOUNT.
unitQuantity - the quantity of the unit purchased. Empty string if the item has no applicable quantity (for example a tax item).
totalCost - the price this item comes out to.

Example:

<table>
  <thead>
    <tr>
      <th>App Name</th>
      <th>Edition Name</th>
      <th>Price</th>
      <th>Quantity</th>
      <th>Total</th>
    </tr>
  </thead>
  <tbody>
    <tr th:each="orderLine : ${ORDERS_COLLECTION}">
      <td th:text="${orderLine.applicationName}">name</td>
      <td th:text="${orderLine.editionName}">edName</td>
      <td th:text="${orderLine.perUnitPrice}">0.99</td>
      <td th:text="${orderLine.unitQuantity}">1</td>
      <td th:text="${orderLine.totalCost}">0.99</td>
    </tr>
  </tbody>
</table>

Would produce:

<table>
  <thead>
    <tr><th>App Name</th><th>Edition Name</th><th>Price</th><th>Quantity</th>    <th>Total</th></tr>
</thead>
<tbody>
<tr>
<td>Example App</td>
<td>Test Edition</td>
<td>$6.00 / User / Month</td>
<td>1</td>
<td>$6.00</td>
</tr>
<tr>
<td>Example App</td>
<td>Test Edition</td>
<td>$6.00 / Gigabyte / Month</td>
<td>1</td>
<td>$6.00</td>
</tr>
</tbody>
</table>
  • SETUP_FEES_COLLECTION

This collection contains an entry for each set up fee in your order. It also contains entries representing the tax charged on all of the one time fee items if tax is not included in the price of the items.

The fields available on each item in the collection are as follows:
applicationName - the name of the application.
editionName - the name of the edition purchased.
perUnitPrice - the price per unit this item costs. If the item is one of tax or discount, the price will be the localized words for TAX or DISCOUNT.
unitQuantity - the quantity of the unit purchased. Empty string if the item has no applicable quantity (for example a tax item).
totalCost - the price this item comes out to.

Example:

<table>
  <thead>
    <tr>
      <th>App Name</th>
      <th>Edition Name</th>
      <th>Price</th>
      <th>Quantity</th>
      <th>Total</th>
    </tr>
  </thead>
  <tbody>
    <tr th:each="orderLine : ${ORDERS_COLLECTION}">
      <td th:text="${orderLine.applicationName}">name</td>
      <td th:text="${orderLine.editionName}">edName</td>
      <td th:text="${orderLine.perUnitPrice}">0.99</td>
      <td th:text="${orderLine.unitQuantity}">1</td>
      <td th:text="${orderLine.totalCost}">0.99</td>
    </tr>
  </tbody>
</table>

Would produce something like:

<table>
  <thead>
    <tr><th>App Name</th><th>Edition Name</th><th>Price</th><th>Quantity</th><th>Total</th></tr>
  </thead>
  <tbody>
    <tr>
      <td>Example App</td>
      <td>Setup Fee</td>
      <td>$6.00 / User</td>
      <td>1</td>
      <td>$6.00</td>
    </tr>
    <tr>
      <td>Example App</td>
      <td>Setup Fee</td>
      <td>$6.00 / Gigabyte</td>
      <td>1.25</td>
      <td>$7.50</td>
    </tr>
    <tr>
      <td>Example App</td>
      <td>Setup Fee</td>
      <td>$6.00 / One time setup</td>
      <td>1</td>
      <td>$6.00</td>
    </tr>
  </tbody>
</table>
  • SETUP_FEES_TOTALS

This collection holds the setup fee totals for your order. Each item in this collection has the following properties:

<table>
  <tbody>
    <tr th:each="setupFee : ${SETUP_FEES_TOTALS}">
      <td th:text="${setupFee.description}">desc</td>
      <td th:text="${setupFee.fee}">0.00</td>
    </tr>
  </tbody>
</table>

Would produce something like:

<table>
  <tbody>
    <tr>
      <td>Total one time fee:</td>
      <td>$19.50</td>
    </tr>
  </tbody>
</table>

  • ADDONS_TOTALS

This collection holds the addon totals for your order. Each item in this collection has the following properties:

description - the text to summarize the fee
fee - the total amount

Example:

<table>
  <tbody>
    <tr th:each="addonFee : ${ADDONS_TOTALS}">
      <td th:text="${addonFee.description}">desc</td>
      <td th:text="${addonFee.fee}">0.00</td>
    </tr>
  </tbody>
</table>

Would produce something like:

<table>
  <tbody>
    <tr>
      <td>Add-On fees:</td>
      <td>$2.25</td>
    </tr>
  </tbody>
</table>

  • TAX_TOTAL

This parameter holds the tax total for your order.

Example:

<table>
  <tbody>
    <tr th:each="tax : ${TAX_TOTAL}">
      <td th:text="${tax.description}">desc</td>
      <td th:text="${tax.fee}">0.00</td>
    </tr>
  </tbody>
</table>

Would produce something like:

<table>
  <tbody>
    <tr>
      <td>Sales Tax</td>
      <td>$1.45</td>
    </tr>
  </tbody>
</table>
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request