Template Variables

From Beds24 Wiki
Jump to: navigation, search

Below is a List of Template Variables.

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.

The date variables can have an optional offset value of a number of days added after a colon, for example [FIRSTNIGHT:-3 days]

The price variables can have an optional offset value applied which can be a percentage or fixed amount with or without minus sign added after a colon, for example [PRICE:-10] or [INVOICEBALANCE:25%]


Property Variables

[PROPERTYNAME] - property name

[PROPERTYADDRESS] - property full address

[PROPERTYCITY] - property city

[PROPERTYSTATE] - property state

[PROPERTYCOUNTRY] - property country

[PROPERTYEMAIL] - property email

[PROPERTYWEB] - property web site

[PROPERTYPHONE] - property phone

[PROPERTYFAX] - property fax

[PROPERTYID] - property id number

[PROPERTYPOSTCODE] - property post code

[PROPERTYCURRENCY] - property currency code

[PROPERTYCURRENCYFRONT] - property currency symbol before number

[PROPERTYCURRENCYBACK] - property currency symbol after number

[PROPERTYLATITUDE] - property latitude

[PROPERTYLONGITUDE] - property longitude

[PROPERTYLOCATIONDESCRIPTION] - property location description

[PROPERTYLOCATIONDESCRIPTIONBR] - property location description with line break

[PROPERTYDIRECTIONS] - property directions (Settings > Channel Manager > Property Content)

[PROPERTYHEADLINE] - property headline

[PROPERTYDESCRIPTION] - property description

[PROPERTYGENERALPOLICY] - property rental policy

[PROPERTYGENERALPOLICYBR] - property rental policy with line break

[PROPERTYLEGALPOLICY] - property rental policy / obsolete

[PROPERTYCANCELPOLICY] - property cancellation policy

[PROPERTYCANCELPOLICYBR] - property cancellation policy with line breaks

[PROPERTYHOUSERULES] - property house rules (Settings > Channel Manager > Property Content)

[PROPERTYTEMPLATE1] - Property Template 1

[PROPERTYTEMPLATE2] - Property Template 2

[PROPERTYTEMPLATE3] - Property Template 3

[PROPERTYTEMPLATE4] - Property Template 4

[PROPERTYTEMPLATE5] - Property Template 5

[PROPERTYTEMPLATE5] - Property Template 6

[PROPERTYTEMPLATE7] - Property Template 7

[PROPERTYTEMPLATE8] - Property Template 8

[BOOKINGCOMHOTELID] - booking.com hotel id

[EXPEDIACOMHOTELID] - expedia.com hotel id

[PERMITID] - the permit ID

[CHECKINSTART] - check-in start time in 24hr format

[CHECKINEND] - check-in end time in 24hr format

[CHECKOUTEND] - check-out end time in 24hr format

[CHECKINSTART12] - check-in start time in am/pm format

[CHECKINEND12] - check-in end time in am/pm format

[CHECKOUTEND12] - check-out end time in am/pm format

Room Variables

[ROOMNAME] - room names of all booked rooms

[ROOMNAMEBR] - room name with line break

[ROOMNAME1] - room name of first booked room

[ROOMNAMES] - room names including quantity of each booked room

[ROOMNAMESNC] - room names including quantity of each booked room without cancelled rooms

[ROOMNAMESBR] - room names with line break

[ROOMNAMESNCBR] room names with line break without cancelled rooms

[ROOMNAMEOFFER] - room names of all booked rooms with offer name

[ROOMNAMEOFFERBR] - room names of all booked rooms with offer name with line break

[ROOMTYPEDESC] - room accommodation type first booked room

[ROOMTYPEDESCS] - room accommodation type all booked rooms

[ROOMID] - room id number

[ROOMTEMPLATE1] - ROOM Template 1

[ROOMTEMPLATE2] - ROOM Template 2

[ROOMTEMPLATE3] - ROOM Template 3

[ROOMTEMPLATE4] - ROOM Template 4

[ROOMMETAAUXTEXT] - room meta text setting for first booked room

[ROOMMETAAUXTEXTS] - - room meta text setting for all booked rooms

[INTERNALROOMNAME] - internal room name as used in the control panel, this is not the translated room name shown on the booking page

[OFFERNAME] - booked offer name for all booked rooms

[OFFERNAME1] - offer name for this booked room only

[OFFERDESCRIPTION1] - offer description 1 for all booked rooms

[OFFERDESCRIPTION2] - offer description 2 for all booked rooms

[UNITNAME] - unit names of all the assigned room types

[UNITNAME:1] - additional information about the unit for all the assigned room types

