Skip to main content

How can I add promo codes to invoices based on ticket type? - Knowledgebase / Cloud Events - ClubRunner Support & Knowledgebase

How can I add promo codes to invoices based on ticket type?

Authors list

In certain cases, you may want to automatically include a promo code on an attendee’s invoice based on the type of ticket they purchase for a specific event. This guide outlines how to manually customize the invoice using a simple Handlebars condition.

 

Note
  • This setup must be manually configured for each event.

  • It only works if ticket names are used consistently with an exact text match.

  • You will need access to the invoice template settings for the event.

  1. To begin, click Events and then Cloud Events (Tickets) in the top menu navigation.

  2. In the left-hand menu, click Financial Email Templates.

  3. Create a copy of the existing Invoice template. For more information on how to do this, please read: How to create custom Cloud Event email templates.

  4. Click the Source tool in the editor, then insert the following Handlebars condition within the {{#each NewInvoice.PurchasedItems}} block, immediately after {{Name}}:

    <!--{{#Equals Name "VIP Ticket"}}-->

    &nbsp;<strong style="color:#4caf50; font-size:12px"> (Promo&nbsp;Code:&nbsp;VIPACCESS) </strong>

    <!--{{/Equals}}--> <!-- {{#with ../CloudEvent}} --> {{Name}} <!-- {{/with}} -->

     

    Note
    In this example, the promo code is being applied to the "VIP Ticket" option, but this can be edited depending on the ticket type you wish to apply the code to. The font size and color (#4caf50, 12px) used in this example can also be modified to match your design preferences.
  5. Save the updated template.

  6. Link your new template in the "Financial Notifications Settings" section under “Event Finance.” For more information, please see the article: How to update your Finance Settings in Cloud Events.

Helpful Unhelpful