[[Category:Booking Page]]
[[Category:Guest_Management]]
[[Category:Messaging]]
Below is <div class="heading">Template variables</div> On this page you find a List list of '''''Template Variables'''''template variables and information on how they are used.
These variables (short codes) will be replaced by the relevant information from each booking. They can be used in every text settings that allows their use . Copy them exactly as shown, including the square brackets and upper case.
[CHECKOUTEND12] - check-out end time in am/pm format (From Settings > Channel Manager > Property Content > 'Check-out end')
[PROPERTYDESCRIPTION1] - Property Description 1 from Settings > Booking Page > Page Design > Content
[PROPERTYDESCRIPTION2] - Property Description 2 from Settings > Booking Page > Page Design > Content
[PROPERTYDESCBOOKPAGE1] - Property Description Booking Page 1 from Settings > Booking Page > Page Design > Content
[PROPERTYDESCBOOKPAGE2] - Property Description Booking Page 1 from Settings > Booking Page > Page Design > Content
[PROPERTYGUESTDETAILSHEADER] - Guest Details Header from Settings > Booking Page > Page Design > Content
[PROPERTYGUESTENQUIRYHEADER] - Guest Enquiry Header from Settings > Booking Page > Page Design > Content
[PROPERTYCONFIRMBOOKBUTTON] - Confirm Booking Button Message from from Settings > Booking Page > Page Design > Content
[PROPERTYROOMNOTAVAIL] - Room Not Available Message from from Settings > Booking Page > Page Design > Content
[PROPERTYROOMNOPRICE] - Room No Price Message from from Settings > Booking Page > Page Design > Content
[PROPERTYNOROOMSAVAIL] - No Rooms Available Message from from Settings > Booking Page > Page Design > Content
== Room Variables ==
[ROOMTEMPLATE4] - ROOM Template 4
[ROOMTEMPLATE5] - ROOM Template 5
[ROOMTEMPLATE6] - ROOM Template 6
[ROOMTEMPLATE7] - ROOM Template 7
[ROOMTEMPLATE8] - ROOM Template 8
[ROOMMETAAUXTEXT] - room meta text setting for first booked room
[OFFERDESCRIPTION2] - offer description 2 for all booked rooms
[OFFERDESCRIPTION1-1] - offer description 1 for this booked room [OFFERDESCRIPTION2-1] - offer description 2 for this booked room [UNITNAME] - unit names of all the assigned room typesin the booking group (cancelled bookings are not shown)
[UNITNAME:1] - additional information about the unit for all the assigned room typesin the booking group (cancelled bookings are not shown)
[UNITNAME1] - unit name of the first assigned roomfor this booking number
[UNITNAME1:1] - additional information about the first assigned room for this booking number / add the additional information on each line after a | symbol where you set the unit names
[ROOMDESCRIPTION] - Room description (Settings > Channel Manager > Property Content > Room Content)
[ROOMDESCRIPTION1] - Room description 1 (Settings > Properties > Rooms > Setup)
[LEAVINGDAYAVAIL] - returns yes or no, can be used to trigger an Auto Action
[ROOMRACKRATENUM] - Rack Rate from CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT
[ROOMCLEANINGFEENUM] - Cleaning fee from CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT
[ROOMSECURITYDEPOSITNUM] - Securty deposit from CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT
[ROOMTAXPERCENTNUM] - Tax percentate from CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT
[ROOMTAXPERSONNUM] - Tax per Person Night from CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT
== Booking Variables ==
[LEAVINGDAYYYYY-MM-DD] - check-out day in YYYY-MM-DD format
[DAYSTOCHECKIN] - number of days until Checkcheck-in [INADVANCE] - number of days between booking and check-in.
[NUMROOM] - the quantity of rooms booked (first room type only)
[AVPRICE:15] - Average Nightly Price with offset amount
[BASEPRICE] - Lodging Price
[BASEPRICENUM] - same as [BASEPRICE] with a decimal point and no thousands separator and no currency symbols (for calculation)
[BASEGROUPPRICE] - Lodging Price for Group
[BASEGROUPPRICENUM] - same as BASEGROUPPRICE] with a decimal point and no thousands separator and no currency symbols (for calculation)
[BASEVAT] - Lodging Price vat amount
[BASEVATNUM] - same as [BASEVAT] with a decimal point and no thousands separator and no currency symbols (for calculation)
[BASEGROUPVAT] - Lodging Price vat amount for Group
[BASEGROUPVATNUM] - same as BASEGROUPVAT] with a decimal point and no thousands separator and no currency symbols (for calculation)
[AVBASEPRICE] - Average Nightly Lodging Price
[AVBASEPRICENUM] - same as [AVBASEPRICE] with a decimal point and no thousands separator and no currency symbols (for calculation)
[AVBASEGROUPPRICE] Average Nightly Lodging Price for Group
[AVBASEGROUPPRICENUM] - same as [AVBASEGROUPPRICE] with a decimal point and no thousands separator and no currency symbols (for calculation)
[DEPOSIT] - Value in deposit field with currency symbol
[GUESTNAMES] - name of all guests in the booking
[GUESTSFIRSTNAMES] - first name of all guests in the booking
[GUESTSLASTNAMES] - last name of all guests in the booking
[GUESTSNAMES] - name of all guests listed on the "guests" tab of the booking of the group booking
[GUESTFAXNUM] - guests fax number with all non-numeric characters removed
[GUESTVOUCHER] - voucher code used with booking
[GUESTCOMPANY] - company name
[GUESTCOMPANYBR] - company name with line breaks
[GUESTADDRESS] - guests address
[APISOURCE] - Beds24 channel number
[APISOURCETEXT] - human readalbe name of the channel
[NOTES] - notes
[REFERENCE] - content of the booking reference field
[STATUS] - status of booking [SUBSTATUS] - sub status of the booking
[FLAG] - Flag
[STATUSCODE] - 'Status Code' (Under tab 'Detail'. Can be a value between 0-100.)
[CANCELURL] - URL to view and cancel bookings
[BOOKINGINFOCODESBR] - Booking Info Codes - Codes and text with line break
[BOOKINGINFOCODETEXT:infoCode] - the most recent Text value of the specified Booking Info Code , "infoCode" in this example [BOOKINGINFOCODEDATE:infoCode]- the most recent date value of the specified Booking Info Code, "infoCode" in this example
[BOOKINGINFOCODEDATE:BOOKINGINVOICEEID]- invoicee id assigned to this booking, this comes from the most recent date value of booking invoicee setting, not from the specified Booking Info Code bookings invoice items [BOOKINGINVOICEENAME] - invoicee name assigned to this booking, this comes from the booking invoicee setting, not from the bookings invoice items
[CARDLASTFOUR] - last 4 digits of card
== Booking Group variables ==
=== Custom Booking Group Table ===
create your own booking group list by specifying the columns in the order you want them to appear.
for example: [BOOKGROUP:PROP_ROOM_BREF_NAME]
column parameters
ADDR = Booking address
ADUL= the number of adults
BREF = Booking number
CITY = Booking city
CHAR = Charges
CHIL = the number of children
COUN = Booking country
DEPT = Departure date
EMAI = Booking Email
FLAG = Booking flag text
FNAM = Booking first name
GADD = Guest address
GCIT = Guest city
GCOM = Guest company
GCOU = Guest country
GFLA = Guest flag text
GFNA = Guest first name
GLNA = Guest last name
GMOB = Guest mobile
GNAM = Guest full name
GEMA = Guest Email
GNOT = Guest note
GPOS = Guest postcode
GREF = Guest Id
GSTA = Guest state
GTEL = Guest phone
ICAN = Include cancelled bookings
LNAM = Booking last name MOBI = Booking mobile NAME = Guest Booking full name NOTE = Booking note ONAM = Offer Name
ONLY = Just show the one booking
PEOP = the number of guests
PHON = Booking phone
POST = Booking postcode
PROP = Property name
RDE0 = Room description (Settings > Channel Manager > Property Content > Room Content)
RDE1 = Room description 1 (Settings > Properties > Rooms > Setup)
RNAM = Room Display Name
ROOM = Room name
STAT = Booking state
TOTA = Total price
Connect the variables parameters with an underscore.
Examples:
[INVOICEUPSELLDESCRIPTION1] - description of upsell item 1 (number can be between 1 to 20)
[INVOICEEXTRAITEMDESC1] - Name of extra invoice item 1 (number can be between 0 to 20) [INVOICEEXTRAITEM1] - value of extra invoice item 1 (number can be between 0 to 20)Note: the order goes by the order in the dropdown list not by the order the items are entered.
[INVOICEEXTRAITEM1] - value of extra invoice item 1 (number can be between 0 to 20)Note: the order goes by the order in the dropdown list not by the order the items are entered.
[INVOICEEXTRAITEMNUM1] - as per [INVOICEEXTRAITEM1] but the value is displayed with a decimal point and no thousands separator (for calculations).
[INVOICEEXTRAITEMQTY1] - quantity of extra invoice item 1 (number can be between 0 to 20) Note: the order goes by the order in the dropdown list not by the order the items are entered.
[INVOICEGROSS:1] - gross amount of the inserted VAT rate (number is the VAT rate), value is displayed with a decimal point and no thousands separator (for calculations)
ONE - shows only items from the specified booking (not the booking group)
ORB - shows the items orderd by booking
PAY - shows payments
[INVOICEECODE] - code of the invoicee account the invoice is assigned to or blank
[INVOICEECURRENCY] - currency of the invoicee account the invoice is assigned to if it is not the property default or blank
[INVOICEETEMPLATE1] - template value 1 of the invoice account the invoice is assigned to or blank
[PAYPALBUTTON:200] - Creates a Paypal payment button for a fixed amount. A zero amount will cause paypal to provide a field to enter an amount. Not recommended for emails.
== Text Operators ==
[REPLACE|searchForThisText|replaceWithThisText|textToSearch] - replace "searchForThisText" with "replaceWithThisText" within the text "textToSearch"
== Mathematical Operators ==
== Dates ==
You can use PHP strftime format strings to create custom time formats. Information on PHP strftime strings is available at [http://php.net/manual/en/function.strftime.php http://php.net/manual/en/function.strftime.php]
[DAYSBETWEEN:2019-11-01:2019-11-10] - this template variable will calculate the number of days between the :: the dates need to be in yyyy-mm-dd format. Template variables can be used for calculation.
Example: [[DAYSBETWEEN:[FIRSTNIGHT:+5 days{%G-%m-%d}]:[CURRENTDATE:{%G-%m-%d}]] will calculate the days between 5 days after check-in and today.
You can use PHP strftime format strings to create custom time formats. Information on PHP strftime strings is available at [http://php.net/manual/en/function.strftime.php]
[FIRSTNIGHT:{%A, %e %B, %Y}] - first night booked
[BOOKINGDATE:+1day{%A, %e %B, %Y}] - optional date offset and display format. The offset can be any plus or minus any number of days and the display can be any valid PHP strftime format string.
[MODIFYDATE:{%A, %e %B, %Y}] - last booking modification date/time, the display can be any valid PHP strftime format string.
[PAYMENTDATE:{%A, %e %B, %Y}] - most recent payment date
If the first word is contained in the second word the first option is displayed, otherwise the second option is displayed
9. [IFIN:CHECKIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:CHECKIN]|]
If the Booking Info Code CHECKIN has been added to the booking then you will see the value in the text (date/time) otherwise blank.
[INWORDS] [INVOICEPAYMENTSNUM] [+] 10 will write out the invoice sum of all payments plus 10
These template variables are processed in the following order from left to right through the text.
i.e. all the [IF=: will be processed first, then all the [IFIN: etc.
You can use the processing order to construct logic where certain items should be processed before other items.
[IF=:
[IFIN:
[IFLIKE:
[IF>:
[IF>=:
[IF<:
[IF<=:
[IFBETWEEN:
== Encoding Template Variables ==