Using Datatable fields

With a datatable loaded into our system we can now use it's information in a variety of ways within our email campaigns. The most simple way is to just place a static direct link to an individual product within the copy text.

  1. Create an email following Email Creation
  2. In the content edit section click the Insert Datatable Field icon
  3. From the popup dialogue box select the datatable field that you want to include in your email.
    In our example we are going to include the product -> name
  4. Enter a Lookup Value for the system to use when choosing a row in the data.
    This is where our Unique field comes in. Remember we set it against the product_id field so it is this value that we need to look at. So if we want to include Football Boots from our datatable then we need to make sure the Lookup Value is set to 1.
  5. Finally we can optionally set a fallback option in the Default Text box.
    This is a piece of text that will be used if the system cannot find a product_id with a value of 1.

Our email will then place a section of code into the email which looks like this:

[datatable(lookup=1):Sports Online/products.name;A Great Product]

Format of the token

Although at first this may seem like complete technical nonsense if we take a moment to break it down into sections then we find that it is actually quite human readable.

📘

Additional knowledge

It is not essential that you understand the following technical explanation, but you may find that it helps you read your email templates directly without the need to make separate notes about the setup.

The format (syntax) of the code is...

Token partDescription
[datatablestart by opening a square bracket and tell the system we are dealing with a datatable
(lookup=row number):tell the system which row in the datatable to use (end with a colon)
path to datatable folder/tell the system where to find the datatable (end with forward slash)
name of specific datatable.tell the system which datatable to use (end with fullstop)
name of field in datatable;specify which piece of information from the datatable to use (end with semi-colon)
Optional Fallback Default Text]optionally suggest some text to use if no data is found and then close the square bracket.

So in our example we are looking for the following:
The name field in the products datatable in the Sports Online folder under the Datatables section.

Which gives us the following: