External Inventory Process

Depending on every chain, calculation rules may change. In order to distinguish which file belongs to which chain, it is necessary to check the codes associated. Here the list of chains available through AIF:

INTEGRATION

CODE

HILTON

15

BONOTEL

19

ACCOR

20

HBSi

21

TRADYSO

24

DINGUS

25

DERBYSOFT

26

DOTW

31


In AIF, chain information (code) will be informed in the AIF file name. For example: 

ID_B2B_15#OD15FF_79852_-16283_M 

Where: 

  • ID_B2B_15#OD15FF is the contract name (as you will see it in the xml) with the chain code (ID_B2B_15 where ID_B2B_ informs it is an external contract and 15 is the integration code above).
  • 79852 is the hotel code this contract belongs to.
  • -16283 is the internal code for this contract.
  • M informs it is a Merchant contract (see 9.1 section).

 

Suppliers Integration structures

[CCON] Contract Header

This structure informs about the contract header: range of dates this contract is valid for, ages for children... Basically it remains as before, but there is a new field now (only for external providers): Is total price per stay. 

This field indicates if it is necessary to sum several price lines from [SIAP.Amount] in order to get the final price for reaching the length of stay desired or not. 

If value is Y, it is not possible to do the calculation over other lines to get the final price with the length of stay required as it is returning the lengths of stay available for this room (if a length of stay is not in the price lines in [SIAP], it is not bookable). 

If value is N, it is possible to do the calculation over other lines to get the final price with the length of stay required (if a length of stay is not in the price lines in [SIAP], it is possible to do the sum to get the length of stay required).

Example

{CCON}
Y:LVS:256:16283:ID_B2B_21#B2B:U10:H:12796:18752:20140801:20140831:N:USD::NOR:M:N:N:::B::U:::N:N:MjAxNDA3MjU=:P:Y
{/CCON}
[...]
{SIAP}
20141001:20141031:DBL:CX:RO:1:1::N:(0.000,0.000,76.080)
20141001:20141031:DBL:CX:RO:2:1::N:(0.000,0.000,85.080)
20141001:20141031:DBL:CX:RO:3:1::N:(0.000,0.000,103.250)
{/SIAP} 

As [CCON.Is total price per stay] is Y, it is not possible to sum prices from [SIAP] in order to get the length of stay desired, so if for example, the booking desired was for 7 nights of length of stay, this contract will not be available, as only stays for 1, 2 and 3 nights would be possible for this room. 

{CCON}
Y:LVS:256:16283:ID_B2B_21#B2B:U10:H:12796:18752:20140801:20140831:N:USD::NOR:M:N:N:::B::U:::N:N:MjAxNDA3MjU=:P:N
{/CCON}
[...]
{SIAP}
20141001:20141031:DBL:CX:RO:1:1::N:(0.000,0.000,76.080)
20141001:20141031:DBL:CX:RO:2:1::N:(0.000,0.000,85.080)
20141001:20141031:DBL:CX:RO:3:1::N:(0.000,0.000,103.250)
{/SIAP} 

As [CCON.Is total price per stay] is N, it is possible to sum prices from [SIAP] in order to get the length of stay desired, so if for example, the booking desired was for 7 nights of length of stay, you must sum prices from lines with length of stay 3+3+1 (twice third line and one time first line. From stay more restrictive to less restrictive). 

[SIAP] Suppliers integration availability and prices

Specification

Field

Length

Type

Null

Description

Initial date

8

Date

N

Travel start date

End date

8

Date

N

Travel end date

Room type

3

Text

N

 

Characteristic

15

Text

N

 

Board type

2

Text

N

 

Length of stay (LOS)

 

Number

N

 

Adults

2

Number

Y

Number of adults

Children

 

Number

Y

If a room admits children, it informs the range of age for each child where first value indicates number of children which the rule applies to and second and third values indicates the minimum and maximum age for those children. 
Example: (1,2,12)(2,0,1) indicates: 
(1,2,12) just allowed one child that must have an age between 2 to 12 years old. 
(2,0,1) just allowed two children that must have an age between 0 to 1 year old. 
If a room does not admit children, it informs the range of age for each child (minimum and maximum age), so only paxes above this maximum age will be allowed (adults). 
These ages need to bear in mind in order to include adults in the room (if the maximum age does not comply (the pax is younger than the maximum age), then it is not possible to include this pax in the room). 
Example: (0,0,12) Adults allowed from 13 years old (children between 0 and 12 are not allowed)

Occupancy

1

Boolean

N

Indicates how to manage/build the occupancy per room: 
Y: It is necessary to check [CNHA] in order to know the occupancy allowed and build the occupancy for every room for every price line. 
N: Occupancy is informed in [SIAP] and price in [SIAP.Amount] will belong to this occupancy. [CNHA] will be empty.

Net price

 

Number

Y

Contains net sale price for the product

Price

 

Number

Y

Contains the final price for this product when sold to public 
When [CCON.Selling price] value is true indicates this price is mandatory

Amount

 

Number

Y

Contains the amount for the product

Recurrence Number N Contains the number of days this price is repeated (if this number is 2, that would mean that this price will be the same for 2 consecutive days).

 

Example

These examples inform about the availability and prices for DBL-ST room with RO board:

  • 1 room of 2 adults and 0 children: Price from 1st June to 2nd June, from 2nd to 3rd, from 3rd to 4th and from 4thto 5th.
  • 1 room of 2 adults and 0 children: Price from 1st June to 3rd, from 2nd to 4th and from 3rd to 5th of June.
  • 1 room of 2 adults and 1 child between 2 and 8 years old and 2 children between 9 and 12 years old: Price from 1st June to 5th.

{SIAP}
20110601:20110605:DBL:ST:RO:1:2::Y:(100.000,90.000,100.000,4)
20110601:20110605:DBL:ST:RO:2:2::Y:(100.000,90.000,100.000,3)
20110601:20110605:DBL:ST:RO:5:2:(1,2-8)(2,9-12):N:(100.000,90.000,100.000,1)
{/SIAP} 

This structure informs about the prices for external providers. Basically it remains as before, but now there are 2 new fields: Children and Is price per pax.

  • Children: Informs the age range for the number of children admitted where first value indicates number of children which the rule applies to and second and third value indicates the minimum and maximum age for those children. Example:

For the same room, there are 2 adults admitted and 2 or 3 children depending on the line: 

20141001:20141031:QUA:2Q-LC:RO:1:2:(2,0,17):
20141001:20141031:QUA:2Q-LC:RO:1:2:(3,0,17): 

This means that first line is for 2 adults and 2 children (between 0 and 17) and second line is for 2 adults and 3 children (between 0 and 17). 

  • Occupancy: Indicates how to manage/build the occupancy per room.

When [SIAP.Occupancy] is N, structure [CNHA] will be empty when prices are per room. In those cases, it is necessary to check the structure [SIAP] in order to know for which occupancy those prices are valid (occupancy will be informed in [SIAP] structure directly). 

When [SIAP.Occupancy] is Y, structure [CNHA] must be checked and fields from [SIAP] will be empty.

Example: 

If [SIAP.Occupancy] is N, AIF has the following:

{CNHA}
{/CNHA}
[...]
{SIAP}
20140901:20140930:DBL:DX-KG-NB:RO:1:1::N:(0.000,0.000,162.760)
{/SIAP}

In this case, occupancy is informed in [SIAP.Adults] and [SIAP.Children], and [CNHA] is empty. Price in [SIAP.Amount] is valid only for the occupancy in [SIAP.Adults] and [SIAP.Children] and the [SIAP.Length of stay] informed.

If [SIAP.Occupancy] is Y, AIF has the following: 

{CNHA}
DBL:DX-KG-NB:2:1:3:2:1:0:1:
{/CNHA}
{SIAP}
20140901:20140930:DBL:DX-KG-NB:RO:1:::Y:(0.000,0.000,162.760)
{/SIAP}

In this case, occupancy is informed in [CNHA], and [SIAP.Adults] and [SIAP.Children] is empty. Price in [SIAP.Amount] is valid for any possible occupancy combination from [CNHA] for this room (in the example above, for DBL.DX-KG-NB). 

  • Recurrence: Indicates the number of days this price would be the same for a period:

{SIAP}
20170601:20170605:DBL:ST:RO:1:2::Y:(100.000,90.000,100.000,4)(150.000,120.000,150.000,1)
20170601:20170605:DBL:ST:RO:2:2::Y:(100.000,90.000,100.000,3)(150.000,90.000,150.000,2)
20170601:20170605:DBL:ST:RO:5:2:(1,2-8)(2,9-12):N:(100.000,90.000,100.000,1)(150.000,90.000,150.000,4)
{/SIAP} 

For the first example, from 01/06/2017 until 04/06/2017 the net price, price and amount would be 100, 90 and 100 respectively while for 05/06/2017 the price would be 150, 90 and 150 respectively. This recurrence should contain all the dates in the period (initial and final date), so it necessary to bear it in mind in order to apply properly the correct price.


[SIIN] Inventory

Specification

Field

Length

Type

Null

Description

Internal Name

Initial date

8

Date

N

Travel start date

fec_desde

Final date

8

Date

N

Travel end date

fec_hasta

Room type

3

Text

N

The combination of the Room Type, Room Characteristic is the room code in the XML. However certain offers and supplement can be applied to specific Room Type and/or Room Characteristic.File will contain multiple room types. No limit on the number of room types

cod_hab

Characteristic

15

Text

N

 

cod_car

Board

2

Text

Y

Board code. If empty means that this information common for all boards of this room.

cod_board

Release Min

4

Number

N

Min release days. 0 is day of departure (i.e. no release date)

nro_release

Release Max

4

Number

N

Max release days. 0 is day of departure (i.e. no release date)

nro_release

Allotment

2

Number

N

Remaining allotment from 0 to 10. 10 will indicate the number of rooms available is equal or greater than 10

nro_disponible

Recurrence Number N Contains the number of days this allotment is repeated (if this number is 2, that would mean that this allotment will be the same for 2 consecutive days).

Example

{SIIN}
20110501:20110508:DBT:ST:BB:(0,0,8,1)(0,0,10,5)(0,0,9,1)(0,0,10,1)
20110501:20110508:DBT:ST:BB:(0,0,6,1)(0,0,10,6)(0,0,9,1)
{/SIIN} 

This new structure informs about the release and allotment per room in external supplier contract. Basically it remains the same as [CNIN] structure but includes some new fields:

  • Board code
  • Release Min and Release Max: Minimum and maximum number of days necessary to do the booking in advance, where Release Min would be the minimum days in advance to do the booking before check-in and Release Max would be the maximum days in advance to do the booking before check-in.
  • Recurrence: As for SIAP section, the recurrence will display the allotment for the range of dates (initial and final date).


Example:

Booking from 01/12/14 to 05/12/14 

20141201:20141231:DBL:2Q::(2,30,5)(2,30,5)(5,60,5)  

In example above, Release Min is 2 days (if check-in date is 01/12/14, the booking must be confirmed on 29/11/14. After this date, room will not be longer available (for bookings with check-in date on 01/12/14)).

Release Max is 30 days for bookings with check-in date on 01/12/14, so maximum you can do the booking confirmation for this booking 30 days before the 01/12/14 (in this case, the maximum date for doing the booking would be the 01/11/14).

In dark blue the period included until Release Max. In pink days that are included on Release Min. In blue the check-in date. In purple dates that exceed release. 

[SIEM] Minimum and maximum stay

Specification

Field

Length

Type

Null

Description

Internal Name

Initial date

8

Date

N

Travel starts date

fec_desde

Final date

8

Date

N

Travel end date

fec_hasta

Room type

3

Text

Y

 

cod_hab

Characteristic

15

Text

Y

 

cod_car

Board

3

Text

Y

 

 

Is per check-in date

1

Boolean

N

Indicates if validation is for check in date or for the whole stay: 
Y: Per check-in date 
N: Per whole stay

 

Is per range

1

Boolean

N

Indicates if validation is per range or per list of days: 
Y: Per range 
N: Per list of days

 

Days

 

Number

Y

If Is per range = Y, data provided will indicate the minimum and maximum stays separated by comma. Example: (1,5) where bookings for 1, 2, 3, 4, and 5 days are possible. 
If Is per range = N, data provided will indicate the list of days separated by comma. Example: (1,2,5) where bookings for 1, 2 and 5 days are possible (for bookings for 3 and 4 days there is not availability).

 

If data in Days is empty, there is not restriction for any day (any stay is valid)

Example

  • For QUA.2B, the 26 only can stay 1 or 3 days, 27 just 1. As Is per check-in date is Y, a stay from 26 to 28 June would be valid as it complies the rule for the 26 and it is not necessary to check the 27.
  • For QUA.2B, the 26 can stay from 1 to 3 days, 27 from 1 to 4, the 28 from 4 to 5. As Is per check-in date is N, a stay from 26 to 29 June would not be valid as it does not comply the rule for the 28, even the 26 and 27 is complying.

{CNEM}
20140626:20140630:QUA:2B::Y:N:(2,3)(1)()()() 
20140626:20140630:QUA:2B::N:Y:(1,3)(1,4)(4,5)()
{/CNEM}

Minimum and maximum stay per day will be informed on this section for external providers. 

It is possible to have for the same dates, same room type, and same board, 2 different lines in [SIEM], one per range and another per list of days. If this happens, it is necessary both lines are fulfilled in order to the requested booking is possible. 

