Parsing Rules Technical Details
|
Previous Top Next |
· | Reservation fields and Customer fields can be in either order and intermixed if needed. However there must be at least one Reservation field and one Customer field successfully parsed before a Transaction field can be parsed (due to the required linking relationship).
|
|
· | If you're extracting more than one Transaction, using indexed records like Trans[1], Trans[2], etc., don't intermingle index values and keep them in order -- e.g. all rules for the first transaction must appear before any for the second transaction. See below for more information.
|
· | The first rule would be a "Look Anywhere" rule, with "Extras:" for the before-text and "," for the after-text. It would extract the value "1" which appears between the specified text (the leading space is removed). After getting that value, the text position pointer is now on the "2" (it's positioned on the character following the after-text specified in the previous rule).
|
|
· | The 2nd rule would be a "Look after previous field" rule, with blank before-text (so it starts extracting immediately starting with the "2"), and after-text ",". So it will extract the value "2", and the pointer is left on the "3".
|
|
· | Finally the 3rd rule would be another "Look after previous field" rule, with blank before-text and after-text "\r" (to stop at the end of the line) so it extracts the "3".
|
· | You can't enter the space character at the beginning or end of the entry fields (because leading and trailing spaces are stripped out of the dialog entry fields automatically). However if you need to have the parser actually use a space, for instance to enter a space character in the "Set value to" field that's not surrounded by other characters, you can use the hexadecimal escape sequence "\x20".
|
|
· | You can use the \t and \r escape sequences in the before-text and after-text values to look for "tab" and "carriage return" characters respectively. For instance it's common to have "\r" for the "Text after field" setting, to tell it that the data stops at the end of the line.
|
|
· | Sometimes text data includes both carriage return and line feed characters at the end of lines. All line-feed characters in the request text are removed before parsing, to make it more consistent and avoid confusion between the two characters. Therefore lines will always end in a carriage return character (\r). Also note that there may be more than one \r at the end of lines, so don't assume only one will be there when setting up parsing rules.
|
|
· | When text is extracted (e.g. from between the before-text and after-text), any carriage return or tab characters are converted to spaces (because Campground Master data fields cannot contain control characters). In addition, leading and trailing spaces are removed from the parsed text before doing any comparisons -- keep this in mind when setting a "Compare to" value -- the extracted text being compared would never contain the carriage return (\r) or tab (\t) characters, and it could not start or end with a space.
|
|
· | Before-text and After-text values are case sensitive and must be entered exactly as they will appear in the request text.
|
|
· | For the Compare-to actions, the comparison is not case-sensitive (e.g. the compare-to text "tent" will match "TENT" in the request).
|
|
· | Text in Set-value-to is naturally case sensitive (the data field will be set to exactly that text -- after any spaces are trimmed from the ends of course).
|
Reservation : First Night
|
Reservation : Last Night
|
Customer : Last Name
|
· | For E-mail requests, it looks for the "Message-ID" header and will use that for the request ID by default.
|
|
· | You can also set up a parsing rule to set the online request ID, which will override any extracted from the Message-ID. You may want to do this to get a specific ID from the request itself for later reference, or you may need to do it if you have to paste text to process that doesn't have the E-mail header information.
|
|
· | If no request ID is found or parsed, an error will be shown. The request cannot be saved as a real reservation without an ID, but if you view the request you can enter a request ID manually (just be sure to use something unique that would never match an ID from another request.)
|
Confirmation # - uses the formatting rules specified in online setup
|
Status - set to "Pending" unless the Guarantee Info field is filled in, then it will be "Guaranteed"
|
Reservation Type - set to the default specified in Program Options
|
Date Made - set to the current date
|
Time Made - set to the current time
|
Operator Made - set to the current operator, or the default specified in the online setup
|
Transaction Type - set to "Deposit"
|
Transaction Category - set to the same as Transaction Type (e.g. "Deposit")
|
Quantity - left empty
|
Each - set to the same as the Total amount, or Total / Quantity if there's a quantity
|
Total - set to the same as the Each amount, or Each x Quantity if there's a quantity
|
Receipt # - set using the normal formatting for receipt #'s
|
Description - set to the default specified in the online setup
|
Payment Method - set to the default specified in the online setup
|
Operator - set to the current operator, or the default specified in the online setup
|
Date - set to the current date
|
Time - set to the current time
|
Shift - set to the current shift
|
# Adults
|
# Children
|
# Pets
|
Extra Vehicles
|
Extra Trailers
|
· | First and Last Name -- Use when the whole name is in one string, like "John Smith". Assumes the last word is the Last Name, and the rest is First Name(s).
|
· | Last, First Name -- Use when the name is in one string with the last name first. If a comma is not found, the first word is assumed to be the Last Name and the rest is First Name(s).
|
· | City, State, Zip -- Use when the string is the whole bottom address line with all three of these. It will put them into the separate data fields.
|
· | Departure Date (Last + 1) -- Use when the departure or check-out date is present instead of the Last Night.
|
· | Number of Nights -- Use when there is no last night or departure date present, just the number of nights. Note that a rule to extract the First Night must appear prior to this one.
|
· | Number of sites requested -- If the request could be for more than one site, set this field so it knows how many linked reservations must be created.
|
· | Unit ID from E-mail requests -- Use for E-mail requests if the request contains a special ID, not the same as a site number (see Online Setup -- Site Data Fields)
|
· | Unit Type from E-mail requests -- Use for E-mail requests if the request contains a unit type, not the same as a site type (see Online Setup -- Site Data Fields)
|
· | Unit ID from Reservation Friend -- Use for Reservation Friend requests for the site name sent in their reservation data (see Online Setup -- Site Data Fields)
|
· | Room Name from Webervations -- Use for Webervations parsing, to get the room name to be matched up with the Webervations Name (see Online Setup -- Site Data Fields)
|
· | Unit Class from Webervations -- Use for Webervations parsing, to get the unit class to be matched up with the Webervations Class (see Online Setup -- Site Data Fields)
|
· | Credit Card # (Guarantee) -- To extract the credit card number for the guarantee information (these are pseudo-fields because the credit card info is stored in the Guarantee Info fields in a special format, not as separate fields).
|
· | Credit Card Name (Guarantee) -- For the credit card name.
|
· | Credit Card Exp Date (Guarantee) -- For the credit card expiration date as one string. Will accept several formats, like 0705, 7/05, 07/05, 7/31/05, or 7/31/2005.
|
· | Credit Card Exp Month (Guarantee) -- For just the month part of the expiration date, if it's a separate field.
|
· | Credit Card Exp Year (Guarantee) -- For just the expiration year as a separate field.
|
· | Credit Card CVV (Guarantee) -- For the CVV/CVC2 code on the credit card.
|
· | Credit Card # -- (same as for reservation fields above).
|
· | Credit Card Name -- (same as for reservation fields above).
|
· | Credit Card Exp Date -- (same as for reservation fields above).
|
· | Credit Card Exp Month -- (same as for reservation fields above).
|
· | Credit Card Exp Year -- (same as for reservation fields above).
|
· | Credit Card CVV -- (same as for reservation fields above).
|