[UNITNAME1] - unit name of the first assigned room

[UNITNAME1:1] - additional information about the first assigned room / 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)

Booking Variables

[BOOKID] - booking reference

[GROUPID] - booking reference of the master booking

[REFERENCENUMBER] - booking reference

[FIRSTNIGHT] - first night booked

[FIRSTNIGHTSHORT] - first night booked in 1 Apr 2016 format

[FIRSTNIGHTYYYY-MM-DD] - first night booked in YYYY-MM-DD format

[LASTNIGHT] - last night booked

[LASTNIGHTSHORT] - last night booked in 1 Apr 2016 format

[LASTNIGHTYYYY-MM-DD] - last night booked in YYYY-MM-DD format

[LEAVINGDAY] - check-out day

[LEAVINGDAYSHORT] - check-out day in 1 Apr 2016 format

[LEAVINGDAYYYYY-MM-DD] - check-out day in YYYY-MM-DD format

[DAYSTOCHECKIN] - number of days until Check-in

[NUMROOM] - the quantity of rooms booked (first room type only)

[NUMROOMS] - the quantity of rooms booked (sum of all rooms and room types)

[NUMNIGHT] - number of nights

[NUMADULT] - number of adults in this room or in group if master booking

[NUMADULT1] - number of adults in this room

[NUMCHILD] - number of children in this room or in group if master booking

[NUMCHILD1] - number of children in this room

[NUMPEOPLE] - number of guests in this room or in group if master booking

[NUMPEOPLE1] - number of people in this room

[RATEDESC] - rate description

[RATEDESCBR] - name of the rate with HTML <BR> to force new lines

[PRICE] - Value in price field (number entered in the price field of the booking) with currency symbol

[PRICENC] - Value in price field (number entered in the price field of the booking) without currency symbol (do not use in calculations, use PRICENUM)

[PRICE:10%] - Percentage value of Price

[PRICE:-10] - Price with offset amount

[PRICENUM] - As per [PRICE] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[PRICENUM:] - As per [PRICE:] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[PRICELESSCOMMISSION] - Value in price field less value in commission field with currency symbol

[PRICELESSCOMMISSIONNUM] - As per [PRICELESSCOMMISSION] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[PRICELESSTAX] - Value in price field less value in tax field with currency symbol

[PRICELESSTAXNUM] - As per [PRICELESSTAX] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[AVPRICE] - Average Nightly Price with currency symbol

[AVPRICENUM] - Average Nightly Price with a decimal point and no thousands separator and no currency symbols (for calculation).

[AVPRICE:20%] - Percentage value of Average Nightly Price

[AVPRICE:15] - Average Nightly Price with offset amount

[DEPOSIT] - Value in deposit field with currency symbol

[DEPOSITNUM] - As per [DEPOSIT] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[TAX] - Value in tax field with currency symbol

[TAXNUM] - As per [TAX] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[COMMISSION] - Value in commission field with currency symbol

[COMMISSIONGROUP] - Value of the commission of the complete group booking

[COMMISSIONNUM] - As per [COMMISSION] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation).

[GUESTTITLE] - guest title

[GUESTFIRSTNAME] - first name

[GUESTNAME] - last name

[GUESTSNAME] - name of all guests listed on the "guests" tab of this booking

[GUESTNAMES] - name of all guests in the booking

[GUESTSNAMES] - name of all guests listed on the "guests" tab of the booking of the group booking

[GUESTFULLNAME] - title, first name, last name

[GUESTFULLNAMES] - titles, first names, last names of all guests in the booking

[GUESTFULLNAMESBR] - titles, first names, last names of all guests in the booking with line break

[GUESTEMAIL] - guest's Email address

[GUESTPHONE] - guests phone number

[GUESTPHONENUM] - guests phone number with all non-numeric characters removed

[GUESTMOBILE] - guests mobile number

[GUESTMOBILENUM] - guests mobile number with all non-numeric characters removed

[PHONELAST1] - last digit of the guests phone number if guest phone is empty it will use the guests mobile number

[PHONELAST2] - last 2 digits of the guests phone number if guest phone is empty it will use the guests mobile number

[PHONELAST3] - last 3 digits of the guests phone number if guest phone is empty it will use the guests mobile number

[PHONELAST4] - last 4 digits of the guests phone number if guest phone is empty it will use the guests mobile number

[PHONELAST5] - last 5 digits of the guests phone number if guest phone is empty it will use the guests mobile number

[PHONELAST6] - last 6 digits of the guests phone number if guest phone is empty it will use the guests mobile number

