AutoClerk Tech Documentation - Letters of Confirmation


This documentation is for the implimentation of confirmation letters for AutoClerk version 57.

The template for confirmations letters is a text file called "CONTRACT.TXT. It may be modified from Configuration by choosing Edit Source and Help files. Expand the Config Files directory by clicking on the +. Next click on CONTRACT.TXT. AutoClerk will bring up the text file in a window on the right side of the screen. Make the desired changes. When finished save, by clicking on File and choosing Commit.

Attached are both samples of contract.txt and the printed confirmation.

Confirmation letter formatting

Text, which is printed exactly as entered, is interspersed with variables. Information from the AutoClerk reservation is interpolated into the text by substituting values from the reservation for the reservation variables. A variable has the form $C or ${name[:arg][%opt]["format]}, where

Cis a single-character variable name
nameis the variable name, all lowercase
argmodifies the variable; the modification depends on the variable
optselects a standard format for the variable
formatoverrides the default format for the variable. Use with great care.
[...]indicates an optional part
Options change the way data is formatted. The effect of an option depends on the data type.

In the table below:

CHis the variable's short name
A hyphen in this column indicates that the single-letter variable name is no longer available, generally because use of it conflicts with HTML or the extended variable naming scheme.
NAMEis the variable's full name
When this appears with an argument or option (e.g ${today%1}) then this indicates the argument or option which corresponds to the single-letter variable name. The variable can be specified without this option, in which case its formatting will be the default for that type of variable.
C/Fis the characters per field. An asterisk indicates a variable width field.
Printer pitch
Settings can be controlled by the ${pitch} variable described in the attached document.

Treatment of rates per day:
${date} interpolates the current date, which is initially the arrival date.
${rate} interpolates the rate for the current date, and increments the current date.
If there are more days in the stay than allowed for in the contract or regslip template, additional pages/slips are printed.

Lining up columns
There are two ways to make fields like first and last name on the same line line up in columns:

  1. ${lastname}${tab:30}${firstname}
  2. ${lastname"%-24.24s"} ${firstname}
The first will print lastname, then tab to column 30 and print firstname. If, after lastname, the print position is already past column 30 the tab instruction has no effect.

The second will print lastname in a fixed width field of 24 characters, left justifying and truncating lastname to fit. This may be useful to you if you are trying to match the format of an exsisting letter and the new field size for lastname makes it too long to fit.

The "-" indicates left justification. The default for numbers is right justification.

The first 24 is minimum field width. If the string is less than that number, the string is padded with blanks on the left or right side depending on whether or not the "-" is present.

The second 24 is the max field size. If a string is longer than that size, it is truncated on the right or left depending on whether or not the "-" is present.

AutoClerk Variables

By Type (Sorted in Groups)
CHNAMEC/FDescription and Notes
$$-1The dollar symbol
$y${today%1}18Today's date with long month
$D-18Today's date with time and short month
-${clock}7Current time
-${day}2Today's day of week
$L${lastname}14Last name
$F${firstname}10First name
-${names}26First and Last Name together
$C${company}25Company; if using Specials See note (2)
$A${contact"Attn: %s"}30Attention
$S${street}25Street
$T${citystate}27City and State
$Z${zip}10Zip Code
$p${phone}13Guest phone
$t${ta_company}25TA company
-${ta_iata}9IATA#
$n${ta_agent}15TA Agent's Full Name
-${ta_street}25TA street
-${ta_citystate}27TA city and state
-${ta_zip}10TA zip
$z${ta_phone}21TA Phone TA Phone and Extension
$r${ta_commission"%s%%"}7TA commission with % symbol
-${rateclass}2Rate Class
-${rate%1}12Room rate, right justified
$d${ratehilow}6 Rate with weekday & weekend, if applicable to stay.
Left justified, no $ symbol, doesn't print thousands (3)
Warning: If used, rate structure must fit
weekday/weekend limitations.
-${rate}8 Room rate compacted, left justified, no $ symbol
(if not extended rates, this is weekday rate).
-${rateskip}8Prints the rate for the current date to the first day of a new range. rateskip and daterange must be used together and rateskip must appear after daterange.
$i${arrival}8Checkin date as dd mmm'yy
$o${depart}8Checkout date as dd mmm'yy
$I${arrival%1}18Checkin date with full month name
$O${depart%1}18Checkout date with full month name
-${date}8The current date
Used with ratesperday. Incremented every time a rate is interpolated.
-${daterange}8Prints the first and last dates of a date range over which the room rate remains constant. The default format is "%s to %s", where the %s are replaced by the dates.
See also, rateskip.
$U${nights}3Number of nights
$N${rooms}3Number of rooms
$Y${roomtype}20Room type code
-${roomtype%1}20Room type description
$R${room}4Room number
$W${folio}1Folio - is always A.
-${paytype}12Payment type
-${cc_number}25CC number
$x${cc_number%1}25CC number xxxxed out
-${cc_expiry}4CC expiry, no punctuation
-${deposit}13Advance deposit compacted, no $ symbol, left justified
-${deposit%1}15Deposit right justified
$s${source:1}2Source
$h${source:2}2Source 2
$j${source:3}2Source 3
$G${occupants}1Total number of occupants
(adults+children+infants)
$P${adults}1Number of Adults
$k${children}1Children
$b${infants}1Infants
-${status}12Reservation status Short form (GTD)
-${status%1}12Reservation status spelled out (Guaranteed)
-${conf}6Confirmation # 6 character code
$K${license}11License plate Do Not Use!!!!
$q${specials}33Specials
-${f8note}30F8 Notes
$Q${note}30The note field
-${contact"%s:"}30Contact with a colon at the end.
$X${include}0Insert file
-${tab:nn}0Tabs to column nn.
Because string fields are not automatically padded to the right with blanks, the ${tab} variable is necessary to make columns line up.
-${pitch:nn%qual}0Set printer pitch
nnis 10, 12, 17 or 20
qualis 0 (draft) or 1 (nlq)