Pre- and Post-Event Emails can be scheduled to automatically send to your Customers before or after they attend one of your Event Instances. They are scheduled in Spektrix and sent through Dotdigital.
Using Liquid Script, your Pre- and Post-Event emails can dynamically include information from Spektrix about your Events and Customers.
You can use the Pre-Event Email Template to create your email, or follow this guide to either:
This article also covers how to apply decision logic using custom Attributes to create content variations using Liquid Script.
Editing your existing Pre- and Post- Event Emails
If you’d like to retain your existing Pre- or Post-Event email campaigns but incorporate Liquid Script features, you can take the following steps to update your email campaign.
Edit your email campaign design by following the steps below:
-
Check your subject line. You can use the @EVENTNAME@
field and any
customer data fields
to add personalisation.
-
Drag and drop a Liquid Markup block into the top of your email:
-
Paste in the following code:
{% assign spektrix_instance_id = '$INSTANCEID$' %}
-
Click APPLY:
-
Drag and drop the Pre/Post Event Header App Block directly below the Liquid Markup:
Once added to your email, you can click the block and enter an Instance ID to preview the email for a specific Instance.
If your existing email uses any legacy data fields (e.g @EVENTNAME@) these will not appear in the preview. However, they will still function once the email is delivered.
- Follow the steps in the custom Attributes and decisions section of this article to add decisions using Liquid Script. This step is optional.
- Save your email campaign. If this email campaign is already selected in the Send Rule of your Pre- and Post-Event, then it will be automatically updated.
Creating your own Pre- and Post- Event Emails
You can design a new Pre- or Post-Event email campaign which uses Liquid Script features by following the steps below.
- Create a new Email Campaign. Give the campaign a descriptive name which clearly states its purpose.
- Add personalisation into the Subject Line using the @EVENTNAME@ Data Field.
-
Drag and drop a Liquid Markup block into the top of your email:
-
Paste in the following code:
{% assign spektrix_instance_id = '$INSTANCEID$' %} -
Click APPLY:
-
Drag and drop the Pre/Post Event Header App Block directly below the Liquid Markup.
Once added to your email, you can click the block and enter an Instance ID to preview the email for a specific Instance.
- Follow the steps in the custom Attributes and decisions section of this article to add dynamic content using liquid script. This step is optional.
- Apply your organisation’s branding, content and other design to the email campaign. Save your changes.
- Create or update your Send Rule so that it references your new Pre- or Post-Event Email campaign.
Creating a Plain Text Version
To create a plain text version of your Pre-Event Email, click SAVE & CONTINUE from within the Easyeditor.
Emails containing Liquid Script cannot be automatically turned into plain text by clicking the GENERATE PLAIN TEXT VERSION button. Therefore, you will need to write the plain text version using legacy Event Data Fields.
- Hi @INFORMALSALUTATION@,
We're excited to see you for @EVENTNAME@ on @EVENTDAYOFWEEK@ @EVENTDATELONG@ at @EVENTTIME@.
Want to unsubscribe or change your details? $UNSUB$
How to preview your Pre- or Post-Event email
To preview your email, follow the steps below:
-
First, find the Event Instance ID of the Instance that you want to preview.
- Go to your Pre- or Post-Event email in Dotdigital.
-
Click on the block named Pre Event Liquid Header at the top of the email:
-
Enter your Instance ID in the Test Instance ID box and then click Apply:
TIP: Do not delete this block. Entering an Instance ID will not affect your Pre- and Post- Event Emails when they are delivered.
-
Click the preview button to check that your email displays correctly:
You can also choose a customer to preview your email as, by clicking the personalisation icon and choosing a customer:
Using Data in Custom Pre- and Post-Event Emails
You can reference customer and event data from Spektrix by using Liquid Script in your Pre- and Post-Event Emails.
REMINDER: To use Liquid Script in your Pre- or Post-Event Email, you will need to add the Pre/Post Event Header.
In this section, we’ll include all of the different types of Liquid Objects you can reference and also how to include them as Advanced Personalisation or use them to power Decisions.
Decision blocks can be used to set up content variations based on information about the customer or event. You can also use Decision blocks to combine event and customer data. This lets you create content that is even more personalised, such as showing specific event messaging to only specific customers.
Advanced Personalisation
Liquid Script Objects can be referenced in your email content as Advanced Personalisation. This is similar to including Data Fields in your emails when adding standard Personalisation.
Liquid Objects are contained within double curly brackets. To add a Liquid Object to your email, you’ll need to include the whole string, including the curly brackets. For example:
{{ event.name }}
When included in the body of your email, they will dynamically populate with the related event or customer information.
Checkbox fields only have Yes/No value and therefore will only display Yes or No.
If you copy and paste Liquid Objects from this article into your Dotdigital email, you must paste without formatting. To do this, you can use the CTRL+SHIFT+V shortcut or use click the PASTE option from the Easyeditor menu and choose remove all styles:
TIP: You cannot include event data within Dynamic Content blocks. You can use Liquid Objects within Decision blocks to achieve this.
Event Data
In the table below, you can find Liquid Objects which reference Event data from Spektrix.
REMINDER: You can only use the Event data Liquid Objects in Pre- or Post-Event emails which contain the Pre/Post Liquid Header.
| Liquid script object | Type | Description |
| {{ event.name }} | Text | Event name |
| {{ instance.url }} | Text | The Web URL against an Instance. You can find the Web URL in the Admin Interface > choose the Event >Event Details > Website > Web URL |
| {{ instance.image_path }} | Image | The URL for the Event image you have uploaded to Spektrix |
| {{ instance.image_alt_text }} | Text | Alt text of the Event image |
| {{ instance.event_description }} | Text | The Event description |
| {{ instance.event_duration }} | Text | Duration of the Event |
| {{ startDateTime | date: "dateformat" }} | Date | Date and time of the Instance. In this template, the date format is already set. You can change the date format by following the guidance in how to format dates with liquid script. |
| {{ instance.instance_startday }} | Text | Day of the event, e.g. Monday |
| {{ instance.instance_venue }} | Text | The Venue of the Seating Plan assigned to the Instance |
How to reference Event or Instance Attributes
You can use your own custom Event or Instance Attributes in Liquid Objects.
For example, if you use an Event Attribute to record the content warning of your Events, you might want to display the value of that (e.g. “contains strobe”) in an event details section of your Pre-Event email.
To do this, you will need to construct your own Liquid Object using the formula below.
For Event Attributes:
{{ event.event_attribute_name_type }}
For Instance Attributes:
{{ instance.instance_attribute_name_type }}
-
Replace attribute_name with the name of your Attribute. Any spaces or non-alphanumeric characters must be replaced with an underscore. For example, if my Instance Attribute is “Audio Described” then the liquid script would be:
{{ instance.instance_attribute_audio_described_type }} -
Replace type with the type of Attribute.
- Date: _date
- Currency: _currency
- Dropdown list/Text Field: _text
- Checkbox: _yesno
TIP: If you reference a checkbox Attribute in the body of your email, it will only show a yes or no value.
For example, if my “Audio Described” Instance Attribute is checkbox, then the liquid script would be:
{{ instance.event_attribute_audio_desciribed_yesno }}
For an Event Attribute named “Production Credit” that is a text type, the liquid script would be:
{{ event.event_attribute_production_credit_text }}
Customer Data
In the table below, you can find Liquid Objects which reference Customer data from Spektrix.
| Liquid script object | Type | Description |
| {{ contact.data.firstname }} | Text | This is the first name field in Spektrix. |
| {{ contact.data.lastname }} | Text | This is the last name field in Spektrix. |
| {{ contact.data.fullname }} | Text | Synced from the first and last name fields in Spektrix combined. |
| {{ contact.data.lastsubscribed }} | Date | The date the contact was synced with Dotdigital. For example, to receive an Integrated Email Campaign or Pre-Event Email. This is not when the customer subscribed or created their account in Spektrix. This date also changes if the contact unsubscribes and then resubscribes. |
| {{ contact.data.datemodified }} | Date | The date the account was last updated in Dotdigital (not in Spektrix). |
| {{ contact.data.formalsalutation }} | Text | This will combine the Title and Last name of the Customer if there is one present. Otherwise, the Default Value will display. |
| {{ contact.data.informalsalutation }} | Text | This will display the First name of the Customer if there is one present that is more than one character long. Otherwise, the Default Value will display. |
| {{ contact.data.customerid }} | Text | This is the Customer ID field in Spektrix. |
| {{ contact.data.dateofbirth }} | Date | This is the Date of Birth field in Spektrix. |
| {{ contact.data.bookedonce }} | Yes/No | If the customer has only ever purchased tickets for one Event. |
| {{ contact.data.neverbooked }} | Yes/No | If the customer has never purchased tickets. |
| {{ contact.data.balance }} | Number | The total unexpired account credit balance on a customer's account. |
| {{ contact.data.avgdaysbookedinadv }} | Number | The average number of days the customer purchased tickets before the Instance Date. This metric is calculated overnight. Excludes instances not in metrics. |
| {{ contact.data.avgspendperorder }} | Number | The mean average Ticket spend per Order for the customer. Excludes instances not in metrics. |
| {{ contact.data.avgspendperticket }} | Number | The mean average Ticket spend for the customer. Excludes instances not in metrics. |
| {{ contact.data.weekssincelastorder }} | Number | The number of weeks since a customer's last purchase of unreturned Tickets. Excludes instances not in metrics. |
| {{ contact.data.weekstillnextvisit }} | Number | The number of weeks until the date of the customer’s next future Instance. Excludes instances not in metrics. |
| {{ contact.data.weekssincelastvisit }} | Number | The number of weeks since the date of the customer’s most recent Instance. Excludes instances not in metrics. |
| {{ contact.data.tag_tagname }} | Yes/No |
Replace tagname with the name of the tag in Spektrix. Tags must be synced with Dotdigital before they can be used. |
| {{ contact.data.att_customerattributename }} | Depends on the type of Attribute |
Replace customerattributename with the name of the Attribute in Spektrix. Customer Attributes must be synced with Dotdigital before they can be used. |
Decisions
Decision blocks are similar to Dynamic Content blocks, you can create multiple variations to display different content based on the criteria you set.
TIP: Decision blocks are automated Liquid Script IF statements. If you are familiar with Liquid Script, you can construct your own IF statements and add them into your email in Liquid Markup blocks.
When configuring a Decision block, you are asked to create a When and an Otherwise condition:
-
When the criteria you set in the when statement is met, customers will be shown your content variation.
- Otherwise, they’ll see the default content you set in the otherwise section.
For example, you can create a statement which says when an Event has the “Film” Attribute value then display the content variation, otherwise, display the default content. The default content can also be left blank if you do not want to display anything.
Another example could be to include a Post-Event survey link which is powered by an Event Attribute. When an Event has the Post Event Survey Attribute with the checkbox value of true, then display the content variation, otherwise, display the default content.
You can also set multiple When variations within a single Decision block.
How to add a Decision block
To add a Decision block to your email, find the Liquid heading under the Build tab from the menu on the left. Drag and drop the Decision block into your email:
You will first define your criteria by creating a When statement. Then you will set your content variation and the default content for Otherwise.
To set your When statement, click on the plus icon on your Decision block:
You will then need to construct your When statement and enter it into the box:
You can use any available Event or Instance Liquid Objects within your decision blocks to set the criteria for your content variation. This includes Event and Instance Attributes.
- Type the Liquid Object without curly brackets. For example: event.name
- Select your operator. For example: ==
| Operator | Meaning |
| == | equal to |
| != | not equal to |
| > | greater than |
| < | less than |
| >= | greater than or equal to |
| <= | less than or equal to |
| contains | Includes the specified value (useful for text fields) |
- Enter the value. Text values should be entered using quotation marks. Values must match your values in Spektrix exactly, including casing and spaces. For example, “Cats”.
Tags and checkbox values can be included using true or false.
Therefore, to create a content variation that only displayed for the Event “Cats”, the complete string would be:
event.name == “Cats”
Another example using the venue field with a value of “Civic Theatre”:
instance.instance_venue == "Civic Theatre"
You can also check if a value of the field is empty by using Blank. For example, to create a decision that hides content if a value has not been set: instance.instance_duration != Blank
TIP: To reference a Blank field you must use the word Blank with a capital B.
-
Because some data fields may often not be required, referencing a data field where the value is not populated may result in your email presenting with missing information.
For example, if you choose to include the Duration field in your email in the following way:
Duration: {{instance.event_duration}} Minutes
If the Duration field is empty, the email will display zero minutes:
Duration: 0 Minutes
To prevent this, you can use a Decision block to only display if the field is not empty.
For example:
instance.event_duration != Blank
This ensures that both the label and the value disappear together if the value is empty. You can use this for any fields which are not required, including Attribute values.
- Click APPLY to create your first variation.
- You can create multiple variations within a single Decision block. To add another, click the plus icon or the New content link.
- Populate the content for each variation.
Content
You can populate the content for your variations by dragging and dropping content blocks into each variation section.
Each When condition can have its own content block. The Otherwise section will display only if none of the listed conditions are met.
In each of the variation sections, add the content that will display when the criteria is met. To add a new variation, click the New Content button.
For example:
- When the Venue has a value of “Civic Theatre”, the first block with information about the Civic Theatre will be displayed.
- When the Venue has a value of “Town Hall”, the second block with information about the Town Hall will be displayed.
- If the Instance has neither of these Attributes, the Otherwise block will be displayed. In this example, there is no content in the Otherwise block. This means that nothing will be displayed.
Adding multiple values
You can combine rules using and and or.
- and means all conditions must be true
- or means at least one condition must be true
For example, to only show content if the venue is civic theatre and the check box members bar is true:
instance.instance_venue == "Civic Theatre" and event.event_attribute_members_bar_yesno == "true"
If you want the content to appear when either condition is true, you would use:
instance.instance_venue == "Civic Theatre" or event.event_attribute_members_bar_yesno == "true"
In this case, the content would display if either the venue is Civic Theatre or the Members Bar checkbox is true.
Combine Event and Customer data
You can also combine event and customer data in your Decision blocks.
Below we’ve listed some examples to illustrate how you can harness this data to make your emails even more powerful and personalised.
-
Only show content if the venue is Civic Theatre and the Members Bar checkbox is true and the customer has a Member tag:
instance.instance_venue == "Civic Theatre" and event.event_attribute_members_bar_yesno == "true" and contact.data.tag_member == "true"
When criteria:
Variation:
-
Only show content if it’s the customer’s first visit and the venue is Town Hall:
contact.data.tag_first_visit == “true” and instance.instance_venue == “Town Hall”
When criteria:
Variation:
-
Only show content if the customer has the “step free access” Tag and the Seating Plan name is “Main House Extended Stage”:
contact.data.tag_step_free_access == “true” and instance.instance_seating_plan_name == “Main House Extended Stage”
When criteria:
Variation:
-
Only show content if the customer has the Member Tag and the Event has the “Members private view” checkbox Attribute checked:
contact.data.tag_member == “true” and event.event_attribute_members_private_view_yesno == “true”
When criteria:
Variation:
-
Only show content if the the Event has the “Post event survey” checkbox Attribute checked and the customer does not have the “staff” Tag:
event.event_attribute_post_event_survey_yesno == “true” and contact.data.tag_staff != “true”
When criteria:
Variation: