PatronManager Help

How to Set Up and Edit Custom Order Confirmation Templates

Updated on

Use this link to share with your colleagues:

How to Set Up and Edit Custom Order Confirmation Templates: https://help.pm.leapevent.tech/a/1171390

Order Confirmation emails are sent to your Patrons after every ticket transaction. They provide your patrons with a summary of their order, along with essential information about their transaction, for their personal records. These emails offer a great opportunity for you to thank your patrons for their purchase, and provide them with additional information that might be useful for your shows.  

This article will cover:

If you ever need to go back to your original email template code we have a copy at the bottom of this article that you can paste back into your template.

Are you looking for how to edit an existing template? We have instructions on how to do that here!

Creating a New Order Confirmation Template

The easiest way to customize an Order Confirmation Template is to start by creating a new template. To do so, you first need to copy the packaged template; then you can start incorporating your changes.

Let's get started

Decide which Order Confirmation Template you would like to edit

Their are two Order Confirmation Templates are included with PatronManager:

  • Ticket Order Order Confirmation Template which are sent out when a patron purchases individual ticket to an Event.
  • Subscription Order Order Confirmation Template which are sent to patrons when they purchase a subscription.

If a patron purchases both a Single Ticket and a Subscription in the same transaction, they'll receive your Subscription Order Order Confirmation email.

1. Click the Setup gear, then click Setup

2. In the Quickfind box, type "Templates" and then select "Classic Email Templates" from the list

3. Click to make sure you're in the "PatronTicket Email Templates" folder, and select the Order Confirmation Template you'd like to create

4. Click "Edit Template"

DO NOT use the "Clone" button on this page. This will result in an error.

10. Click "Edit Template"

You may see an error message on your screen that says, "Error occurred trying to load the template for preview: invalid ID field: null. Please try editing your markup to correct the problem." This message can be ignored. It's just letting you know that PatronManager is unable to display a preview because there is no Ticket Order information.

5. Copy all the code and click "Cancel"

6. Go back to the Email Templates page in Setup

Next, create a new Email Template

1. Click the Setup gear, then click Setup

2. Search "Templates" and then select "Classic Email Templates" from the list

3. Making sure  you're in the PatronTicket Email Templates folder, click "New Template"

4. Choose "Visualforce" and click "Next"

5. Fill out the Email Template Information fields and Attributes

  1. Check "Available For Use,"
  2. Give the Template a name (the Unique Name field will automatically populate)
  3. Give your email a Subject
  4. Set Recipient Type to "Contact"
  5. Set Related To Type to "PatronTicket__TicketOrder__c"
  6. Click "Save"

6. Click "Edit Template"

10. Click "Edit Template"

7. Delete the existing code in the template, and paste in the Visualforce code you copied from above

Delete the existing text/code in the template
Paste in the code you copied before

8. Find and replace "<c:TicketEmailOrderDetailText" and "<c:TicketEmailOrderDetailHTML" with "<PatronTicket:TicketEmailOrderDetailText" and "<PatronTicket:TicketEmailOrderDetailHTML"

If you're working off of the Membership Order Confirmation Template, you will also need to find and replace "<c:memberwelcome" with "<PatronTicket:MemberWelcome".

9. Click "Save"

Customize an Order Confirmation Template

Now that you've created a new email template using the Visualforce Code from the packaged template, you can move on to customizing it.

Let's start customizing

1. Click the Setup gear, then click Setup

2. Search "Templates" and then select "Classic Email Templates" from the list

3. Make sure you're in the PatronTicket Email Templates folder

4. Select the Template you'd like to customize

5. Click Edit Template

Ignore the "Error occurred trying to load the template for preview: invalid ID field: null. Please try editing your markup to correct the problem" message at the top of your screen. This error is just letting you know that more information is needed before it can generate a preview email.

6. This template includes both the plaintext and HTML versions of the template, so you'll need to customize both

This template includes both the plaintext and HTML versions of the template, so you enter in your custom text TWICE, once in each section.

