Merge Tags and If-Conditions
Merge tags simplify the transmission of specific information about a reservation, if-conditions allow to send automated customized mail templates.
1 What are merge tags?

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.
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:

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):

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):
{{#if ReservationPeopleCount greaterOrEqual '3'}}
{{#if ShiftName equal 'Brunch'}}
{{#if ReservationStartTime lessOrEqual '10:45'}}
this text should show for 3 or more persons but only in brunch before 11
{{/if}}
{{/if}}
{{/if}}

When if-conditions are combined, they operate as an AND function. This means that all conditions must be true at the same time for the command to execute. Unfortunately, combining them as an OR function is not possible.
Example:

-> The conditions of NOT being in the "Christmas Eve" shift AND NOT being in the "Christmas Day" shift can be true at the same time.

The conditions of being in the "Christmas Eve" shift and in the "Christmas Day" shift cannot be true at the same time.
Glossary Merge Tags
Here is a glossary of merge tags as well as if-statements which can be used in aleno:
Guest Information
| Merge Tag | Merge Tag Translation |
|---|---|
| CustomerCity | City |
| CustomerCode | Zip-Code |
| CustomerCompany | Company |
| CustomerCountry | Country |
| CustomerEmailVerificationLink | WalkIn verification link via E-Mail |
| CustomerFirstName | FirstName |
| CustomerIsEmailConfirmed | WalkIn confirmation via e-mail |
| CustomerIsPhoneConfirmed | WalkIn confirmation via phone |
| CustomerLastName | Last Name |
| CustomerPhoneVerificationLink | WalkIn verification link via phone |
| CustomerSex | gender |
| CustomerState | State |
| CustomerStreet | Street |
| CustomerTitle | Academic title |
Restaurant Information
| Merge Tag | Merge Tag Translation |
|---|---|
| RestaurantName | Name of restaurant |
| RestaurantLogo | Logo that was inserted in Widget settings-> Design |
| RestaurantLogoCenter | Logo centered |
| RestaurantAdress | Street of restaurant |
| RestaurantZipCode | Zip code of restaurant |
| RestaurantCity | City of restaurant |
| RestaurantPublicEmail | E-mail address of restaurants that has been inserted in --> General settings |
| RestaurantSenderEmail | E-mail address in e-mail configuration |
| RestaurantPhoneNumber | Phone number of restaurant |
Reservation Information
| Merge Tag | Merge Tag Translation |
|---|---|
| ReservationAdditionalQuestions. | Questions asked during the online reservation for the respective shift incl. answers |
| ReservationCategoryName | Reservation category in reservation profile |
| ReservationCode | Reservation code in reportIn |
| ReservationCancelLink | Cancellation link for guest -> How To |
| ReservationComment | Comment of guest for the reservation |
| ReservationDurationMin | Duration time for the reservation |
| ReservationEndDate | End date of reservation |
| ReservationEndTime | End time of reservation |
| ReservationOccasion | - |
| ReservationPeopleCount | Number of guest |
| ReservationStartDate | Start date of reservation |
| ReservationStartTime | Start time of reservation |
| ReservationAddGuestDataLink | Add additional guests (Link) |
Shift Information
| Merge Tag | Merge Tag Translation |
|---|---|
| ShiftName | Shift name ->shown in reservation widget |
| ShiftDaysAdvance | Days in advance you can reserve online |
| ShiftMinPersons | Minimum number of persons to make a reservation |
| ShiftMaxPersons | Maximal number until with reservation are possible |
| ShiftSpecialConditionsMailText | Show and special conditions in e-mail text -> configuration in shift settings |
Voucher Information
| Merge Tag | Merge Tags for voucher and sellIn |
|---|---|
| VoucherCode | Number of Voucher -Nr. -> shown in sellIn |
| VoucherCurrency | Currency of Voucher / payments |
| VoucherDescription | Description of Voucher |
| VoucherPrice | Amount |
| Invoice Status | Invoice status |
Additional / specific for guests informations via if conditions
| Merge Tag | If-conditions translation |
|---|---|
| {{#if var1 equal var2}}exampleText{{/if}} | if A = 'X' - text example |
| {{#if var1 notEqual var2}}exampleText{{/if}} | if A ≠ 'X' - text example |
| {{#if var1 greater var2}}exampleText{{/if}} | if A > 'X' - text example |
| {{#if var1 greaterOrEqual var2}}exampleText{{/if}} | if A ≥ 'X' - text example |
| {{#if var1 less var2}}exampleText{{/if}} | if A < 'X' - text example |
| {{#if var1 lessOrEqual var2}}exampleText{{/if}} | if A ≤ 'X' - text example |