In those cases, [SIEM.Is per check-in date] will have the same value for both lines (it is not possible you will have different values for this field in these 2 lines).
Example: 

20140901:20140930:DBL:AE-QU::N:Y:(1,28)(1,8)(1,8)(1,28)(1,28)
20140901:20140930:DBL:AE-QU::N:N:()(1,2,8)(1,2,8)()() 

In cases above, first line indicates the validation is per range for room DBL.AE-QU from 01/09/14 to 30/09/14 and second line indicates the validation is per list of days for room DBL.AE-QU from 01/09/14 to 30/09/14. 

It is necessary both lines are fulfilled to go on with the booking. If some of them are not fulfilled the booking will not be possible through xml.

Depending on the validation of fields [SIEM.Is per check-in date] and [SIEM.Is per range], it is necessary to apply it in one way or another:

  • If [SIEM.Is per check-in date] is Y (validation per check-in date) and [SIEM.Is per range] is Y (range of minimum and maximum stays separated by comma), while the minimum stay in check-in date is complying, it is not necessary to check the rest of days. Example: 

20150201:20150228:QUA:2Q-DX::Y:Y:(1,28)(1,28)(7,28)(7,28)(1,28) 

For QUA.2Q-DX, the 1st can stay from 1 to 31 nights, 2nd from 1 to 31 nights, 3rd from 7 to 31 nights. 

As [SIEM.Is per check-in date] is Y, a stay from 1 to 4 February (3 nights) would be valid as it complies the rule for the 1st and it is not necessary to check the 2nd and 3rd.

  • If [SIEM.Is per check-in date] is Y (validation per check-in date) and [SIEM.Is per range] is N (list of days separated by comma), while the minimum stay in check-in date is complying, it is not necessary to check the rest of days. Example: 

    20150201:20150228:QUA:2Q-DX::Y:N:(1,2)(1,2,3)(7,8)(7,8)(1,2) 

    For QUA.2Q-DX, the 1st can stay 1 and 2 nights, 2nd can stay 1, 2 and 3 nights, 3rd can stay 7 and 8 nights. 

    As [SIEM.Is per check-in date] is Y, a stay from 1 to 4 February (3 nights) would not be valid as it does not comply the rule for the 1st and it is not necessary to check the 2nd and 3rd.

  • If [SIEM.Is per check-in date] is N (validation per whole stay) and [SIEM.Is per range] is Y (range of minimum and maximum stays separated by comma), it is necessary the minimum stay complies all the complete stay of the booking. Example: 

    20150201:20150228:QUA:2Q-DX::N:Y:(1,3)(1,2)(7,15)(7,15)(1,28) 

    For QUA.2Q-DX, the 1st can stay from 1 to 3 nights, 2nd from 1 to 2 nights, 3rd from 7 to 15 nights. 

    As [SIEM.Is per check-in date] is N, a stay from 1 to 4 February (3 nights) would not be valid as it complies the rule for the 1st but not for the 2nd neither 3rd, as for the 2nd is necessary to stay maximum 2 nights and for the 3rd is necessary to stay minimum 7 nights.

  • If [SIEM.Is per check-in date] is N (validation per whole stay) and [SIEM.Is per range] is N (list of days separated by comma), it is necessary the minimum stay complies the complete stay of the booking. Example: 

20150201:20150228:QUA:2Q-DX::N:N:(1,3)(1,2)(7,8)(7,15)(1,31) 

For QUA.2Q-DX, the 1st can stay 1 or 3 nights, 2nd can stay 1 or 2 nights, 3rd can stay 7 or 8 nights. 

As [SIEM.Is per check-in date] is N, a stay from 1 to 3 February (2 nights) would not be valid as it complies the rule for the 2nd but does not comply the rule for the 1st, as it is only possible to do a booking for stays of 1 or 3 nights.

[CNES] Check in and check out days

This information is displayed 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:

  • The date of check in/out is included
  • Matches the requested room or is generic
  • Matches requested characteristic or is generic
  • The application date is valid for the booking creation day

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, when you have just one of them to allow checking in or checking out then it will be valid for booking. 

In the absence of any record, then booking is allowed. 

How to do the calculation 

The process to get the price for the external inventory is very simple, as final price is always calculated and published.
The first step consists in checking the [CCON.External inventory] and only processes those files which [CCON.External inventory] value is true. 

Then the price information is informed at SIAP structure. There you can see the final price for the requested availability:

  • Check in and check out dates
  • Occupancy (if price is per room)
  • Length of stay


In all the cases, if [SIAP.Amount] is empty, means that there are not prices for those dates in the length of stay informed. 

