This guide applies to:

  • Basic Edition
  • Plus Edition
  • Pro Edition
  • Business Edition

Introduction

The Notification Subject and Message fields use Twig Code Templates. These help you automatically add in information from each appointment.

This guide will help you personalize your Notifications to make each customer feel like you wrote it specially for them.

And, if you’d like to start with a base message use our Default Notification Templates.


Basic Twig Code Templates to Copy and Paste

The following Twig Code Templates don’t need to be tweaked, just copy and paste them into your notification subject and message.


Customer Name

Collected from the Booking Form Name field:

{{ Appointment.customer_information.Name }}

OR

{{ customer_name }}


Admin Email

Collected from the Admin Email field inside General Settings:

{{ admin_email }}


Appointment Type Name

Collected from the Name field inside Appointment Type Settings > Basics tab:

{{ Appointment.AppointmentType.title }}


Link to Edit, Cancel or Reschedule the Appointment

To send the unique link to edit, cancel or reschedule the appointment, anyone with access to this link can make changes:

{{ Appointment.public_edit_url }}

Customer Email

Collected from the Booking Form Email field:

{{ Appointment.customer_information.Email }}

OR

{{ customer_email }}


List of All the Customer Information Fields

Collects and lists out all the customer information fields used in the Booking Form:

{{ Appointment.customer_information_summary }}


Appointment Type Instructions

Collected from the Instructions field inside Appointment Type Settings > Basics tab:

{{ Appointment.AppointmentType.instructions }}


Appointment Date and Time

Make sure to use the correct timezone for the person who is receiving the message. Even if most of your customers are in your timezone, use the correct Twig Code Template to avoid any confusion.

To use the Appointment Date and Time with the Admin Timezone:

Start Date:

{{ Appointment.start_date | date(“F d, Y g:ia (T)”, Appointment.date_timezone) }}

End Date:

{{ Appointment.end_date | date(“F d, Y g:ia (T)”, Appointment.date_timezone) }}

To use the Appointment Date and Time with the Customer Timezone:

Start Date:

{{ Appointment.start_date | date(“F d, Y g:ia (T)”, Appointment.customer_timezone) }}

End Date:

{{ Appointment.end_date | date(“F d, Y g:ia (T)”, Appointment.customer_timezone) }}


Your Website Url

Go to WordPress DashBoard > Settings > General and look for the URL section.

Go to Settngs > General to find the two URLs

Here you’ll find two URLs, the WordPress Address and Site Address (page you set as the homepage). Sometimes these will both be the same.

To collect and use the WordPress Address URL:

{{ Global.site_url }}

To collect and use the Site Address URL:

{{ Global.home_url }}


The Customer Booking URL and Page Title

To add in the URL where the customer booked the appointment on:

{{ booking_url }}

To add in the Page title where the customer booked the appointment on:

{{ booking_title }}


Advanced Twig Code Templates

The following Twig Code Templates do need to be tweaked, don’t copy and paste into your notification subject and message until you’ve read the instructions to use them.


Specific Customer Information Fields

Display a specific customer information field using this Twig Code Template below:

{{ attribute( Appointment.customer_information, ‘MYFIELD’ ) }}

Replace MYFIELD with the name of your customer information field.


Show Customer Information Only If Filled Out

If statements are used to display Twig Code Templates only if the conditions are met.

For example, you might have an optional customer information field that you only want to show if the customer fills it out.

Use this Twig Code Template to show the field information only if the customer fills it out:

{% if attribute(Appointment.customer_information, ‘MYFIELD’ %}

MYFIELD: {{ attribute(Appointment.customer_information, ‘Westfield’ }}

{% endif %}

Replace MYFIELD with the name of your customer information field.


Custom Appointment Date Format

We can customize how the date is formatted for our Appointment Date and Time.

For example, this is used to show us the Start Date and Time of our Appointment in the Admin Timezone:

{{ Appointment.start_date | date(“F d, Y g:ia (T)”, Appointment.date_timezone) }}

In the Message, this will could look like this: July 01, 2020 2:30 pm (CDT)

That’s because this part of the Twig Code Template is formatting it: “F d, Y g:ia (T)”

Here’s a key to what each of these letters means:

  • F: The full name of the month (ex. January, February, March)
  • M: The month, three letters (Jan-Dec)
  • d: Day of the month, leading zeroes (01 to 31)
  • j: The day, no leading zeroes (1 – 31)
  • D: The weekday, in three letters (Mon, Tue, Wed)
  • Y: Year, in 4 digits

  • g: 12 hour time format, no leading zeroes
  • G: 24 hour time format, no leading zeroes
  • i: Minutes (00 to 59)
  • a: (am or pm)
  • T: Abbreviated time zone

So, if instead I wanted my date formatted like this: Mon Jul 1, 2020 14:30 CDT

I’d change it to “D M d, Y G:i T” from “F d, Y g:ia (T)”

And my new Twig Code Template would look like this:

{{ Appointment.start_date | date(“D M d, Y G:i T”, Appointment.date_timezone) }}


Convert to Uppercase

To convert any of the Twig Code Template outputs to uppercase, add the bit to the end of the statement: | upper

For example, if I wanted the customer name to be uppercase, I’d write:

{{ customer_name | upper }}


Related Guides