Merge Tags und If-Anweisung

Merge Tags vereinfachen das Übermitteln von bestimmten Informationen zu einer Reservierung, if-Anweisungen erlauben es, unterschiedliche Mailvorlagen zu verschicken.

1 What are merge tags?

if_MergeTag

Merge tags can be used to collect and process data or information on an individual level. Merge tags are used in text templates for e.g. reservation confirmations as placeholders if the information varies individually, e.g. the reservation time or the name of the guest.

For example, in automated emails, the merge tag for the first name - in aleno {{CustomerFirstName}} - each guest can be personally addressed by their first name. In the e-mail, the first name of the recipient of the mail is inserted in the place of the merge tag.

Example: If you want to address the guest by first name in the confirmation email, you set the merge tag with the value FirstName instead of the first name in the email template for the reservation confirmation. In the aleno system this merge tag is called {{CustomerFirstName}} . After each reservation the guest will be addressed with the first name in the automatic confirmation mail, e.g. Hello Frank. There are many different merge tags available for personalizing automatic mails.

You can find the merge tags in the email template settings by the swung brackets.

if_Befehle

 

How to link merge tags?

In the following video wie explain how to link and use merge tags in the mail templates.

1.1 Form of address

With only two steps you can give your guest the option to choose the salutation:

1. Activate the salutation option in the settings under Widget -> Customizations:

merge_tags_3_en

2. Embedding the gender if-conditions in the settings under E-mail -> Templates:

{{#if CustomerSex equal 'male'}}Dear  Mr. {{CustomerTitle}} {{CustomerLastName}},{{/if}}

{{#if CustomerSex equal 'female'}}Dear Ms. {{CustomerTitle}} {{CustomerLastName}},{{/if}}

{{#if CustomerSex equal 'other'}}Dear He/She {{CustomerTitle}} {{CustomerFirstName}} {{CustomerLastName}},{{/if}}

{{#if CustomerSex equal ''}}Dear )Mr. / Mrs.  / Herr {{CustomerTitle}} {{CustomerLastName}},{{/if}}

{{#if CustomerSex equal 'preferNotSay'}}Dear beautiful Soul {{CustomerTitle}} {{CustomerLastName}},{{/if}}

 

2 If-conditions

The If statement is nothing more than a condition. Only if the condition is met, a command or an action is triggered. You can set up an if-statement in the email template or also in other text fields in aleno.

When are if-conditions useful? For example, if you want to send a different confirmation text for reservations for certain shifts, e.g. if the confirmation email for reservations for the terrace (=shift "Terrace") should be supplemented with a nice weather note.

2.1 How is the command structured?

The command starts with the keyword #if and is terminated with the keyword /if. These keywords are set automatically by aleno. So you don't have to enter them manually.

The basic command looks like this:

For var1 you have to insert a merge tag from the list, e.g. shift name. You can find the selection of if-stateconditions and merge tags in the email template settings at the swung brackets (see above).

For var2 you then put the specific value where the condition is met or the command should be executed. In this example it would be the name of the respective shift, e.g. 'Terrace'.

This is how it looks then (you may copy this if-rule a little further down):

merge_tags_4_en

What do you have to keep in mind:
1) Delete swung brackets of the merge tag (var1) in the if-statement, as in the above example for ShiftName.
2) The specific value (var2) must be enclosed in quotes, like 'Terrace' in the above example.

The text outside the if-condition is displayed for every reservation confirmation. The text inside the if-statements additionally for reservations that meet the conditions. In the example above for reservations for the terrace.

{{#if ShiftName equal 'Terrasse'}}

Let's hope for great weather. In case of cold rainy weather the terrace will be closed and we will seat you inside.

{{/if}}

IMPORTANT: If, for example, a completely different text is to be sent depending on the shift, all text sections that refer to a specific shift must each be set within an if command. 

2.2 Combining if-conditions

If-conditions can be combined with each other. It is only important that the correct if-terminations (/if) are stored.

Here is an example (note the color-coded if-statements including their terminations):

merge_tags_5_en

Glossary Merge Tags

Here is a glossary of merge tags as well as if-statements which can be used in aleno:

 

Guest information:

  • CustomerCity
  • CustomerCode
  • CustomerCompany
  • CustomerCountry
  • CustomerEmailVerificationLink
  • CustomerFirstName
  • CustomerIsEmailConfirmed
  • CustomerIsPhoneConfirmed
  • CustomerLastName
  • CustomerPhoneVerificationLink
  • CustomerSex
  • CustomerState
  • CustomerStreet
  • CustomerTitle

Merge tag translation:

  • City 
  • Zip-Code
  • Company
  • Country
  • WalkIn verification link via E-Mail
  • FirstName
  • WalkIn confirmation via e-mail
  • WalkIn confirmation via phone
  • Last Name
  • WalkIn verification link via phone
  • gender
  • State
  • Street
  • Academic title
   


Restaurant information:

  • RestaurantName
  • RestaurantLogo

  • RestaurantLogoCenter
  • RestaurantAdress
  • RestaurantZipCode
  • RestaurantCity
  • RestaurantPublicEmail

  • RestaurantSenderEmail
  • RestaurantPhoneNumber

Merge tag translation:

  • Name of restaurant
  • Logo that was inserted in Widget settings-> Design
  • Logo centered 
  • Street of restaurant
  • Zip code of restaurant
  • City of restaurant
  • E-mail address of restaurants that has been inserted in --> General settings 
  • E-mail address in e-mail configuration
  • Phone number of restaurant

Reservation information:

  • ReservationAdditionalQuestions.          

  • ReservationCategoryName
  • ReservationCode
  • ReservationCancelLink
  • ReservationComment
  • ReservationDurationMin
  • ReservationEndDate
  • ReservationEndTime
  • ReservationOccasion
  • ReservationPeopleCount
  • ReservationStartDate
  • ReservationStartTime
  • ReservationAddGuestDataLink

Merge tag translation:

  • Questions asked during the online reservation for the respective shift incl. answers
  • Reservation category in reservation profile
  • Reservation code in reportIn
  • Cancellation link for guest -> How To
  • Comment of guest for the reservation 
  • Duration time for the reservation
  • End date of reservation
  • End time of reservation
  •  -
  • Number of guest 
  • Start date of reservation
  • Start time of reservation
  • Add additional guests (Link)

Schichtinformationen:

  • ShiftName
  • ShiftDaysAdvance
  • ShiftMinPersons

  • ShiftMaxPersons


  • ShiftSpecialConditionsMailText

MergeTag translations: 

  • Shift name ->shown in reservation widget
  • Days in advance you can reserve online
  • Minimum number of persons to make a reservation
  • Maximal number until with reservation are possible 
  • Show and special conditions in e-mail text 
    ->  configuration in shift settings 

Voucher information:

  • VoucherCode
  • VoucherCurrency
  • VoucherDescription
  • VoucherPrice
  • Invoice Status

Merge tags for voucher and sellIn 

  • Number of Voucher -Nr. -> shown in sellIn
  • Currency of Voucher / payments
  • Description of Voucher
  • Amount
  • Invoice status

Additional / specific for guests informations via if conditions:

 

7if_BefehlListe

 

If-conditions translation

If-conditions have the following structure: 
*Start* "If X is true, then do Y " *End*.

  • if A = 'X' - text example

  • if A ≠ 'X' - text example

  • if A > 'X' - text example

  • if A ≥ 'X' - text example

  • if A < 'X' - text example
  • if A ≤ 'X' - text example