[GUESTFAX] - guests fax number

[GUESTFAXNUM] - guests fax number with all non-numeric characters removed

[GUESTCOMPANY] - company name

[GUESTADDRESS] - guests address

[GUESTADDRESSBR] - guests address with line breaks

[GUESTPOSTCODE] - guests postcode

[GUESTCITY] - guests city

[GUESTSTATE] - guests state

[GUESTCOUNTRY] - guests country from free text field is not empty, otherwise from selector list

[GUESTCOUNTRYHL] - guests country from free text field is not empty, otherwise from selector list in hosts languabe

[GUESTCOUNTRYGL] - guests country from free text field is not empty, otherwise from selector list in guests language

[GUESTCOUNTRYSELECT] - guests country from selector list

[GUESTCOUNTRYSELECTHL] - guests country from selector list in hosts language

[GUESTCOUNTRYSELECTGL] - guests country from selector list in guests language

[GUESTCOUNTRYTEXT] - guests country from free text field

[GUESTARRIVALTIME] - arrival time

[GUESTCOMMENTS] - comments in the booking

[GUESTCOMMENTSBR] - comments in the booking with line breaks

[GUESTCUSTOMQ1] - answer to custom question 1

[GUESTCUSTOMQ2] - answer to custom question 2

[GUESTCUSTOMQ3] - answer to custom question 3

[GUESTCUSTOMQ4] - answer to custom question 4

[GUESTCUSTOMQ5] - answer to custom question 5

[GUESTCUSTOMQ6] - answer to custom question 6

[GUESTCUSTOMQ7] - answer to custom question 7

[GUESTCUSTOMQ8] - answer to custom question 8

[GUESTCUSTOMQ9] - answer to custom question 9

[GUESTCUSTOMQ10] - answer to custom question 10

[GUESTLANGUAGE] - guest language

[REFERRER] - Referrer

[ORIGINALREFERRER] - Original referrer

[APIREF] - the booking number at the originating channel

[APIMESSAGE] - api message sent by originating channel

[APISOURCE] - Beds24 channel number

[NOTES] - notes

[NOTESBR] - notes with line breaks

[GROUPNOTE] - group note

[MESSAGE] - the content of the booking message field

[MESSAGEBR] - the content of the booking message field with line breaks

[REFERENCE] - content of the booking reference field

[STATUS] - status of booking

[FLAG] - Flag

[CANCELURL] - URL to view and cancel bookings

[CANCELDATE] - date until when the booking is cancelable displaying a phrase

[CANCELDATEYYYY-MM-DD] - date until when the booking is cancelable displaying a date. If the date is in the past 00-00-0000 will be shown

[GUESTLOGIN] - URL to view bookings

[CURRENTDATE] - current date

[CURRENTDATEYYYY-MM-DD] - current date in YYYY-MM-DD format

[CURRENTTIME] - current time

[BOOKINGDATE] - booking date

[BOOKINGTIMEDATE] - booking date and time

[BOOKINGDATEYYYY-MM-DD] - booking date in YYYY-MM-DD format

[BOOKINGIP] - ip address of booker's computer

[VIEWBOOKING] - create a URL to log into the control panel and view this booking (for hosts, not intended to be sent to guests)

[EMAIL:00] - Status of an Auto Action email. Replace 00 with the number of the Auto Action. This shows if the email has been sent and if so, the time it was sent.

[BOOKIDLAST1] - Last 1 digit of booking number

[BOOKIDLAST2] - Last 2 digits of booking number

[BOOKIDLAST3] - Last 3 digits of booking number

[BOOKIDLAST4] - Last 4 digits of booking number

[BOOKIDLAST5] - Last 5 digits of booking number

[BOOKIDLAST6] - Last 6 digits of booking number

[BOOKIDLAST7] - Last 7 digits of booking number

[BOOKIDLAST8] - Last 8 digits of booking number

[RANDOM1] - a 1 digit random number seeded from the booking number

[RANDOM2] - a 2 digit random number seeded from the booking number

[RANDOM3] - a 3 digit random number seeded from the booking number

[RANDOM4] - a 4 digit random number seeded from the booking number

[RANDOM5] - a 5 digit random number seeded from the booking number

[RANDOM6] - a 6 digit random number seeded from the booking number

[RANDOM7] - a 7 digit random number seeded from the booking number

[RANDOM8] - a 8 digit random number seeded from the booking number

[BOOKINGINFOITEMS] - Booking Info Codes - Codes and text

[BOOKINGINFOTEXTS] - Booking Info Codes - Text only

[BOOKINGINFOCODES] - Booking Info Codes - Codes only

[BOOKINGINFOCODETEXT:] - the most recent Text value of the specified Booking Info Code

[BOOKINGINFOCODEDATE:]- the most recent date value of the specified Booking Info Code

[CARDLASTFOUR] - last 4 digits of card


Booking Group variables

Custom Booking Group Table

ADUL= the number of adults

ARIV = Arrival date

BREF = Boking number

CHAR = Charges

CHIL = the number of childeren

DEPT = Departure date

ICAN = Include cancelled bookings

NAME = Guest name

ONLY = Just show the one booking

PAID = Paid amount

PEOP = the number of guests

PROP = Property name

ROOM = Room name

TOTA = Total price

UNI2 = Unit first additional information

UNI3 = Unit second additional information

UNIT = Unit name


Connect the variables with an underscore.

Examples:

[BOOKGROUP:PROP_ROOM_BREF_NAME] will display the property name, room name, booking number and guest name in this order.


[BOOKGROUP:BREF_NAME_PROP_ROOM] will display the booking number, guest name property name and room name in this order.

Booking Group Table with fixed content

[BOOKGROUPROOMLIST] - create a table of guest names including room type for a group booking

[BOOKGROUPROOMLISTTOTAL] - create a table of guest names including room type for a group booking with guest totals

[BOOKGROUPROOMLISTCHARGETOTAL] - create a table of guest names including room type and charge for a group booking with guest totals

[BOOKGROUPNAMELIST] - create a table of guest names including room type and unit for a group booking

[BOOKGROUPNAMELISTTOTAL] - create a table of guest names including room type and unit for a group booking with guest totals

[BOOKGROUPNAMELISTCHARGETOTAL] - create a table of guest names including room type and unit and charge for a group booking with guest totals

[BOOKGROUPUNITLIST] - create a table of guest names including unit for a group booking

[BOOKGROUPUNITLISTTOTAL] - create a table of guest names including unit for a group booking with guest totals

[BOOKGROUPUNITLISTCHARGETOTAL] - create a table of guest names including unit and charge for a group booking with guest totals

Invoice Variables

[INVOICENUMBER] - invoice number

[INVOICENUMBERS] - invoice number if invoicees are involved

[INVOICEDATE] - invoice date

[INVOICEDATE:+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.

[INVOICEBALANCE] - invoice balance

[INVOICEBALANCE:50%] - percentage of invoice balance

[INVOICEBALANCE:-100] - invoice balance with offset amount

[INVOICEBALANCENUM] - As per [INVOICEBALANCE] but the value is displayed with a decimal point and no thousands separator (for calculation).

[INVOICEBALANCENUM:] - As per [INVOICEBALANCE:] but the value is displayed with a decimal point and no thousands separator (for calculation).

[INVOICEPARTBALANCE:status1,status2,!status4:10%] - Calculate the balance of all invoice items with matching status and apply optional multiplier or offset. The status items can be a comma separated list. To exclude status items prefix them with an exclamation mark, for example !status1. The offset is optional and can be specified after a second colon (:) and it can be a percentage by ending the number with the percent (%) symbol or a numeric value offset.

[INVOICEPARTBALANCENUM:status1,status2,status4:10%] - As per INVOICEPARTBALANCE but the value is displayed with a decimal point and no thousands separator (for calculation).

[INVOICEBALANCE1] - invoice balance of one booking only, not the booking group

[INVOICEBALANCE1NUM] - As per [INVOICEBALANCE1] but the value is displayed with a decimal point and no thousands separator (for calculation)

[INVOICECHARGES] - invoice sum of all charges

[INVOICECHARGES:50%] - invoice sum of all charges with percentage multiplier

[INVOICECHARGES:-100] - invoice sum of all charges with offset

[INVOICECHARGESNUM] - As per [INVOICECHARGES] but the value is displayed with a decimal point and no thousands separator (for calculation)

[INVOICECHARGESNUM:] - As per [INVOICECHARGES:] but the value is displayed with a decimal point and no thousands separator (for calculation)

[INVOICEPARTCHARGES:status1,status2,!status4:10%] - Calculate the balance of all invoice charges with matching status and apply optional multiplier or offset. The status items can be a comma separated list. To exclude status items prefix them with an exclamation mark, for example !status1. The offset optional and can be specified after a second colon (:) and it can be a percentage by ending the number with the percent (%) symbol or a numeric value offset.

[INVOICEPARTCHARGESNUM:status1,status2,status4:10%] - As per INVOICEPARTCHARGES but the value is displayed with a decimal point and no thousands separator (for calculation).

[INVOICEPAYMENTS] - invoice sum of all payments

[INVOICEPAYMENTS:50%] - invoice sum of all payments with percentage multiplier

[INVOICEPAYMENTS:-100] - invoice sum of all payments with offset

[INVOICEPAYMENTSNUM] - As per [INVOICEPAYMENTS] but the value is displayed with a decimal point and no thousands separator (for calculation)

[INVOICEPAYMENTSNUM:50%] - As per [INVOICEPAYMENTS:50%] but the value is displayed with a decimal point and no thousands separator.

[INVOICEPARTPAYMENTS:status1,status2,!status4:10%] - Calculate the balance of all invoice payments with matching status and apply optional multiplier or offset. The status items can be a comma separated list. To exclude status items prefix them with an exclamation mark, for example !status1. The offset optional and can be specified after a second colon (:) and it can be a percentage by ending the number with the percent (%) symbol or a numeric value offset.

[INVOICEPARTPAYMENTSNUM:status1,status2,status4:10%] - As per INVOICEPARTCHARGES but the value is displayed with a decimal point and no thousands separator (for calculation).

[INVOICECREDITS] - invoice sum of all credit items (negative items)

[INVOICECREDITS:50%] - invoice sum of all credit items with percentage multiplier

[INVOICECREDITS:-100] - invoice sum of all credit items with offset

[INVOICECREDITSNUM] - As per [INVOICECREDITS] but the value is displayed with a decimal point and no thousands separator (for calculation)

[INVOICECREDITSNUM:] - As per [INVOICECREDITS:] but the value is displayed with a decimal point and no thousands separator (for calculation)

[INVOICEDEBITS] - invoice sum of all debit items (positive items)

[INVOICEDEBITS:50%] - invoice sum of all debit items with percentage multiplier

[INVOICEDEBITS:-100] - invoice sum of all debit items with offset

[INVOICEDEBITSNUM] - As per [INVOICEDEBITS] but the value is displayed with a decimal point and no thousands separator (for calculations) (for calculations)

[INVOICEDEBITSNUM:] - As per [INVOICEDEBITS:] but the value is displayed with a decimal point and no thousands separator (for calculations)

[INVOICEVAT] - invoice sum of all vat value

[INVOICEVATNUM] - invoice sum of all vat value for calculations)

[INVOICEFIRSTITEM] - price of the item listed first in the invoice

[INVOICEFIRSTITEMNUM] - price of the item listed first in the invoice but the value is displayed with a decimal point and no thousands separator (for calculations)

[INVOICEUPSELL0] - base price without upsell items or other charges added later

[INVOICEUPSELLNUM0] - as per [INVOICEUPSELL1] but the value is displayed with a decimal point and no thousands separator (for calculations)

[INVOICEUPSELL1] - value of upsell item 1 (number can be between 0 to 20)

[INVOICEUPSELLNUM1] - as per [INVOICEUPSELL1] but the value is displayed with a decimal point and no thousands separator (for calculations)

[INVOICEUPSELLQTY1] - quantity of upsell item 1 (number can be between 1 to 20)

[INVOICEUPSELLHEADLINE1] - headline of upsell item 1 (number can be between 1 to 20)

[INVOICEUPSELLDESCRIPTION1] - description of upsell item 1 (number can be between 1 to 20)

[INVOICEEXTRAITEM1] - value 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)

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

[UPSELLTABLE] - table with all upsell items

[UPSELLTABLEVAT] - table with all upsell items with vat information and vat summary

[UPSELLTABLENOREFUND] - table with all upsell items except refundable items

Invoice Table

Custom Invoice Table

You have the option to create a custom invoice table. Available content variables are:

AMO - shows the net value (price x quantity)

CEX - charges excluded (charges will not be shown)

CON - currency conversion. Example: CONEURUSD will convert the first currency (Euros) to the second currency (USD)

CUA - currency symbol showing after the numbers. Example: CUA€ will show € after the figures

CUB - currency symbol showing before the numbers. Example: CUB€ will show € before the figures

DEC - Decimal points. Example: DEC, will show a comma as decimal point. If nothing is set the system will use the default for the language

DP0 - no decimal places

DP1 - 1 decimal place

DP2 - 2 decimal places

DP3 - 3 decimal places

DP4 - 4 decimal places

GRP - Group Totals. Displays the same items as a total

GRT - Grand Total

INV - invoicee add the invoicee number at the end. Example: INV20 to show invoicee number 20

LAN - language. Example LANDE will force the language to German

MUL - multiplier. Example: MUL1.2 will multiply all prices by 1.2

DAT - adds a date column

PAY - shows payments

PRI - shows prices

QTY - shows quantity

SEX - status excluded. Calculate the balance of all invoice items except for the ones with these status, the status items can be a comma separated list. Example: SEX status1,status2,status4 will not show items with this status.

SIN - status included. Calculate the balance of all invoice items with matching status, the status items can be a comma separated list. Example: SIN status1,status2,status4 will only show items with this status.

STA- shows staus

THO - thousands separator. THO. will show a dot as thousand separator. If nothing is set the system will use the default for the language

TOT - shows total amounts

VAA - shows VAT amounts

VAP - shows VAT percents

VAT - VAT summary


Connect the variables with an underscore.

Examples:

[INVOICE:PRI_QTY_CUA€] will create an invoice table with price and quantity in Euros.

[INVOICE:PAY_TOT_CEX] will create an invoice table which will only show payments.

Invoice Tables with predefined content

[INVOICETABLE] - invoice table

[INVOICETABLE:$1.1$] - invoice table and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEPART:status1,status2,!status4] - Invoice table showing only items with matching status. The status items can be a comma separated list. To exclude status items prefix them with an exclamation mark, for example !status1.

[INVOICETABLE2] - invoice table with status field

[INVOICETABLE2:$1.1$] - invoice table with status field and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLECHARGES] - invoice table showing charges only

[INVOICETABLECHARGESINVOICEE1234] - invoice table showing charges only assigned to the specified invoicee, specify the invoicee Id number.

[INVOICETABLENOTOT] - invoice table without grand total

[INVOICETABLENOTOT:$1.1$] - invoice table without grand total and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLENOTOT2] - invoice table with status field without grand total

[INVOICETABLENOTOT2:$1.1$] - invoice table with status field without grand total and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVAT] - invoice table with vat information and vat summary

[INVOICETABLEVAT:$1.1$] - invoice table with vat information and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVATCOMPACT] - compact version of invoice table with vat information and vat summary

[INVOICETABLEVATCOMPACT:$1.1$] - compact version of invoice table with vat information and vat summary and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVATCOMPACTNOSUM] - compact version of invoice table with vat information without vat summary

[INVOICETABLEVATCOMPACTNOSUM:$1.1$] - compact version of invoice table with vat information without vat summary and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVATNOSUM] - invoice table with vat information without vat summary

[INVOICETABLEVATNOSUM:$1.1$] - invoice table with vat information without vat summary and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEDATEVATNOSUM] - invoice table with vat information and date without vat summary

[INVOICETABLEDATEVATNOSUM:$1.1$] - invoice table with vat information and date without vat summary and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVAT2] - invoice table with vat information and status field and vat summary

[INVOICETABLEVAT2:$1.1$] - invoice table with vat information and status field and vat summary and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVAT2NOSUM] - invoice table with vat information and status field without vat summary

[INVOICETABLEVAT2NOSUM:$1.1$] - invoice table with vat information and status field without vat summary and currency multiplier with optional new currency symbol before or after price.

[INVOICETABLEVATCHARGES] - invoice table showing charges only with vat information and vat summary

[INVOICETABLENOPRICE] - invoice table with no price information

[INVOICETABLEINVOICEE] - invoice table excluding items assigned to an invoicee.

[INVOICETABLEINVOICEE1234] - invoice table for a specific invoicee, specify the invoicee Id number.

Invoicee Variables

[INVOICEEBALANCE] - invoice balance for unassigned invoice items.

[INVOICEEBALANCENUM] - invoice balance for unassigned invoice items displayed with a decimal point and no thousands separator.

[INVOICEEBALANCE1234] - invoice balance for invoice items assigned to invoicee 1234 (change 1234 to the required Invoicee Id number).

[INVOICEEBALANCENUM1234] - invoice balance for invoice items assigned to invoicee 1234 (change 1234 to the required Invoicee Id number) displayed with a decimal point and no thousands separator.

[INVOICEECHARGES] - invoice charges for unassigned invoice items.

[INVOICEECHARGESNUM] - invoice charges for unassigned invoice items displayed with a decimal point and no thousands separator.

[INVOICEECHARGES1234] - invoice charges for invoice items assigned to invoicee 1234 (change 1234 to the required Invoicee Id number).

[INVOICEECHARGESNUM1234] - invoice charges for invoice items assigned to invoicee 1234 (change 1234 to the required Invoicee Id number) displayed with a decimal point and no thousands separator.

[INVOICEEPAYMENTS] - invoice payments for unassigned invoice items.

[INVOICEEPAYMENTSNUM] - invoice payments for unassigned invoice items displayed with a decimal point and no thousands separator.

[INVOICEEPAYMENTS1234] - invoice payments for invoice items assigned to invoicee 1234 (change 1234 to the required Invoicee Id number)

[INVOICEEPAYMENTSNUM1234] - invoice payments for invoice items assigned to invoicee 1234 (change 1234 to the required Invoicee Id number)

[INVOICEENAME] - name of the invoicee account the invoice is assigned to or blank

[INVOICEECODE] - code of the invoicee account the invoice is assigned to or blank

[INVOICEETEMPLATE1] - template value 1 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE2] - template value 2 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE3] - template value 3 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE4] - template value 4 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE5] - template value 5 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE6] - template value 6 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE7] - template value 7 of the invoice account the invoice is assigned to or blank

[INVOICEETEMPLATE8] - template value 8 of the invoice account the invoice is assigned to or blank

Payment Request Variables

[PAYURL] - Creates a payment url for the payment request for the amount in the booking deposit field if non zero, otherwise the outstanding balance.

[PAYURL:25%] - Creates a payment url for the payment request for a percentage of the outstanding balance. Use 100% to specify the full outstanding balance.

[PAYURL:200] - Creates a payment url for the payment request url for a fixed amount. nt.

[PAYLINK] - Creates a payment link (HTML A tag) for the payment request for the amount in the booking deposit field if non zero, otherwise the outstanding balance.

[PAYLINK:25%] -Creates a payment link (HTML A tag) for the payment request for a percentage of the outstanding balance. Use 100% to specify the full outstanding balance.

[PAYLINK:200] - Creates a payment link (HTML A tag) for the payment request) for a fixed amount.

[PAYBUTTON] - Creates a payment button for the payment request for the amount in the booking deposit field if non zero, otherwise the outstanding balance. Not recommended for emails.

[PAYBUTTON:25%] - Creates a payment button for the payment request for a percentage of the outstanding balance. Use 100% to specify the full outstanding balance. Not recommended for emails.

[PAYBUTTON:200] - Creates a payment button for the payment request for a fixed amount.


[PAYPALURL] - Creates a Paypal payment url for the amount in the booking deposit field if non zero, otherwise the outstanding balance.

[PAYPALURL:25%] - Creates a Paypal payment url for a percentage of the outstanding balance. Use 100% to specify the full outstanding balance.

[PAYPALURL:200] - Creates a Paypal payment url for a fixed amount. A zero amount will cause paypal to provide a field to enter an amount.

[PAYPALLINK] - Creates a Paypal payment link (HTML A tag) for the amount in the booking deposit field if non zero, otherwise the outstanding balance.

[PAYPALLINK:25%] - Creates a Paypal payment link (HTML A tag) for a percentage of the outstanding balance. Use 100% to specify the full outstanding balance.

[PAYPALLINK:200] - Creates a Paypal payment link (HTML A tag) for a fixed amount. A zero amount will cause paypal to provide a field to enter an amount.

[PAYPALBUTTON] - Creates a Paypal payment button for the amount in the booking deposit field if non zero, otherwise the outstanding balance. Not recommended for emails.

[PAYPALBUTTON:25%] - Creates a Paypal payment button for a percentage of the outstanding balance. Use 100% to specify the full outstanding balance. Not recommended for emails.

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


Mathematical Operators

Place mathematical operators between two numbers or between two template variables that return a number.

[+] - Example: 2 [+] 3 = 5

[-] - Example: 5 [-] 1 = 4

[*] - Example: 3 [*] 4 = 12

[/] - Example: 15 [/] 5 = 3

[MIN] - Example: 2 [MIN] 3 = 2

[MAX] - Example: 2 [MAX] 3 = 3

Rounding and controlling decimal places

Default

2 [/] 3 = 0.66666666666667

Rounding to the nearest integer

2 [/.0] 3 = 1

Rounding to 1,2,3 or 4 decimal place(s)

2 [/.1] 3 = 0.7

2 [/.2] 3 = 0.67

2 [/.3] 3 = 0.667

2 [/.4] 3 = 0.6667


This works on all operators including [MIN] and [MAX]

Note:  Always use the template variables ending with NUM. The math functions will only work with numbers with a decimal point (not a decimal comma) and no thousands separator and no currency symbol.

Currency Conversion

[CONVERT:EUR-USD] - get the actual conversion rate between two currencies, this can be used with math functions to show alternative currency values. All currencies supported by the booking page currency selector can be used.

Example: [INVOICECHARGESNUM] [*.2] [CONVERT:EUR-USD] will convert the invoice charge value from Euros to USD with two decimal points.

If you use the multiplier to convert currencies for channels: For example hotel id 123456 and a multiplier to convert USD to EUR at todays rate:

123456*[CONVERT:USD-EUR]*

or this to convert EUR to USD

123456*[CONVERT:EUR-USD]

123456*[CONVERT:USD-EUR][/]0.85 will convert to Euros and divides the price by 0.85 which raises it by circa 15%

Custom Date Format Variables

You can use PHP strftime format strings to create custom time formats. Information on PHP strftime strings is available at [1]

[FIRSTNIGHT:{%A, %e %B, %Y}] - first night booked

[FIRSTNIGHT:+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.

[LASTNIGHT:{%A, %e %B, %Y}] - last night booked

[LASTNIGHT:+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.

[LEAVINGDAY:{%A, %e %B, %Y}] - check-out

[LEAVINGDAY:+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.

[CURRENTDATE:{%A, %e %B, %Y}] - current date

[CURRENTDATE:+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.

[BOOKINGDATE:{%A, %e %B, %Y}] - booking date

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

[PAYMENTDATE:{%A, %e %B, %Y}] - most recent payment date

[PAYMENTDATE:+1day{%A, %e %B, %Y}:1:1000] - 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. The second parameter specifies the payment to show, 0 or missing means the most recent payment. The third parameter specifies the invoicee.

Account Variables (account of the booking)

[ACCOUNTID] - account id of the booked property

[ACCOUNTTEMPLATE1] - Account Template 1

[ACCOUNTTEMPLATE2] - Account Template 2

[ACCOUNTTEMPLATE3] - Account Template 3

[ACCOUNTTEMPLATE4] - Account Template 4

[MASTERACCOUNTTEMPLATE1] - Account Template 1 from master account

[MASTERACCOUNTTEMPLATE2] - Account Template 2 from master account

[MASTERACCOUNTTEMPLATE3] - Account Template 3 from master account

[MASTERACCOUNTTEMPLATE4] - Account Template 4 from master account

Account Variables (logged in account, only for display in control panel, not for auto actions or emails etc.)

[LOGGEDINACCOUNTID] - account id of the logged in user

[LOGGEDINACCOUNTTEMPLATE1] - Account Template 1

[LOGGEDINACCOUNTTEMPLATE2] - Account Template 2

[LOGGEDINACCOUNTTEMPLATE3] - Account Template 3

[LOGGEDINACCOUNTTEMPLATE4] - Account Template 4

[LOGGEDINAPIKEY] - apiKey

[MASTERLOGGEDINACCOUNTTEMPLATE1] - Account Template 1 from master account

[MASTERLOGGEDINACCOUNTTEMPLATE2] - Account Template 2 from master account

[MASTERLOGGEDINACCOUNTTEMPLATE3] - Account Template 3 from master account

[MASTERLOGGEDINACCOUNTTEMPLATE4] - Account Template 4 from master account


Smart Template Variables

Smart template variables will display the set content only if a certain condition is met or not met.

The last element is the text to show based on the result of the IF comparison, texts for the true and false case are separated by a pipe |

Template variables can be used inside this template variable as per the examples.


1. [IF=:[GUESTNAME]:Miller:yes|no]

If the guestname is Miller the text "yes" will display. If the guest name is not Miller the text "no" will display

2. [IF>:[NUMADULT]:2:please contact us about you bedding requirements|]

If the number of adults is higher than 2 the text"please contact us about you bedding requirements" will display. If the number of adults is lower than or equal 2 nothing will display.

3. [IF<:[NUMADULT]:3:|linen for two adults is included free of charge]

If the number of adults is lower than 3 nothing will display. If the number of adults is not lower than 3 the text "linen for two adults is included free of charge" will display.

4. [IF<=:[NUMADULT]:2:yes|no]

5. [IF>=:[NUMADULT]:2:yes|no]

6. [IFBETWEEN:[NUMADULT]:1:3:yes|too low|too high]

7. [IFLIKE:[GUESTTITLE]:Mr:Dear|Hi]

IFLIKE works like IF= except it is case insensitive and removes any spaces from the start and end of the words

8. [IFIN:John:[GUESTFIRSTNAME]:Hi John|Your name does not contain John?]

If the first word is contained in the second word the first option is displayed, otherwise the second option is displayed

Note:  Always use the template variables ending with NUM if numbers are involved. The math functions will only work with numbers with a decimal point (not a decimal comma) and no thousands separator and no currency symbol.