English (United Kingdom)
Knowledge Base  >  Vik Booking  >  Customization Tips  >  Conditional Texts
As the name suggests, a conditional text is a text that depends on certain conditions in order for it to be sent. You may add a conditional text into different places, such as the Customer Email, when you need to add a message related to a specific situation. Do you need to send emails to customers who have booked your Double Room? Do you need to send the PIN code only to those who have already paid?
In order to do that, you need to follow the instructions below.

In the Conditional Texts page that you can find in the "Global > Configuration", click the blue button “New Conditional Text” and fill out the fields. Once you pick the “Conditional Text Name”, the Special Tag will be automatically filled out: this tag is indeed the one you will need to place in the document in order for the Conditional Text to be shown.

In the example below, we are creating a Conditional Text to send via email exclusively to customers who check in on Tuesdays: precisely on that day, the street in front of the hotel is closed for the weekly market.

In the "Conditional Message" parameter write down the message you want to add to the template.
At this point you need to "Add a Rule" by clicking the specific button: the Conditional Text will be sent whenever the rules, that is to say the conditions set by you, are fulfilled.

IMPORTANT: Adding at least one rule is required since Conditional Texts do not work without it.

Here we added the "Days of the Week" rule, selecting "Tuesdays" and "Check-in". Click "Save and Close".

At this point, you need to add the message inside the customer email. In order to do that, click one or more of the options in "Template Files": the Customer Email, the Invoice PDF and the Check-in document. The template will automatically open and you will decide where you want the message to be displayed in it by placing the Conditional Text Special Tag somewhere in the template.
Click "Save" from the Customer Email - Edit Template File section.

The Conditional Text is now correctly set up.

In the video tutorial, we are creating a Conditional Text for those who booked the Double Room Standard. In this case, two rules are added, "Booking Status" and "Rooms": the Conditional Text is sent whenever the booking status of a Standard Room is confirmed.
In the last part, you can see how bookings that are not confirmed or that are related to a different room will receive the email without the Conditional Text.

You can take advantage of the Conditional Texts feature in the Scheduled Cron Jobs as well: Cron Jobs are tasks that should be executed repetitively at regular intervals.
It is an action that only your server is capable of scheduling. They can be an email reminder, a SMS reminder or an invoice generator. According to the purpose of the Cron Job, you can decide to add a Conditional Text.
In the Scheduled Cron Jobs page in Management, you will find default Special Tags, in black, such as the "Customer Name" for example, and the tags of the Conditional Texts you have created, in blue. You just need to click to add them in the message.
And insert the condition:

You want to give a coupon only to those who booked a Double Room standard. You first need to create a Conditional Text with the "Rooms > Double Room Standard" rule applied. Then, you need to schedule a type Email Reminder - After check-out message Cron Job.
In order to send it exclusively to those who booked a Double Room, you will attach the "Double Room" Conditional Text tag to the Cron Job message.

To sum it up:
Conditional Texts are an essential feature for clients who want to customize the document templates available on our plugins.
Last Update: 2024-08-16
Helpful?
67% of people found this helpful.