Special placeholders

If you want to achieve a certain behaviour, you might want to use our special placeholders that help you navigate the problems of displaying beautiful HTML templates.


Any placeholder can also be used as a conditional block. Say you are using the placeholder {{orderNo}} but you know that this field is not set for every tracking. You can open a conditional block with {{# and close it again with {{/. For example:

Your package has been shipped with {{courier/pretty}}!
{{#orderNo}} Your order number is {{orderNo}}. {{/orderNo}}

Now, if the record does have an orderNo set, the second sentence with the order number will be shown. If not, the whole second sentence will be removed.

The opposite behaviour can be achieved by opening with {{! and closing with {{|. So the block will only be shown if the placeholder is not set or valid. In this example, customers with cash on delivery get a different sentence than customers without:

<p>Please remember to pay {{cashOnDelivery}} $ on delivery.</p>
<p>Your order is already paid in full, you don't have to pay on delivery.</p>

Whether conditional blocks are shown or not is type dependent. In the example above, both a value of 0 for cashOnDelivery or simply not setting cashOnDelivery at all would trigger the second block.

Country-specific content

If you want to show specific content only for certain destination countries, e.g. to let recipients know about details of their customs process, you need to know the countries ISO Alpha 3 code, e.g. USA for the United States, GBR for the UK and DEU for Germany. Now you can set up conditional placeholders like so:

<p>This is a special message for all recipient in the States.</p>

Non-clickable numbers on iPhone

By default, certain number formats will be interpreted as a phone number and turned clickable by iPhones and other mobiles.

iPhone screenshot of a order number in the subject and content turned clickable

As this also affects most order number formats, parcelLab offers special placeholders that guarantee to be plain text. So instead of simply using the placeholder {{orderNo}}, rather use these:

<p>This is a order number, not a phone number: {{orderNo/non-clickable}}</p>

When using the order number in the subject line, use this placeholder:

A subject line with for your order {{orderNo/non-clickable-subject}}

This also works for any other placeholder like {{deliveryNo}} and even {{phone}}.