Skip to main content

Overview & FAQs: Merge Tags

Updated over 2 weeks ago

What are Merge Tags?

Transaction-specific data/code that you can insert into your HTML Email and Ticket Templates.


This could be data such as Event Name, Customer Name, Ticket price, etc.

What are the different kinds of Merge Tags I can use?

There are different kinds of Tags depending on the data that you want to include:


​1. Global Tags

These are singular values that are unrelated to a specific item in a transaction, but related to the transaction as a whole, e.g:

  • Organisation name

    • {{ ORGANISATION.NAME }}

  • Customer name

    • {{ CUSTOMER.FIRST_NAME }}

    • {{ CUSTOMER.LAST_NAME }}

  • Total value of transaction

    • {{:,.2f}".format(TRANSACTION.GROSS) }}

2. Loop Tags

These are values that tend to be related to a specific item in a transaction, e.g.:

  • Event Name

    • {{ ticket.EVENT.NAME }}

  • ​Event Venue

    • {{ ticket.EVENT.VENUE_NAME }}

    • {{ ticket.EVENT.VENUE_ADDRESS }}

  • Ticket price for event

    • {{:,.2f}".format(ticket.GROSS) }}

Loop tags need to be placed into a Loop in your HTML for it to work properly.
​

3. Conditionals

These are Tags that are conditional depending on what has been ordered, e.g.:

  • Discount value - if a discount has been applied

  • External price adjusters (external only - not internal)

    • {% if adjuster.EXTERNAL %}
      {{ adjuster.NAME }}
      {% endif % }

These can be achieved by using 'if' statements on your HTML.

FAQs

Why isn't my Merge Tag working?

This may be because Loop tags are being placed outside of Loops, or an incorrectly formatted Merge Tag/bit of HTML code.

NOTE - As the ticketing software provider, we deliver and maintain the ticketing system. We do not provide template design and as such we would suggest going to an external HTML designer for detailed help with HTML templates.

We recommend unlayer for designing HTML templates.


​ChatGPT is also very helpful for specific HTML queries.

How do I stop Event information appearing for every Ticket in my template?

By adding a if loop.first statement, followed by the Event Merge Tags you don't to appear for every ticket.

Example:

{% for ticket in TRANSACTION.TICKETS %} 
{% if loop.first %}
{{ ticket.EVENT.VENUE_NAME }}
{{ ticket.EVENT.VENUE_ADDRESS }}
{%endif %}{% endfor %}

This ensures that Venue Name and Address only appears once/for the first ticket.

You'd then need to remove {{ ticket.EVENT.VENUE_NAME }} and {{ ticket.EVENT.VENUE_ADDRESS }} from the Event information in your template.

How do I exclude returned items on my Emails/Tickets?

By adding this bit of HTML before your Event/Ticket information:

{% for ticket in TRANSACTION.TICKETS | selectattr("TRANSACTION_TYPE", "equalto", "SALE") %}

You just have to make sure the close the loop with an {% endfor %} Merge Tag.

You may want to include this in the templates that you're using for Exchanges.

Here's an example whereby you'd only want the customer to see the Performance Date/Time for their new tickets, not the old tickets they exchanged:

{% for ticket in TRANSACTION.TICKETS | selectattr("TRANSACTION_TYPE", "equalto", "SALE") %}

{{ticket.PERFORMANCE_START_TIME.strftime('%I:%M %p')}} ON {{ ticket.PERFORMANCE_START_DATE.strftime('%a %d%b') }}

{% endfor %}

How do I add the total number of Tickets in an order?

By adding this bit of code:

{% set count = TRANSACTION.TICKETS|length %}
{{ count }}

Can I remove the Line-Up logo from my Templates?

Yes, just need to remove the img section from the default templates:

Screenshot 2024-04-29 at 11.52.10.png

Can I add my own Organisation logo instead?

Yes, you just need need to change img src from the logo URL:

Screenshot 2024-08-14 at 17.25.30.png

To the Merge Tag {{ ORGANISATION.IMAGE }}:

Screenshot 2024-08-14 at 17.28.30.png

This will mean that the Organisation image from your Settings page will pull through onto the Email Template instead of the Line-Up logo.

Here's a video of these steps:

Did this answer your question?