Merge Fields¶
[Draft — pending review]
Merge fields are placeholders in your message templates that are automatically replaced with real data when the message is sent. They use the Scriban templating syntax: {{ Object.Property }}.
For example, {{ Recipient.Firstname }} will be replaced with each recipient's first name.
How They Work¶
When you send a message using a template:
- Merge fields that are the same for all recipients are expanded first (e.g. meeting name, event name, sender details)
- Merge fields that differ per recipient are expanded individually for each person (e.g. their name, accommodation, travel)
This allows you to send a single personalised message to many people at once.
Categories of Merge Fields¶
Merge fields are grouped by the type of data they pull from:
| Category | Prefix | What it includes | Example |
|---|---|---|---|
| Recipient | Recipient. |
The person receiving the message — name, contact details, accommodation, travel, vehicle | {{ Recipient.Firstname }} |
| Person | Person. |
The person the message is about (may differ from recipient in notifications) | {{ Person.Surname }} |
| Meeting | Meeting. |
Meeting name, date, time, location, host, organiser, participants | {{ Meeting.Name }} |
| Host | Host. |
The recipient's assigned host (if they have one) | {{ Host.Email }} |
| Journey | Journey. |
Journey details, vehicle, driver, passengers | {{ Journey.OriginName }} |
| Vehicle | Vehicle. |
Vehicle details, driver, assignee | {{ Vehicle.Model }} |
| Sender | Sender. |
The person sending the message | {{ Sender.Name }} |
| User | User. |
User account details (for account-related notifications) | {{ User.LoginUrl }} |
| Event | Event. |
Current event name and details | {{ Event.Name }} |
| Tenant | Tenant. |
Organisation name | {{ Tenant.DisplayName }} |
Info
Which merge fields are available depends on the context of the message. A template sent from within a meeting has access to Meeting.* fields. A template sent from a person profile does not. Sender, Event, and Tenant are always available.
Example: Meeting Invitation¶
Dear {{ Recipient.Firstname }},
You have been invited to the meeting "{{ Meeting.Name }}"
on {{ Meeting.StartTime | fmt "dddd d MMMM yyyy" }}
at {{ Meeting.StartTime | fmt "h:mm tt" }} – {{ Meeting.EndTime | fmt "h:mm tt" }}.
Location: {{ Meeting.LocationName }}
Host: {{ Meeting.HostName }}
View details: {{ Meeting.ViewUrl }}
Kind regards,
{{ Sender.Name }}
Example: Hotel Confirmation with Conditional¶
You can show or hide sections based on whether data exists:
Dear {{ Recipient.Firstname }},
{{ if Recipient.Accommodation }}
Your hotel booking:
Hotel: {{ Recipient.Accommodation.Hotel.Name }}
Address: {{ Recipient.Accommodation.Hotel.FullAddress }}
Check-in: {{ Recipient.Accommodation.CheckIn | fmt "dddd d MMMM" }}
Check-out: {{ Recipient.Accommodation.CheckOut | fmt "dddd d MMMM" }}
Room: {{ Recipient.Accommodation.RoomType.Name }}
{{ if Recipient.Accommodation.RoomType.BreakfastIncluded }}
Breakfast is included in your room rate.
{{ else }}
Breakfast is not included.
{{ end }}
{{ else }}
No hotel accommodation has been arranged for you.
{{ end }}
Formatting Dates and Times¶
Use the fmt filter with a .NET format string:
| Format string | Output example |
|---|---|
"d MMMM yyyy" |
15 March 2024 |
"dddd d MMMM yyyy" |
Friday 15 March 2024 |
"HH:mm" |
14:30 |
"h:mm tt" |
2:30 PM |
"ddd d MMM, HH:mm" |
Fri 15 Mar, 14:30 |
Example: {{ Meeting.StartTime | fmt "dddd d MMMM yyyy" }}
Formatting Booleans¶
| Filter | Usage | Output |
|---|---|---|
yesno |
{{ Recipient.Accommodation.EarlyCheckIn \| yesno }} |
"Yes" or "No" |
fmt_bool |
{{ Recipient.Attending \| fmt_bool "Attending" "Not attending" }} |
Custom text |
Full Reference¶
For the complete list of every available merge field, conditionals, loops, and formatting options, see the Scriban Template Reference.