[SICF] Supplier integration cancellation fees

Field

Length

Type

Null

Description

Initial date

8

Date

N

Application start date

End date

8

Date

N

Application end date

Days

 

Number

Y

Days before the client check in where the cancellation fee applies

Hours  

 

Number

Y

Hours before the client check in where the cancellation fee applies. Local hotel time is considered here.

Charge type

1

Enumeration

N

1: First night

E: Stay

Amount

 

Number

Y

 

Percentage

 

Number

Y

Example

{SICF}

20110601:20110605:1::E::100

{/SICF

If you want to show the cancellation policies, you have to check this information at SICF structure. The cancellation fee can apply to the first night or to the entire stay depending on the [SICF.Charge type] value. If the percentage is informed and [SICF.charge type] is 1 [first night] then you have to divide the total amount of the stay by the length of stay in order to calculate ht price for the first night. 

NOTE: As contracts from our third party providers are not in our direct database, it is possible there are price differences. As always the final price for external providers is confirmed through xml (ServiceAddRS/CheckRateRS).

Calculation for External Providers

If you want to book a room for 7 nights, and you have length of stay of 3, 2 and 1 nights, you should select first 2 length of stay for 3 nights (3+3) and later on select the stay of 1 night (3+3+1) as the most restrictive are the ones that includes more nights in the length of stay (you should use the less restrictive ones only when there is no other option so most restrictive ones cannot be applied because the length of stay of the booking is exceed). 

NOTE: The combination of these days must be from more restrictive to less restrictive.

Example:  

Booking from 10/09 to 17/09 for 2 adults

20140905:20140930:TWN:SU:RO:3:2::N:(0.000,0.000,403.520)(0.000,0.000,369.470)(0.000,0.000,356.190)(0.000,0.000,381.930)(0.000,0.000,415.970)(0.000,0.000,437.560)(0.000,0.000,437.560)(0.000,0.000,429.250)(0.000,0.000,420.950)

20140905:20140930:TWN:SU:RO:1:2::N:(0.000,0.000,148.620)(0.000,0.000,140.320)(0.000,0.000,114.580)(0.000,0.000,114.580)(0.000,0.000,127.030)(0.000,0.000,140.320)(0.000,0.000,148.620)(0.000,0.000,148.620)(0.000,0.000,140.320)(0.000,0.000,140.320)(0.000,0.000,140.320)(0.000,0.000,127.030)

In AIF, according the above, we have the following:

 

 

 

 

 

 

10/09/2014

11/09/2014

12/09/2014

13/09/2014

14/09/2014

15/09/2014

16/09/2014

TWN

SU

RO

3

2

N

0.000,0.000,437.560

 

 

(0.000,0.000,420.950

 

 

 

TWN

SU

RO

1

2

N

 

 

 

 

 

 

(0.000,0.000,127.030


Where from 10/09/2014 to 12/09/2014, the price is 437.56 (price for 3 nights), from 13/09/2014 to 15/09/2014 the price is 420.95 (price for 3 nights) and the price for 16/09/2014 is 127.030 (price for 1 night), so total price would be 985.540.


If price in [SIAP.Amount] section is for just one day, you must add the price for every day as usual. 

Example:  

Booking from 05/12/2014 to 10/12/2014 for 2 adults

In AIF we have the following: 

20141201:20141231:DBL:DI-KG-NS:BB:1:1::N:
20141201:20141231:DBL:DI-KG-NS:BB:1:2:(1,0,17):N:
20141201:20141231:DBL:DI-KG-NS:BB:1:2::N:
20141201:20141231:DBL:DI-KG-NS:BB:1:3::N 

Where the only valid line is the third one, as first is for 1 adult, second for 2 adults and 1 child and fourth is for 3 adults. 

20141201:20141231:DBL:DI-KG-NS:BB:1:2::N:(0.000,0.000,60.370)(0.000,0.000,60.370)(0.000,0.000,61.180)(0.000,0.000,62.010)(0.000,0.000,62.010)(0.000,0.000,63.290)(0.000,0.000,63.290)(0.000,0.000,63.290)(0.000,0.000,63.290)

Prices from 05/12 to 10/12 are the following:

 

 

 

 

 

 

05/12/2014

06/12/2014

07/12/2014

08/12/2014

09/12/2014

DBL

DI-KG-NS

BB

1

2

N

(0.000,0.000,62.010

(0.000,0.000,63.290

(0.000,0.000,63.290

(0.000,0.000,63.290

(0.000,0.000,63.290

Total price for this room would be 315.17

Docs Navigation