You can insert these into HTML Templates using the list of Tags that we make available to you.
Go to the Tools page on the left hand side and click Email or Ticket Templates, then New Email/Ticket Template
Add relevant details - Name, Description, Subject Line
Select HTML Template Type
Add the following Merge Tags into your HTML:
a) Global Tags:
Global Tags can be inserted into the Template by referencing the correct tag and simply placing it inside two curly brackets:
{{ YOUR_TAG_HERE }}
Here's an example of some in use:
<p>Hello {{ CUSTOMER.FNAME }},</p><p>Thank you for buying tickets from {{ ORGANISATION.NAME }}, we can't wait to see you at our venue.</p><p>Your transaction with us came to a total of {{ ORGANISATION.CURRENCY_SYMBOL }}{{ TRANSACTION.TOTAL }}.</p>
b) Loop Tags:
Loop Tags need to be placed into a Loop for it to work correctly. A Loop looks like this:
{% for ticket in TRANSACTION.TICKETS %}
<-- Tags related to tickets are now available provided they are entered before the endfor loop close below -->
{% endfor %}
Once you have placed your Loop, you can add some of the tags that are available to you inside that Loop:
{% for ticket in TRANSACTION.TICKETS %}
<-- Tags related to tickets are now available provided they are entered before the endfor loop close below -->
<p>Your Tickets for {{ ticket.EVENT.NAME }} at {{ ticket.EVENT.VENUE }}:</p>
<p>Ticket Price: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.FACE_VALUE }}</p>
<p>Tax: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.TAX }}</p>
<p>Total: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.GROSS }}</p>
</p>
{% endfor %}
For these to work correctly, the identifier in the Loop (i.e. ’ticket’ in the example above) needs to be placed in front of the Tag, like this:
{{ ticket.FACE_VALUE }}
If a Merge Tag isn’t valid or doesn’t return any values, nothing will be shown in its intended position. This may be related to placing Loop Tags outside of Loops.
The following shows an example of when a Loop tag is placed outside of a Loop (e.g. after an 'endfor' - not before as it should be), that would result in it not displaying the desired data:
{%for ticket in TRANSACTION.TICKETS%}
<-- Tags related to tickets are now available provided they are entered before the endfor loop close below -->
<p>Your Tickets for {{ ticket.EVENT.NAME }}:</p>
<p>Ticket Price: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.FACE_VALUE }}</p>
<p>Tax: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.TAX }}</p>
<p>Total: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.GROSS }}</p>
</p>
{% endfor %}
<-- The below tag would not be valid as it is not included in the ticket loop -->
<p>Venue Name: {{ ticket.EVENT.VENUE }} </p>
c) Conditionals:
There are some instances where you may want sections of the ticket or the email to be conditional depending on what has been ordered. These can be achieved by using ‘if’ statements. Here are some examples:
“I want a ticket discount value to show but only if there has been a discount applied” - in this instance, you would use something as follows:
{% for ticket in TRANSACTION.TICKETS %}
<p>Ticket Price: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.FACE_VALUE }}</p>
<p>Tax: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.TAX }}</p>
<-- The following if statement will mean that the next p tag will only show if there has been a discount on the ticket -->
{% if ticket.DISCOUNT.AMOUNT > 0 %}
<p>Discount: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.DISCOUNT.AMOUNT }}</p>
{% endif %}
{% endif %}
<p>Total: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.GROSS }}</p>
{% endfor %}
”I want to show a price adjuster but only if it’s an external one, e.g. an external booking fee”:
{% for ticket in TRANSACTION.TICKETS %}
<p>Ticket Price: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.FACE_VALUE }}</p>
<-- The following loop will identify price adjusters on the ticket -->
{% for price_adjuster in ticket.PRICE_ADJUSTERS %}
<-- The following if statement says that if there are any price adjusters that are external -->
{% if price_adjuster.EXTERNAL %}
<-- The following tags will then display for any external price adjusters -->
+({{ price_adjuster.NAME }}: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ format(price_adjuster.RATE }}
{% endif %}
{% endfor %}
<p>Tax: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.TAX }}</p>
<p>Total: {{ ORGANISATION.CURRENCY_SYMBOL }}{{ ticket.GROSS }}</p>
{% endfor %}