The HTML section relies on formatting tags in order to create line breaks. Use <p> at the beginning and </p> at the end of each paragraph to create that formatting.

The HTML section relies on formatting tags in order to create line breaks, so you can use &lt;p&gt; and &lt;/p&gt; around each paragraph to create that formatting.
The plaintext version requires no formatting
The plaintext version requires no such formatting.

7. Place custom text under "Dear {!relatedTo.PatronTicket__FirstName__c}" and above "" in both sections.

For plaintext:
For plaintext:
For HTML:
For HTML:

To add images to your Order Confirmation Emails, check out our help article How to Add Images to Email Templates.

8. Click "Save"

Click &quot;Save&quot;

How to see a preview of your email template

You'll want to preview your email template to make sure your customizations look good before it's sent to your patrons.

Click here to learn how

1. Click the "Send Test and Verify Merge Fields" button

2. In the pop-up window, search for an example Ticket Order, and click OK.

It doesn't matter which order you select, anyone will work.

3. Click "OK"

You can mark the "Send email preview to" checkbox and identify an email address where you would like to send the test so it can be reviewed by others.

4. Both HTML and Plain Text previews will appear at the bottom of your screen.

Original email template codes

We have the original Visualforce code for your Ticket Order Confirmation template, Subscription Order Confirmation template, and Membership Order Confirmation template below. Feel free to copy and paste these codes into your Visualforce template if you ever want start over.

Click here for the code
Ticket Order Confirmation Template code
<messaging:emailTemplate subject="Your order has been submitted" relatedToType="TicketOrder__c" renderUsingSystemContextWithoutSharing="true" >
<messaging:plainTextEmailBody >
Dear {!relatedTo.FirstName__c},

<apex:outputText rendered="{!relatedTo.DeliveryMethod__c == 'Email'}" >
This email contains one or more PDF attachments that serve as your tickets.
Please print them out and bring them to the event(s).
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c == 'Will Call'}" >
Your tickets will be waiting for you at the box office.
Please bring an ID to claim your tickets.
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c == 'Ship'}" >
Your order has been processed, and you will receive your tickets in the mail soon.
</apex:outputText>

Details of your order are provided below.

<c:TicketEmailOrderDetailText order="{!relatedTo}" orderItemList="{!relatedTo.TicketOrderItems__r}" summaryViewThreshold="20" includeFulfillmentItems="true"/>

</messaging:plainTextEmailBody>
<messaging:htmlEmailBody >
<p>Dear {!relatedTo.FirstName__c},</p>

<p>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c == 'Email'}" >
This email contains one or more PDF attachments that serve as your tickets. Please print them out and bring them to the event(s).
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c == 'Will Call'}" >
Your tickets will be waiting for you at the box office. Please bring an ID to claim your tickets.
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c == 'Ship'}" >
Your order has been processed, and you will receive your tickets in the mail soon.
</apex:outputText>
</p>

<p>Details of your order are provided below.</p>

<c:TicketEmailOrderDetailHTML order="{!relatedTo}" orderItemList="{!relatedTo.TicketOrderItems__r}" summaryViewThreshold="20" includeFulfillmentItems="true"/>

</messaging:htmlEmailBody>
</messaging:emailTemplate>
Click to copy
Subscription Order Confirmation Template code
<messaging:emailTemplate subject="Your order has been submitted" relatedToType="TicketOrder__c" renderUsingSystemContextWithoutSharing="true" >

<messaging:plainTextEmailBody >
Dear {!relatedTo.FirstName__c},

<apex:outputText rendered="{!relatedTo.DeliveryMethod__c = 'Email'}" >
Thanks for your order. You've chosen to have your tickets delivered by email.
Please keep an eye out for a follow up email that will be sent when we fulfill your {!LOWER($Label.pmgr_term_Subscription)}.
This email will have one or more PDF documents attached that serve as your tickets.
Please print these and bring them to the show(s).
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c = 'Will Call'}" >
Thanks for your order. You've chosen "will call" as your delivery method,
so when we fulfill your  {!LOWER($Label.pmgr_term_Subscription)} order, your tickets will be held at the box office.
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c = 'Ship'}" >
Thanks for your order. When we fulfill your  {!LOWER($Label.pmgr_term_Subscription)} order, you'll receive your tickets in the mail.
</apex:outputText>

