How to configure a custom email: personalizing emails through tags

Modified on Wed, 23 Sep at 5:13 PM

This guide provides the necessary steps and information to create fully personalized email templates.

  1. The template must be created in HTML using the Mustache templating language to render the reservation information: http://mustache.github.io/mustache.5.html 

  2. To validate the template with test data, follow the instructions in the section “How to test personalized emails” in this guide (below).

  3. Styles should be applied inline, to reduce the chances of them displaying incorrectly across different mailing services. A simple way to do this is through tools like the following: https://putsmail.com/inliner

  4. They must have a maximum size of 64KB. You can use HTML minifiers to reduce the template size (this step should be performed after inlining the styles). https://codebeautify.org/minify-html or https://www.willpeavy.com/tools/minifier/

  5. To test how the template styles look when sent via email, you can use the following link: https://putsmail.com/tests/new

As an example, you can consult the layout of the current voucher sent at the following link.

 

TYPES OF EMAILS


Through tags, it is possible to configure the three types of emails by entering the template and selecting the "Email Type" that corresponds:


  • Confirmation Email
    To ensure both the client and the hotel receive the reservation confirmation, the system automatically sends an email to both parties at the time of booking.

  • Pre-stay Email
    This email will be sent automatically to guests with reservations registered in the system. It is possible to schedule the sending of the message a specific number of days before Check-in.

    It is useful for reminding the guest that their arrival date is approaching and also for offering them other types of promotions or communicating any information they may be interested in.

  • Post-stay Email
    These types of emails are used to thank the client for their stay. It is possible to schedule sending them a specific number of days after Check-in.

  • Cart Abandonment Email
    This type of email is used to try to increase conversion, and that the client who has abandoned the booking process at checkout, finishes the booking. Configuration Manual.

 

Below you will find the tags that will be replaced with the values of each reservation:  


Important Note: variables marked with HTML contain HTML content. In this case, to render them, you must use triple curly braces {{{    }}}. 

Example: {{{conditionInfo.checkOut}}} 

 

RESERVATION DATA


roomStayId → Reservation identifier (e.g. P6017034).

reservationId → Multiple reservation identifier (e.g. M2931360).

reservationStatus → Reservation status (e.g. confirmed).

property.name → Hotel name.

property.address → Hotel address.

property.city → Hotel city. 

property.country → Hotel country.

property.phoneNumber → Hotel contact phone number. 

property.email → Hotel contact email.

 

CUSTOMER DATA


customer.name→ Customer name.

customer.lastName → Customer last name.

customer.email → Customer email. 

customer.idCard → National ID number.

customer.adress → Customer address. 

customer.country → Customer country. 

customer.phoneNumber → Customer contact phone number. 

arrivalTime → Arrival time specified by the customer when making the reservation. 

comments → Additional comments specified by the customer when making the reservation.  

customer.tier → Tier or loyalty level of a user. (Only if the system has the "loyalty system" functionality enabled). 



DATES: 


startDate → Check-in date (e.g. December 22, 2017, Fri) 

endDate → Check-out date (e.g. December 23, 2017, Sat)

creationDate → Booking date (e.g. 2017-12-22 12:03:19) 

cancellationDate → Cancellation date (only if the system has the functionality enabled).

 

ROOMSTAY: 


units → Room units.

occupation → Number of occupants (e.g. 2 adults).

mealPlan → Board basis booked (e.g. Room Only).

condition → Rate booked (e.g. Non-refundable).

inventoryFullName → Full name of the booked selling option (e.g. Double Room, 2 adults, Room only, Non-refundable)

numberOfOccupants → Total number of people (e.g. 2).

stayNights → Total number of nights (e.g. 3)

 

ACCOMMODATION: 


accommodationInfo.ticker → Room ticker (e.g. dbl) 

accommodationInfo.name → Room type (e.g. Double Room).

accommodationInfo.description → Room description. HTML

accommodationInfo.media → List of media objects. Each object has the following properties:

url: media object URL
title: title
description: description


Usage examples: 


Show all images:
 
    {{#accommodationInfo.media}}
        <div>
            {{value.title}}
            <img src="{{value.url}}" style="margin:15px auto 0;height:80px;width:240px;"/>
        div> 
    {{/accommodationInfo.media}}
 
Show only the first image:
 
    {{#accommodationInfo.media}}
        {{#first}}
            <img src="{{value.url}}" style="margin:15px auto 0;height:80px;width:240px;"/>
        {{/first}}
    {{/accommodationInfo.media}}
 
Show only the last image:
 
    {{#accommodationInfo.media}}
        {{#last}}
            <img src="{{value.url}}" style="margin:15px auto 0;height:80px;width:240px;"/>
        {{/last}}
    {{/accommodationInfo.media}}
 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article