The structures previously defined can be grouped into three different types according to their usefulness:
Availability
These structures provide information to evaluate if the booking is bookable in the requested dates. The main information in this group is inventory, stop of sales, minimum and maximum stay restrictions, etc…
Valuation
These structures provide rules to determine the final price of the service to be booked. Prices, supplements, discounts, frees, etc…
Additional information
These structures provide additional information needed to complete the booking process or show relevant information to the final customer. For example, promotions, cancellation fees, etc…
The main process is divided in three steps:
Structure |
Availability |
Valuation |
Additional Info |
[CCON] CONTRACT HEADER |
x |
x |
x |
[CNHA] ROOM TYPES |
x |
ü |
|
[CNIN] INVENTORY |
x |
|
|
[CNCT] PRICES |
|
x |
|
[CNSR] BOARD SUPPLEMENTS AND DISCOUNTS |
|
x |
|
[CNPV] STOP SALES |
x |
|
|
[CNSU] SUPPLEMENTS AND DISCOUNTS |
|
x |
|
[CNGR] FREES |
|
x |
|
[CNOE] COMBINABLE OFFERS |
|
x |
|
[CNEM] MINIMUM AND MAXIMUM STAY |
x |
|
|
[CNTA] RATE CODES |
|
|
x |
[CNES] CHECK IN AND CHECK OUT |
x |
|
|
[CNNH] NO HOTEL CONTRACTS |
|
|
x |
[CNCF] CANCELLATION FEES |
|
|
x |
[CNPR] PROMOTIONS |
|
|
x |
[CNHF] HANDLING FEES |
|
|
x |
Internal inventory structures summary
These rules determine the available product of the contract. The availability requires a travel start and travel end dates.
These rules determine the available product of the contract. The availability requires a travel start and travel end dates.
The structure CNHA inform about the available rooms. A single room is defined by code [CNHA.Room type] and characteristic [CNHA.Characteristic]. Every room has a number of passenger restrictions. The minimum and maximum paxes ([CNHA.Minimum pax] and [CNHA.Maximum pax]), the maximum adults ([CNHA.Maximum adults]) and children ([CNHA.Maximum child]).
The number of adults needs to be greater or equal than [CNHA.Minimum adults] and the number of infants lower or equal than [CNHA.Maximum infants].
The standard capacity [CNHA.Standard capacity] is needed in the valuation process.
The inventory inform about the available dates, allotment free and release days.
The header of the structure informs two dates, the start and end date where the inventory is informed [CNIN.Initial date] and [CNIN.Final date].
For every room defined in the contract you will see the inventory information in a different section.
In addition of the base board informed at [CCON.Base board] more boards can be supported by the contract. This information corresponds to the board supplements and discounts structure [CNSR].
The structure CNPV informs about the stop of sales in the contract. The criterion for the valid records is:
If one of the records is valid then the booking is not possible due to stop of sales contract restriction.
The structure CNEM informs about the minimum and maximum days required for the service stay.
We can distinguish 2 different types:
All these items are common to both types of minimum stay (T and E) the difference is the number of days that are valid restriction of stay:
► Example:
CNEM record with minimum days 5 and type T from 1st July to 31st July
Availability from 29th July to 05th August is available. The travel stay is greater than 5 days.
► Example:
CNEM record with minimum days 5 and type E from 1st July to 31st July
Availability from 29th July to 05th August is not available. The minimum stay considered is only 3 days during CNEM record applicability.
The checking algorithm must be considering both types [E and T]. And for each type the process is the same:
The applicability of the record depends on:
If they have the same priority in those fields (generic), the highest priority would be for the CNEM line which higher application date.
First we will review the records of specific minimum stay (rate, room, characteristic or board informed). In that case, every day affected by one or more minimum stay rules must comply with the most restrictive minimum stay. The following priority must be considered in the restriction:
Later we will review those records that are generic minimum stay, with the Rate, Characteristic, Room and Board fields empty. Day by day, we select the most restrictive one.
Every day affected by one or more minimum stay rules must comply at least one of them, or what is the same, we select the most restrictive one (which includes huge range of dates).
Application procedure:
It is necessary the process is day by day because it is possible the same rule is not applied for all days, for example:
In this case, we would apply one or another according the day of the week.
Once we have the result of both minimum stay, the overall result will be the most restrictive. So, all the selected rules must apply in order to have the service available.
► Example:
Two records at CNEM
Availability from Saturday to Sunday will not be available. The most restrictive record does not apply [the second one].
This information is informed at CNES structure.
The [CNES.type] indicator informs about the application: if it is a restriction to check in or check out date.
In both cases seek applicable records, they shall fulfil the following conditions:
After that, we will validate the days when the contract requires checking in or checking out. Every record informs about the day of the week. This value must be true.
In the case of more than one applicable record (check in and check out) and they coincide in dates, both records should bear in mind in order the booking is valid.
When you have just one of them to allow checking in or checking out then it will be valid for booking but you should bear in mind the possible restrictions regarding operational days.
In the absence of any record, then booking is allowed.
This option is only available for clients that will work with different countries (different origin markets). Otherwise, this information will be always empty (the same for fields [CNCT.Market price], [CNSR.Market price] and [CNSU.Market price]).
A client interested in countries CA, DE, ES, UK and RU, and the default country for the client is DE, CNCL (below) indicates:
- Contract is valid for countries AT, CH, CA, ES, UK and DE. However, as markets AT y CH have the value N (these are not defined by client in cache) they will not be calculated in the cache file. The rest of markets with value Y will have a row per room type in CNCT which informs about the prices per market for this client.
- If the price in CNCT has no country indication you need to use this price to calculate the rest of the valid markets defined for cache for this client. In this case market CA would be calculated over this row with no market indication.
- Contract is valid for countries AT and CH, but the prices for those countries will not be calculated during the generation of the AIF file (cache file will be generated depending on the countries configured).
- Only if it appears in CNCL means the country is valid, otherwise it is not valid (If the market does NOT appear in CNCL, then the market is not valid for this contract.)
Once we have checked the availability of the service for the requested dates, then you can calculate the price.
The service and all the information you need in order to get the price are:
The valuation process is composed by (*):
(*): This is the general process, but the order explained above could change depending on the Application Type of the supplements/discounts.
For instance, if a discount is Application Type B (On Base Board), first it's necessary to apply it to the Base Board to calculate the "new" Base Price.
Then, apply the board supplement or discount to the new Base Price.