Email Templates

There are different values you can access via template code when constructing your capture emails. Typically, a capture email might contain images from the abandoned basket, for example, or the cost of the items. However, there are a wide range of other details and information that can be included.

Everything related to captures is accessible using the capture object.

On this page:

capture.reclaim / capture.reclaim_url

This generates the link for the user to reclaim their basket. We would recommend that this is displayed prominently in your capture email, as it is used to detect whether someone has been captured.

Of the two versions, capture.reclaim will generate a link, and accepts an argument that will become the link text.

Copy
[* capture.reclaim('Complete your purchase now!') *]

The capture.reclaim_url code will return just the URL, allowing you to construct your own HTML:

Copy
<a href="[* capture.reclaim_url *]">Complete your purchase <b>now!</b></a>

capture.name

The name of the Adestra capture. This could be used for example as:

Copy
[* capture.name | html *]

capture.description

The description from the Adestra capture.

capture.basket

Returns the basket object, which contains the following properties:

  • capture.basket.token—The token used to identify the session
  • capture.basket.email—The email address of the contact
  • capture.basket.session—The session ID, if provided
  • capture.basket.order_value—The total value of the order, as provided by the site
  • capture.basket.created—The date and time the basket was created
  • capture.basket.updated—The date and time the basket was last altered

capture.items

An array of items in the basket. All this data is as provided by the site. Each item object has the following properties:

  • item.name—The name of the item
  • item.ref—The unique identifier for the item (could be a SKU code or similar)
  • item.value—This item's value
  • item.quantity—The number of these items in the basket

Here's an example of how you might render the basket contents in an email:

Copy
<table>
    [* FOREACH item IN capture.items *]
    <tr>
        <td>
            <a href="[* capture.reclaim_url | html *]">
                <img src="[* item.image_url | html *]" alt="[* item.name | html *]">
            </a>
        </td>
        <td>
            <a href="[* capture.reclaim_url | html *]">[* item.name | html *]</a>
            x[* item.quantity | html *]
            <span class="amount">&pound;[* item.value | html *]</span>
        </td>
    </tr>
    [* END *]
</table>

The resulting capture email sent to the user might look something like this: