Template Variables: Difference between revisions
Jump to navigation
Jump to search
| (67 intermediate revisions by 6 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 214: | Line 214: | ||
[ROOMTEMPLATE8BR] - ROOM Template 8 with linkbreak | [ROOMTEMPLATE8BR] - ROOM Template 8 with linkbreak | ||
[ROOMMETAAUXTEXT] - room | [ROOMMETAAUXTEXT] - room auxiliary text setting for first booked room {{#fas:cog}} (SETTINGS) PROPERTIES > ROOMS > SETUP > DISPLAY | ||
[ROOMMETAAUXTEXTS] - room | [ROOMMETAAUXTEXTS] - room auxiliary text setting for all booked rooms | ||
[ROOMMETAAUXTEXTSINC] - room auxiliary text setting for all booked rooms | [ROOMMETAAUXTEXTSINC] - room auxiliary text setting for all booked rooms, incl. cancelled bookings | ||
[INTERNALROOMNAME] - internal room name as used in the control panel, this is not the translated room name shown on the booking page | [INTERNALROOMNAME] - internal room name as used in the control panel, this is not the translated room name shown on the booking page | ||
[OFFERID] - ID of the | [OFFERID] - ID of the booked offer | ||
[OFFERNAME] - booked offer name for all booked rooms | [OFFERNAME] - booked offer name for all booked rooms | ||
| Line 246: | Line 246: | ||
[OFFERSUMMARYINC] - summary offers including cancelled bookings | [OFFERSUMMARYINC] - summary offers including cancelled bookings | ||
[ | [UNITID1] - ID of the unit (number) for this booking number (coming soon) | ||
[UNITNAME] - unit names of all the assigned room types in the booking group (cancelled bookings are not shown) | [UNITNAME] - unit names of all the assigned room types in the booking group (cancelled bookings are not shown) | ||
| Line 267: | Line 267: | ||
[LEAVINGDAYAVAIL] - returns yes or no, can be used to trigger an Auto Action | [LEAVINGDAYAVAIL] - returns yes or no, can be used to trigger an Auto Action | ||
[NUMROOMSAVAIL] - returns the number of available rooms (-1 if overbooked), can be used to trigger an Auto Action | |||
[ROOMRACKRATENUM] - Rack Rate from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | [ROOMRACKRATENUM] - Rack Rate from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT | ||
| Line 272: | 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 325: | Line 327: | ||
[RANDOM8] - a 8 digit random number seeded from the booking number | [RANDOM8] - a 8 digit random number seeded from the booking number | ||
[VOUCHERPHRASE1] - Voucher Phrase - change the | [VOUCHERPHRASE1] - Voucher Phrase - change the number to the voucher you want to print out. | ||
[VOUCHERAMOUNT1] - Voucher Amount - change the | [VOUCHERAMOUNT1] - Voucher Amount - change the number to the voucher you want to print out. | ||
=== Content from "Info" tab === | === Content from "Info" tab === | ||
| Line 438: | Line 440: | ||
[GUESTMOBILENUM] - guests mobile number with all non-numeric characters removed | [GUESTMOBILENUM] - guests mobile number with all non-numeric characters removed | ||
[MOBILELAST1] last digit of the guests mobile number, if mobile is empty the guests phone number will be used. | |||
[MOBILELAST2] last 2 digits of the guests mobile number, if mobile is empty the guests phone number will be used. | |||
[MOBILELAST3] last 3 digits of the guests mobile number, if mobile is empty the guests phone number will be used. | |||
[MOBILELAST4] last 4 digits of the guests mobile number, if mobile is empty the guests phone number will be used. | |||
[MOBILELAST5] last 5 digits of the guests mobile number, if mobile is empty the guests phone number will be used. | |||
[MOBILELAST6] last 6 digits of the guests mobile number, if mobile is empty the guests phone number will be used. | |||
[PHONELAST1] - last digit of the guests phone number if guest phone is empty it will use the guests mobile number | [PHONELAST1] - last digit of the guests phone number if guest phone is empty it will use the guests mobile number | ||
| Line 556: | Line 570: | ||
[APISOURCETEXT] - human readable name of the channel | [APISOURCETEXT] - human readable name of the channel | ||
[BOOKINGDATE] - booking date | [BOOKINGIP] - ip address of booker's computer | ||
[APIMESSAGE] - api message sent by originating channel from the Channel Info setting | |||
[BOOKINGDATE] - booking date in guests language | |||
[BOOKINGTIMEDATE] - booking date and time | [BOOKINGTIMEDATE] - booking date and time in guests language | ||
[BOOKINGDATEYYYY-MM-DD] - booking date in YYYY-MM-DD format | [BOOKINGDATEYYYY-MM-DD] - booking date in YYYY-MM-DD format | ||
see date and time variables below for custom time formats. | |||
=== Content from "Charges and Payments" tab (also see "Invoice/Invoicee/Room") === | === Content from "Charges and Payments" tab (also see "Invoice/Invoicee/Room") === | ||
| Line 637: | Line 653: | ||
[COMMISSIONNUM] - As per [COMMISSION] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation) | [COMMISSIONNUM] - As per [COMMISSION] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation) | ||
[COMMISSIONGROUP] - Value of the commission of the complete group booking | [COMMISSIONGROUP] - Value of the commission of the complete group booking with currency symbol | ||
[COMMISSIONGROUPNUM] - As per [COMMISSIONGROUP] but the value is displayed with a decimal point and no thousands separator and no currency symbols (for calculation) | |||
[GUESTVOUCHER] - voucher code used with booking | [GUESTVOUCHER] - voucher code used with booking | ||
| Line 654: | 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 740: | Line 758: | ||
[CANCELLEDTIME] - date when the booking was cancelled | [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 | ||
[CANCELURL] - URL to view and cancel bookings | [CANCELURL] - URL to view and cancel bookings | ||
| Line 748: | 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 | ||
[TURNOVERDAYS] - days until next arrival into the same unit | [TURNOVERDAYS] - days until next arrival into the same unit not considering black bookings | ||
[TURNOVERDAYSB] - days until next arrival into the same unit considering black bookings | |||
[VACANTDAYS] days from previous checkout to check in of current booking not considering black bookings | |||
[ | [VACANTDAYSB] days from previous checkout to check in of current booking considering black bookings | ||
==Date and Time== | ==Date and Time== | ||
[CURRENTDATE] - current date | [CURRENTDATE] - current date | ||
| Line 768: | Line 788: | ||
[CURRENTDATE:{%A, %e %B, %Y}] - current date | [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 | [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 | [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. | ||
[DAYSTOCHECKIN] - number of days until check-in | [DAYSTOCHECKIN] - number of days until check-in | ||
| Line 784: | Line 804: | ||
[FIRSTNIGHT:{%A, %e %B, %Y}] - first night booked | [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 | [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 in a custom format. | ||
[LASTNIGHT:{%A, %e %B, %Y}] - last night booked | [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 | [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 in a custom format. | ||
[LEAVINGDAY:{%A, %e %B, %Y}] - check-out | [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 | [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 in a custom format. | ||
[BOOKINGDATE:{%A, %e %B, %Y}] - booking date | [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 | [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 | ||
[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 | [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 in a custom format. The second parameter specifies the payment to show, 0 or missing means the most recent payment. The third parameter specifies the invoicee. | ||
[AUTHORIZEUNTIL] - date until which a card is authorized, this is extracted from the most recent authorize booking info code. | |||
[AUTHORIZEUNTIL{%A, %e %B, %Y}] - custom format date until which a card is authorized, this is extracted from the most recent authorize booking info code. | |||
[FORMATDATE:[any template variable that creates a date]{%A, %e %B, %Y}] - custom format the date. The date value could be included by inserting a different template variable containing a date. | |||
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 825: | Line 876: | ||
BREF = Booking number | BREF = Booking number | ||
BRL1 = Last digit of booking number | |||
BRL2 = Last 2 digits of booking number | |||
BRL3 = Last 3 digits of booking number | |||
BRL4 = Last 4 digits of booking number | |||
BRL5 = Last 5 digits of booking number | |||
BRL6 = Last 6 digits of booking number | |||
CITY = Booking city | CITY = Booking city | ||
| Line 887: | Line 950: | ||
NOTE = Booking note | NOTE = Booking note | ||
NUMN = Number of nights booked | |||
ONAM = Offer Name | ONAM = Offer Name | ||
| Line 893: | Line 958: | ||
PAIC = Payment amount with currency symbol | PAIC = Payment amount with currency symbol | ||
PADD = Property Address | |||
PAID = Paid amount | PAID = Paid amount | ||
PCIT = Property City | |||
PEOP = Number of guests | PEOP = Number of guests | ||
| Line 917: | Line 986: | ||
STUS = Status | STUS = Status | ||
TEXT = Prints a plain text table instead of HTML | |||
TOTA = Total price | TOTA = Total price | ||
| Line 964: | 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 972: | Line 1,043: | ||
==== Custom Invoice Values==== | ==== Custom Invoice Values==== | ||
You have the option to create a custom invoice variable to display a value from an invoice. | You have the option to create a custom invoice variable to display a value from an invoice. [INVOICEVAL with a selection of the following variables specifies the calculation: | ||
CHA - charges | CHA - charges | ||
| Line 990: | Line 1,061: | ||
DP4 - 4 decimal places | DP4 - 4 decimal places | ||
DESsome description - sum of values | DES - used as "DESsome description" - gives the sum of values containing the description "some description" | ||
INV - invoicee, add the invoicee number at the end. Example: INV20 to show invoicee number 20, INV0 will show items not assigned to an invoicee, INV-1 will show all items from the booking regardless of invoicee. You can combine INV[BOOKINGINVOICEEID]] to add the invoicee from the booking | INV - invoicee, add the invoicee number at the end. Example: INV20 to show invoicee number 20, INV0 will show items not assigned to an invoicee, INV-1 will show all items from the booking regardless of invoicee. You can combine INV[BOOKINGINVOICEEID]] to add the invoicee from the booking | ||
| Line 1,091: | 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,390: | Line 1,459: | ||
[INVOICE:PRI_QTY_CUA_TOT_VAT_QTY_PAY_GRT_AMO_VAA] will create an invoice table with more information. | [INVOICE:PRI_QTY_CUA_TOT_VAT_QTY_PAY_GRT_AMO_VAA] will create an invoice table with more information. | ||
[INVOICE:SIN TRANSPORT] will create an invoice table with the Invoice item description for any items with the Status = Transport. | |||
== Invoicee Variables == | == Invoicee Variables == | ||
| Line 1,421: | Line 1,492: | ||
[INVOICEECURRENCY] - currency of the invoicee account the invoice is assigned to if it is not the property default or blank | [INVOICEECURRENCY] - currency of the invoicee account the invoice is assigned to if it is not the property default or blank | ||
[INVOICEENOTES] - value of the "Notes" field for the invoicee | |||
[INVOICEETEMPLATE1] - template value 1 of the invoice account the invoice is assigned to or blank | [INVOICEETEMPLATE1] - template value 1 of the invoice account the invoice is assigned to or blank | ||
| Line 1,497: | Line 1,570: | ||
[REPLACE|searchForThisText|replaceWithThisText|textToSearch] - replace "searchForThisText" with "replaceWithThisText" within the text "textToSearch" | [REPLACE|searchForThisText|replaceWithThisText|textToSearch] - replace "searchForThisText" with "replaceWithThisText" within the text "textToSearch" | ||
[SUBSTR|startCharacterNumber|numberOfCharacters|textToGetSubstringFrom] - get a sub string from "textToGetSubstringFrom" starting at character "startCharacterNumber" (integer, 0 is the first char) with a length of "numberOfCharacters" (integer) | [SUBSTR|startCharacterNumber|numberOfCharacters|textToGetSubstringFrom] - get a sub string from "textToGetSubstringFrom" starting at character "startCharacterNumber" (integer, 0 is the first char) with a length of "numberOfCharacters" (integer) | ||
1. [SUBSTR|0|4|[GUESTPHONENUM]] | |||
This will test for the first 4 characters of the Guest phone number. | |||
[TRIM| string to trim ] - remove whitespace from the start and end of " string to trim " | [TRIM| string to trim ] - remove whitespace from the start and end of " string to trim " | ||
| Line 1,542: | Line 1,622: | ||
[INVOICECHARGESNUM][*]0.2[-][INVOICESECONDITEMNUM][*]0.2[-][COMMISSIONNUM][*]0.2 | [INVOICECHARGESNUM][*]0.2[-][INVOICESECONDITEMNUM][*]0.2[-][COMMISSIONNUM][*]0.2 | ||
<span style="color: #f3e504; font-size: 150%;" >{{#fas:lightbulb}} </span> Property Template 1-8 and Room Template 1-8 can be used to set calculations. If using Room Templates to make a calculation, then use Room Template 8 before Room Template 7. | |||
If you want to see the value 10. | |||
Set Room template 6 = [ROOMTEMPLATE7][+][ROOMTEMPLATE8] and enter 4 in Room template 7 and 6 in Room template 8. | |||
You can set a calculation in Room Templates to show in Property Templates, but not the other way around. So "Property Template1" could pull the calculation of [ROOMTEMPLATE6] and the result = 10. | |||
=== Rounding and controlling decimal places === | === Rounding and controlling decimal places === | ||
| Line 1,576: | 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,657: | Line 1,745: | ||
You can use IF variables inside other IF variables to create complex logic but the internal IF: must be processed before the external IF | You can use IF variables inside other IF variables to create complex logic but the internal IF: must be processed before the external IF | ||
There are special versions of each IF constructed with ^ and ~ separators like [IF=^this^this^same~different] | There are special versions of each IF constructed with ^ and ~ separators like [IF=^this^this^same~different] | ||
<span style="color: #f3e504; font-size: 150%;" >{{#fas:lightbulb}} </span>Only one IF of each type can be used to create complex logic. | |||
The special versions are processed first so should be used as the internal IF so it's result can be processed by the outer if. | The special versions are processed first so should be used as the internal IF so it's result can be processed by the outer if. | ||
The special versions can also be used if you expect : or | characters within your data. | The special versions can also be used if you expect : or | characters within your data. | ||
IF's are processed in the following order. | IF's are processed in the following order. | ||
| Line 1,736: | Line 1,831: | ||
14. [<span style="color: #019cde">IF>:[VACANTDAYS]:1:</span><span style="color: #75d5ad">yes|</span><span style="color: #fe746c">no</span>] | 14. [<span style="color: #019cde">IF>:[VACANTDAYS]:1:</span><span style="color: #75d5ad">yes|</span><span style="color: #fe746c">no</span>] | ||
You want to test if there is 1 day from previous checkout to check in of current booking. Could be used for offering Early Checkouts or additional days to the guest where there is a gap between bookings. | You want to test if there is 1 day from the previous checkout to check in of current booking. Could be used for offering Early Checkouts or additional days to the guest where there is a gap between bookings. | ||
15. [<span style="color: #019cde">IF=:[LEAVINGDAY:{%a}]:Sun:|[IF>=^[TURNOVERDAYS]^1</span><span style="color: #75d5ad">^yes</span><span style="color: #fe746c">~no]</span>] | |||
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">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. | |||
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. | |||
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. | |||
== Write out the number in Words. == | == Write out the number in Words. == | ||
| Line 1,744: | Line 1,855: | ||
Expamles: | Expamles: | ||
[INWORDS] 10 will write | [INWORDS] 10 will write "ten" | ||
[INWORDS] [INVOICEPAYMENTSNUM] will write out the invoice sum of all payments | [INWORDS] [INVOICEPAYMENTSNUM] will write out the invoice sum of all payments | ||
| Line 1,757: | Line 1,868: | ||
<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> | |||