Template Variables
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%]
Contents
1 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
[PROPERTYHEADLINE] - property headline
[PROPERTYDESCRIPTION] - property description
[PROPERTYLEGALPOLICY] - property rental policy
[PROPERTYCANCELPOLICY] - property cancellation policy
[BOOKINGCOMHOTELID] - booking.com hotel id
[EXPEDIACOMHOTELID] - expedia.com hotel id
2 Room Variables
[ROOMNAME] - room names of all booked rooms
[ROOMNAME1] - room name of first booked room
[ROOMNAMES] - room names including quantity of each booked room
[ROOMNAMEOFFER] - room names of all booked rooms with offer name
[ROOMTYPEDESC] - room accommodation type first booked room
[ROOMTYPEDESCS] - room accommodation type all booked rooms
[ROOMID] - room id number
[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
[OFFERSUMMARY] - offer summary 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
3 Booking Variables
[BOOKID] - booking reference
[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
[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] - rate description with line breaks
[RATEDESCBR] - name of the rate with HTML
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
[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.
[PRICENUM:] - As per [PRICE:] but the value is displayed with a decimal point and no thousands separator and no currency symbols.
[AVPRICE] - Average Nightly Price with currency symbol
[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.
[TAX] - Value in tax field with currency symbol
[COMMISSION] - Value in commission field with currency symbol
[PAYPALBUTTON] - Creates a Paypal payment button for the amount in the booking deposit field if non zero, otherwise the outstanding balance.
[PAYPALBUTTON:25%] - Creates a Paypal payment button for a percentage of the outstanding balance.
[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.
[GUESTTITLE] - guest title
[GUESTFIRSTNAME] - first name
[GUESTNAME] - last name
[GUESTFULLNAME] - title, first name, last name
[GUESTEMAIL] - guest's Email address
[GUESTPHONE] - guests phone number
[GUESTADDRESS] - guests address
[GUESTPOSTCODE] - guests postcode
[GUESTCITY] - guests city
[GUESTCOUNTRY] - guests country from free text field is not empty, otherwise from selector list
[GUESTCOUNTRYSELECT] - guests country from selector list
[GUESTCOUNTRYTEXT] - guests country from free text field
[GUESTMOBILE] - guests mobile number
[GUESTFAX] - guests fax number
[GUESTARRIVALTIME] - arrival time
[GUESTCOMMENTS] - comments in the booking
[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
[REFERRER2] - Referrer2
[ORIGINALREFERRER] - Original referrer
[APIREF] - the booking number at the originating channel
[APIMESSAGE] - api message sent by originating channel
[NOTES] - notes
[MESSAGE] - the content of the booking message field
[REFERENCE] - content of the booking reference field
[STATUS] - status of booking
[FLAG] - Flag
[CANCELURL] - URL to view and cancel 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] - Email status to display in the hover text of a booking. Replace 00 with the number of the Email template
[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
4 Invoice Variables
[INVOICENUMBER] - invoice number
[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.
[INVOICEBALANCENUM:] - As per [INVOICEBALANCE:] but the value is displayed with a decimal point and no thousands separator.
[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 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.
[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.
[INVOICECHARGESNUM:] - As per [INVOICECHARGES:] but the value is displayed with a decimal point and no thousands separator.
[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.
[INVOICEPAYMENTSNUM:] - As per [INVOICEPAYMENTS:] but the value is displayed with a decimal point and no thousands separator.
[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.
[INVOICECREDITSNUM:] - As per [INVOICECREDITS:] but the value is displayed with a decimal point and no thousands separator.
[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.
[INVOICEDEBITSNUM:] - As per [INVOICEDEBITS:] but the value is displayed with a decimal point and no thousands separator.
[INVOICEVAT] - invoice sum of all vat value
[INVOICETABLE] - invoice table
[INVOICETABLE:$1.1$] - invoice table and currency multiplier with optional new currency symbol before or after price.
[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
[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
[INVOICETABLEVATNOSUM] - invoice table with vat information without vat summary
[INVOICETABLEVAT:$1.1$] - invoice table with vat information and currency multiplier with optional new currency symbol before or after price.
[INVOICETABLEVAT2] - invoice table with vat information and status field without vat summary
[INVOICETABLEVAT2VATNOSUM] - invoice table with vat information and status field and vat summary
[INVOICETABLEVAT2:$1.1$] - invoice table with vat information and status field and currency multiplier with optional new currency symbol before or after price.
5 Math Variables
Place math variables between two numbers. Math variables can operate on template variables that return a number
[+] - will add the two numbers either side of the template variable
[-] - will subtract the number right of the template variable from the number left
[*] - will multiply the two numbers either side of the template variable
[/] - will divide the number left of the template variable by the number right
[*.0] - will multiply the two numbers either side of the template variable and round to the nearest integer
[*.1] - will multiply the two numbers either side of the template variable and round to 1 decimal place
[*.2] - will multiply the two numbers either side of the template variable and round to 2 decimal places
[*.3] - will multiply the two numbers either side of the template variable and round to 3 decimal places
[*.4] - will multiply the two numbers either side of the template variable and round to 4 decimal places
[/.0] - will divide the number left of the template variable by the number right and round to the nearest integer
[/.1] - will divide the number left of the template variable by the number right and round to 1 decimal place
[/.2] - will divide the number left of the template variable by the number right and round to 2 decimal places
[/.3] - will divide the number left of the template variable by the number right and round to 3 decimal places
[/.4] - will divide the number left of the template variable by the number right and round to 4 decimal places
[+.0] - will add the two numbers either side of the template variable and round to the nearest integer
[+.1] - will add the two numbers either side of the template variable and round to 1 decimal place
[+.2] - will add the two numbers either side of the template variable and round to 2 decimal places
[+.3] - will add the two numbers either side of the template variable and round to 3 decimal places
[+.4] - will add the two numbers either side of the template variable and round to 4 decimal places
[-.0] - will subtract the number right of the template variable from the number left and round to the nearest integer
[-.1] - will subtract the number right of the template variable from the number left and round to 1 decimal place
[-.2] - will subtract the number right of the template variable from the number left and round to 2 decimal places
[-.3] - will subtract the number right of the template variable from the number left and round to 3 decimal places
[-.4] - will subtract the number right of the template variable from the number left and round to 4 decimal places
[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.
Note: The math functions will only work with numbers with a decimal point and no thousands separator and no currency symbol.
6 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.
7 Account Variables
[ACCOUNTID] - account id of the booked property
[LOGGEDINACCOUNTID] - account id of the logged in user (use in control panel only, not appropriate for use in auto actions or emails)