Details of your order are provided below.

<c:TicketEmailOrderDetailText order="{!relatedTo}" isSubscriptionConfirmationEmail="true" />

</messaging:plainTextEmailBody>

<messaging:htmlEmailBody >
<p>Dear {!relatedTo.FirstName__c},</p>

<p>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c = 'Email'}" >
Thanks for your order. You've chosen to have your tickets delivered by email.
Please keep an eye out for a follow up email that will be sent when we fulfill your  {!LOWER($Label.pmgr_term_Subscription)}.
This email will have one or more PDF documents attached that serve as your tickets.
Please print these and bring them to the show(s).
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c = 'Will Call'}" >
Thanks for your order. You've chosen "will call" as your delivery method,
so when we fulfill your  {!LOWER($Label.pmgr_term_Subscription)} order, your tickets will be held at the box office.
</apex:outputText>
<apex:outputText rendered="{!relatedTo.DeliveryMethod__c = 'Ship'}" >
Thanks for your order. When we fulfill your  {!LOWER($Label.pmgr_term_Subscription)} order, you'll receive your tickets in the mail.
</apex:outputText>
</p>

<p>Details of your order are provided below.</p>

<c:TicketEmailOrderDetailHTML order="{!relatedTo}" isSubscriptionConfirmationEmail="true" />
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Click to copy
Membership Order Confirmation Template
<messaging:emailTemplate subject="Your {!LOWER($Label.pmgr_term_Membership)} order has been submitted" recipientType="Contact" relatedToType="TicketOrder__c" renderUsingSystemContextWithoutSharing="true" >
<messaging:htmlEmailBody >
<p>Dear&nbsp;{!relatedTo.FirstName__c},</p>

<p>Thanks for your {!LOWER($Label.pmgr_term_Membership)} order!&nbsp;</p>

<c:MemberWelcome ticketorderId="{!relatedTo.Id}"
    newUserText="Your benefits have been activated. As part of your {!LOWER($Label.pmgr_term_Membership)},
        you have a user account in our Patron Portal. To begin taking advantage of your benefits,
        click the 'Log In' link below, and log in with the username and temporary password provided.
        We recommend you reset your password immediately, by clicking the 'Change Password'
        link at the bottom of the 'My Account Information' tab."
    existingUserText="Your benefits have been activated. You already have a user account in our Patron Portal.
        To begin taking advantage of your benefits, click the 'Log In' link below, and log in using the email address listed
        in the order details. If you do not remember your password, you may reset it using the 'Forgot Your Password?'
        link at the bottom of the log in page." />

<p>Details of your order are provided below:</p>

<c:TicketEmailOrderDetailHTML order="{!relatedTo}" />
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Click to copy
Email Tickets Template

This template is not a confirmation email - it is only used when emailing tickets manually from a completed Ticket Order. Here's that default code:

<messaging:emailTemplate subject="Here are your tickets for {!relatedTo.Name}" relatedToType="PatronTicket__TicketOrder__c" renderUsingSystemContextWithoutSharing="true" >
    <messaging:htmlEmailBody >
        <p>Dear {!relatedTo.PatronTicket__FirstName__c},</p>
        
        <c:VirtualTicketRenderer order="{!relatedTo}"
                renderMobileTicketLink="true"
                mobileTicketLinkMessage="Click the button below to access your tickets, print them if necessary, or add them to your digital wallet."
                virtualEventMessage="Your order contains tickets to one or more virtual events. To view your virtual event(s), click the button(s) below a few minutes before the listed time."
        />
    </messaging:htmlEmailBody>
</messaging:emailTemplate>
Click to copy
Previous Article How to Edit Confirmation Classic Email Templates
Next Article Create a Custom Order Confirmation Classic Email Template for Large Orders
Still Need Help? Continue to the Client Community