Sample iCal Parsing Sets
|Top Previous Next|
Parsing Sets are covered in depth elsewhere, and you will likely need to be able to create your own for iCal files for various services. However convenience we've created a couple examples that may work for selected services, and more may be available from us later that aren't mentioned here.
To import the sample(s):
1.Go to Maintenance / Online Reservations / Other Online Interfaces / Parsing Sets.
2.Select "iCal format" for the Parsing Set Type.
3.Click the Import Import set(s) button, and you'll get a typical Windows file-open dialog labeled "Import Parsing Sets".
4.You need to locate the Samples folder, which is typically C:\Program Files (x86)\Campground Master\Samples (most likely you just need to double-click the "Samples" folder to get there, but you may have to navigate to the location first using the "Look In" drop down at the top).
5. Now select the appropriate file starting with "Sample Parsing Set", for instance "Sample Parsing Set - AirBnB", and click Open. You'll see one or more items added to the list. When done importing, click Close.
Note that these are examples that may require additional modification, depending on your requirements and current specifications of the provider (which are subject to change).
Here are some specific tips here for iCal parsing that are not covered in the general Parsing section (which was originally created and written for parsing E-mails from web form submissions).
•Make sure you select "iCal format" for the Parsing Set Type.
•When Campground Master receives an iCal file, it will automatically add the following "fields" to it to aid in parsing:
DOWNLOADURL: -- this is the complete URL used to download the file
SITEDOWNLOADFILE: -- this is the filename part of the URL
CMSITENAME: -- this is the Site Name that Campground Master downloading the file for (assuming a separate file for each site)
You can use one or more of these fields in the Parsing Rules to identify the site. Using Parsing from CMSITENAME directly into the Reservation / Site Name field is the most efficient, but might not work in some cases. You can also use SITEDOWNLOADFILE in a rule to parse into the pseudo-field "Import Filename from iCal", which will automatically select the site by matching up the file name with the results of the "Expression for file name" in the Profiles -- however that can be slow since it has to evaluate the expression for every site in every profile until it finds a match.
However if the service puts reservations for all sites into a single iCal file, then you will need to find a way to match up the site from one of the other fields, for instance the SUMMARY or LOCATION field. Unless it's using the exact site name that Campground Master uses, this would require using the Site's "iCal ID" field (Site_Online_iCal_ID) to put the expected name of the site from the online provider, and a parsing rule with the pseudo-field "Unit ID from iCal" which will look it up from that Site field.
•For the start and end dates, parse from "DTSTART;VALUE=DATE:" into the First Night field, and from "DTEND;VALUE=DATE:" into the "Departure date" pseudo-field (since it's the Last Night + 1).
•Any customer information you'll probably need to get from sub-fields in the DESCRIPTION field, and will depend on how the online service formats it.
Aside from those notes, parsing from an iCal file is the same as parsing from E-mails. You'll need to know the details of the iCal file format, etc.