Template Variables: Difference between revisions
Jump to navigation
Jump to search
| (15 intermediate revisions by 4 users not shown) | |||
| Line 4: | Line 4: | ||
On this page you find a list of template variables and information on how they are used. | On this page you find a list of 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. | 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 date variables can have an optional offset value of a number of days added after a colon, for example '''[FIRSTNIGHT:-3 days]''' | ||
| Line 148: | Line 148: | ||
[ROOMID] - room id number | [ROOMID] - room id number | ||
[ROOMNAME] - room names of all booked rooms (not for cancelled bookings use ROOMNAMEINC if used for | [ROOMNAME] - room names of all booked rooms (not for cancelled bookings use ROOMNAMEINC if used for cancelled bookings) | ||
[ROOMNAMEBR] - room names with line break | [ROOMNAMEBR] - room names with line break | ||
| Line 274: | Line 274: | ||
[ROOMCLEANINGFEENUM] - Cleaning fee from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | [ROOMCLEANINGFEENUM] - Cleaning fee from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | ||
[ROOMSECURITYDEPOSITNUM] - | [ROOMSECURITYDEPOSITNUM] - Security deposit from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | ||
[ROOMTAXPERCENTNUM] - Tax percentate from from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | [ROOMTAXPERCENTNUM] - Tax percentate from from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | ||
| Line 672: | Line 672: | ||
=== Content from "Mail & Actions" tab === | === Content from "Mail & Actions" tab === | ||
[GUESTEMAIL] - guest's Email address on the " | [GUESTEMAIL] - guest's Email address on the "Mail & Action" tab of the booking | ||
[GUESTLANGUAGE] - guest language | [GUESTLANGUAGE] - guest language | ||
| Line 758: | Line 758: | ||
[CANCELLEDTIME] - date when the booking was cancelled | [CANCELLEDTIME] - date when the booking was cancelled | ||
[CANCELLEDTIME:{%A, %e %B, %Y}] - date when the booking was cancelled | [CANCELLEDTIME:{%A, %e %B, %Y}] - date when the booking was cancelled | ||
[CANCELURL] - URL to view and cancel bookings | [CANCELURL] - URL to view and cancel bookings | ||
| Line 766: | Line 766: | ||
[CANCELDATEYYYY-MM-DD] - date until when the booking is cancellable displaying a date. If the date is in the past 00-00-0000 will be shown | [CANCELDATEYYYY-MM-DD] - date until when the booking is cancellable displaying a date. If the date is in the past 00-00-0000 will be shown | ||
[DAYSTOCANCEL] - number of days until booking can be cancelled | [DAYSTOCANCEL] - number of days from today until booking can no longer be cancelled (Not applicable for OTA bookings) | ||
[CANCELUNTIL] - shows the number of days between check-in and the last day | [CANCELUNTIL] - shows the number of days between check-in and the last day the booking can be cancelled. If guest can always cancel it shows 0, if guest can never cancel it shows 999. (Not applicable for OTA bookings) | ||
[GUESTLOGIN] - URL to view bookings | [GUESTLOGIN] - URL to view bookings | ||
| Line 790: | Line 790: | ||
[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 in a custom format. | [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 in a custom format. | ||
[CURRENTTIME] - current time | [CURRENTTIME] - current time. | ||
[CURRENTTIME:+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 in a custom format. | [CURRENTTIME:+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 in a custom format. | ||
| Line 818: | Line 818: | ||
[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 in a custom format. | [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 in a custom format. | ||
[MODIFYDATE:{%A, %e %B, %Y}] - last booking modification date/time | [MODIFYDATE:{%A, %e %B, %Y}] - last booking modification date/time. | ||
[PAYMENTDATE:{%A, %e %B, %Y}] - most recent payment date | [PAYMENTDATE:{%A, %e %B, %Y}] - most recent payment date | ||
| Line 833: | Line 833: | ||
The following codes can be used in any order between the {} brackets to create custom time and date formats. | The following codes can be used in any order between the {} brackets to create custom time and date formats. | ||
%a An abbreviated textual representation of the day Sun through Sat | |||
%A A full textual representation of the day Sunday through Saturday | |||
%d Two-digit day of the month (with leading zeros) 01 to 31 | |||
%e Day of the month, with a space preceding single digits. 1 to 31 | |||
%u ISO-8601 numeric representation of the day of the week 1 (for Monday) through 7 (for Sunday) | |||
%w Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday) | |||
%V ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week 01 through 53 (where 53 accounts for an overlapping week) | |||
%b Abbreviated month name, based on the locale Jan through Dec | |||
%B Full month name, based on the locale January through December | |||
%h Abbreviated month name, based on the locale (an alias of %b) Jan through Dec | |||
%m Two digit representation of the month 01 (for January) through 12 (for December) | |||
%y Two digit representation of the year Example: 09 for 2009, 79 for 1979 | |||
%Y Four digit representation for the year Example: 2038 | |||
%H Two digit representation of the hour in 24-hour format 00 through 23 | |||
%I Two digit representation of the hour in 12-hour format 01 through 12 | |||
%M Two digit representation of the minute 00 through 59 | |||
%p UPPER-CASE 'AM' or 'PM' based on the given time Example: AM for 00:31, PM for 22:23 | |||
%P lower-case 'am' or 'pm' based on the given time Example: am for 00:31, pm for 22:23 | |||
%R Same as "%H:%M" Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM | |||
%S Two digit representation of the second 00 through 59 | |||
%F Same as "%Y-%m-%d" (commonly used in database datestamps) Example: 2009-02-05 for February 5, 2009 | |||
%s Unix Epoch Time timestamp (same as the time() function) Example: 305815200 for September 10, 1979 08:40:00 AM | |||
%% A literal percentage character ("%") | |||
== Booking Group variables == | == Booking Group variables == | ||
| Line 1,053: | Line 1,035: | ||
[INVOICEDATES] - invoice date invoice number if invoicees are involved | [INVOICEDATES] - invoice date invoice number if invoicees are involved | ||
[INVOICEDATE:+1day{%A, %e %B, %Y}] - optional date offset and display format. The offset can be any plus or minus any number of days | [INVOICEDATE:+1day{%A, %e %B, %Y}] - optional date offset and display format. The offset can be any plus or minus any number of days. | ||
[INVOICEDATES:+1day{%A, %e %B, %Y}] - optional date offset and display format - invoice date invoice number if invoicees are involved, The offset can be any plus or minus any number of days | [INVOICEDATES:+1day{%A, %e %B, %Y}] - optional date offset and display format - invoice date invoice number if invoicees are involved, The offset can be any plus or minus any number of days. | ||
=== Invoice Values === | === Invoice Values === | ||
| Line 1,180: | Line 1,162: | ||
[INVOICEPENDPAYNEXTDATE] - date of the next pending payment | [INVOICEPENDPAYNEXTDATE] - date of the next pending payment | ||
[INVOICEPENDPAYNUM] - all (auto and manual) pending payments including failed but the value is displayed with a decimal point and no thousands separator (for calculation). | [INVOICEPENDPAYNUM] - all (auto and manual) pending payments including failed but the value is displayed with a decimal point and no thousands separator (for calculation). | ||
| Line 1,684: | Line 1,664: | ||
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: | 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]* | 123456*[CONVERT:USD-EUR]* then addition of the * at the end will convert the value back to USD when the booking is imported | ||
or this to convert EUR to USD | or this to convert EUR to USD | ||
| Line 1,857: | Line 1,837: | ||
You want to test if the leaving date is a Sunday and it there is a gap for 1 or more days between the current booking and the next booking. | You want to test if the leaving date is a Sunday and it there is a gap for 1 or more days between the current booking and the next booking. | ||
16. [<span style="color: #019cde"> | 16. [<span style="color: #019cde">IF=:[LEAVINGDAY:{%u}]:1:yes|[IF=^[LEAVINGDAY:{%u}]^3</span><span style="color: #75d5ad">^yes</span><span style="color: #fe746c">]</span>] | ||
You want to test if the leaving date is a Monday or a Wednesday to send a specific message to the guest, for example a reminder that it is bin collection day. | You want to test if the leaving date is a Monday or a Wednesday to send a specific message to the guest, for example a reminder that it is bin collection day. | ||
17. [<span style="color: #019cde"> | 17. [<span style="color: #019cde">IF=:[LEAVINGDAY:{%u}]:1:yes|[IF=^[LEAVINGDAY:{%u}]^3^yes][IF=^[LEAVINGDAY:{%u}]^6</span><span style="color: #75d5ad">^yes</span><span style="color: #fe746c">]</span>] | ||
You have different cleaning teams for different days of the week, and you want to send a message to the appropriate team if leaving date is a Monday, Wednesday or Saturday. | You have different cleaning teams for different days of the week, and you want to send a message to the appropriate team if leaving date is a Monday, Wednesday or Saturday. | ||
18. [<span style="color: #019cde"> | 18. [<span style="color: #019cde">IF<^[AUTHORIZEUNTIL{%Y-%m-%d}]^[CURRENTDATEYYYY-MM-DD]^yes~</span><span style="color: #75d5ad">no</span><span style="color: #fe746c"></span>] | ||
You need to test if the Stripe authorisation has expired before the end of the booking. Then you want to automate the authorisation again . You will require multiple auto actions based on the min/max stay. | You need to test if the Stripe authorisation has expired before the end of the booking. Then you want to automate the authorisation again . You will require multiple auto actions based on the min/max stay. | ||
| Line 1,889: | Line 1,869: | ||
<span style="color: #f3e504; font-size: 150%;" >{{#fas:lightbulb}} </span> 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. | <span style="color: #f3e504; font-size: 150%;" >{{#fas:lightbulb}} </span> 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. | ||
== Using Template Variables in a HTML editor == | |||
When using template variables that render tables, such as [INVOICETABLE], do not place them inside <nowiki><p></nowiki> (paragraph) tags. Doing so can lead to formatting issues that affect the table’s appearance. | |||
We recommend inserting the template variable as usual, then clicking the </> Code view button in the editor's toolbar. Then in the code view, locate the template variable and move it outside any surrounding <nowiki><p></nowiki> tags. | |||
For example, if you have this in the editor: | |||
<code>[INVOICETABLE]</code> | |||
You can click the <code></></code> button to see this: | |||
<code><p>[INVOICETABLE]</p></code> | |||
You can fix the formatting issues by changing it to this: | |||
<code><p></p>[INVOICETABLE]</code> | |||