# Pre-book

**Summary and examples**

The Pre-Book transaction is used by partners to recheck the price and availability for a stay prior to making a booking.

\
The Pre-book transaction will:

1. Check the requested room/rate plan is available and return a status indicator.
2. Check whether the price has changed and return a PriceChangeIndicator (i.e. no change, increased, decreased), together with a warning if it has changed.
3. If the Room is no longer available, then an error is returned.
4. Convert between Rate plan and Room Type codes used by UltraDirect and native CRS codes that are often used in Push ARI (for those chains that support this)
5. Convert between demand partner's property code and UltraDirect property code (for demand partners that use this fucntioanlity)&#x20;

The request should contain:

• The same parameters contained in the availability request (Single Property Availability or Enhanced Shopping) and RateRules request such as arrival/departure dates, number of guests, number of rooms etc.

• The specific Rate Plan code and Room Type code for the desired rate returned in the availability response. Note that the rate plan code in the availability response may be different from the one if the request (if sent), and so it is the code in the availability response that must be used in the rate rules request message

• Public rates will be returned if no RateSearch element data is included in the request.

• Any rate qualifiers returned in the availability response for the desired rate, such as a corporate ID, should also be included.&#x20;

Mandatory values in the Pre-Book Request –

\
• Source/SGA

• AgentInfo

• Property Code + Context (new)

• RatePlanCode

• RoomTypeCode

• GuestCount: Adult/Child/Age

• NumberOfRooms

• DateRange Page 91 of 127

• RateSearch:  RatePlanCode & RatePlanType (Conditional, depending on whether the SGA is configured for new neg rate process or not). We will restrict this to one RateSearch element.&#x20;

Optional

• RoomCodeContext (new) – values TBD

• RateCodeContext (new) – values TBD

• CorpInfo Code

• TotalRate

• TotalRateInclusive

\
Some partners have a limitation of not knowing the Total Rate and Total Rate Inclusive during the Pre-book transaction, so the above-mentioned attributes are marked option and Pre-Book response will behave in the following way –

• Total Rate and Total Rate Inclusive is passed in the Request – System will validate the Availability and the price returned from the CRS and will return PriceChangeIndicator in the response.

• Total Rate and Total Rate Inclusive is not passed in the Request – System will validate the Availability but will skip the validation of Price returned from the CRS and will not return PriceChangeIndicator in the Response.

**Request example:**

```
<HotelML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.xpegs.com/v2001Q3/HotelML"> 
<Head> 
<Process DataPath="/HotelML/Form/PreBook" Function="TI_PreBookV1_1" Token="xxxxxxxxx_1635512924"/> 
<Route Destination="00" Source="XX"/> 
</Head> 
<Form> 
<PreBook> 
<Property Code="XM;8500" Context="Xxxx"/> 
<RateCriteria VersionCompliance="PreBook_V1" NumberOfRooms="1" TotalRate="270.00" TotalRateInclusive="280.00" RatePlanCode="LV7" 
RoomTypeCode="A03" RoomCodeContext="Native" RateCodeContext="Native"> 
<GuestCount Type="Adult" Count="2"/> 
<GuestCount Type="Child" Count="1" Age="3"/> 
<AgentInfo Number="12345678" Type="TIDS"/> 
<DateRange InDate="2023-01-14" OutDate="2023-01-15"/> 
<RateSearch RatePlanCode="AB1" RatePlanType="Negotiated"/> 
</RateCriteria> 
</PreBook> 
</Form> 
</HotelML> 
```

Depending on if The Response will include –

PriceChangeIndicator in the RoomType element with the following Valid values –\
o no change\
o increased\
o decreased

\
Warning message if the rate has changed.

Response example:

```
<HotelML xmlns="http://www.xpegs.com/v2001Q3/HotelML"> 
 <Head> 
             <Route Destination="XX" Source="00"> 
                   <Operation Action="Create" App="UltraDirect-d2c3_prod_08" AppVer="V1_1" DataPath="/HotelML" StartTime="2022-02-09T19:03:40.217+00:00" 
Success="true" TotalProcessTime="1248"/> 
             </Route> 
<Warning Code="XXXX" Description="PRICE CHANGE" Type="Process"/> 
      </Head> 
      <Property xml:lang="en" AvailabilityStatus="Open" Code="XM;8500" Token="xxxxxxxxx_1635512924"> 
             <Rate> 
                   <RatePlan Code="LV7" CommissionableStatus="Commissionable" Description="RA1 - Breakfast Included BB Bed and breakfast" InDate="2023-01-14" 
Indicator="Negotiated" OutDate="2023-01-15" RequestedRatePlanCode="AB1" Status="Open"> 
                         <Amenity Code="BRKFST" Confirmable="true" Property="true" Room="true"/> 
                         <RoomType BookableRate="290.00" Code="A03" NativeCurrency="EUR" RateFrequency="Daily" RoomDescription="Junior Suite with 1 Double Bed + 1 
Sofa cum Dou ble bed" RoomRateText="RA1 - Breakfast Included Junior Suite with 1 Double Bed + 1 Sofa cum Dou ble bed" TotalRate="290.00" 
TotalRateInclusive="300.00" PriceChangeIndicator="Increased"> 
                               <CommissionPolicy Percentage="10.00"/> 
                               <GuaranteePolicy LateArrivalTime="18:00:00.000" Required="false" HoldTime="18:00:00.000"/> 
                               <CancelPolicy Time="18:00:00.000" Date="2022-02-18" PenaltyAmountTaxIndicator="Unknown" PenaltyAmountFeeIndicator="Unknown"/> 
                         </RoomType> 
                   </RatePlan> 
             </Rate> 
      </Property> 
</HotelML> 
```

Request Examples –

1. SGA/Chain uses new neg rate process so no need to send neg rates:

Request

```
<<HotelML xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.xpegs.com/v2001Q3/HotelML> 
             <Head> 
       <Process DataPath="/HotelML/Form/PreBook" Function="TI_PreBookV1_1"          Token="xxxxxxxxx_1635512924"/> 
                     <Route Destination="00" Source="XX"/> 
    </Head> 
     <Form> 
          <PreBook> 
                   <Property Code="XM;8500"/> 
                    <RateCriteria VersionCompliance="PreBook_V1" NumberOfRooms="1" TotalRateInclusive="280.00" RatePlanCode="LV7" 
RoomTypeCode="A03"> 
                           <GuestCount Type="Adult" Count="2"/> 
                           <AgentInfo Number="12345678" Type="TIDS"/> 
                            <DateRange InDate="2023-01-14" OutDate="2023-01-15"/> 
                    </RateCriteria> 
          </PreBook> 
    </Form> 
</HotelML>  
```

2. Normal scenario included negotiated rates:

```
  <HotelML xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.xpegs.com/v2001Q3/HotelML> 
               <Head> 
                              <Process DataPath="/HotelML/Form/PreBook" Function="TI_PreBookV1_1" Token="xxxxxxxxx_1635512924"/> 
                              <Route Destination="00" Source="XX"/> 
               </Head> 
               <Form> 
                              <PreBook> 
                                             <Property Code="XM;8500"/> 
                                             <RateCriteria VersionCompliance="PreBook_V1" NumberOfRooms="1" TotalRateInclusive="280.00" RatePlanCode="LV7" 
RoomTypeCode="A03"> 
                                                            <GuestCount Type="Adult" Count="2"/> 
                                                            <AgentInfo Number="12345678" Type="TIDS"/> 
                                                            <DateRange InDate="2023-01-14" OutDate="2023-01-15"/> 
                                                            <RateSearch RatePlanCode="AB1" RatePlanType="Negotiated"/> 
                              </PreBook> 
               </Form> 
</HotelML> 
```

3. P2P or S2P client example, using native CRS codes for rate plan, room type and PID:

```
 <HotelML xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.xpegs.com/v2001Q3/HotelML> 
Page 95 of 127 
 
               <Head> 
                              <Process DataPath="/HotelML/Form/PreBook" Function="TI_PreBookV1_1" Token="xxxxxxxxx_1635512924"/> 
                              <Route Destination="00" Source="XX"/> 
               </Head> 
               <Form> 
                              <PreBook> 
                                             <Property Code="XM;8123" Context="Native">/> 
                                             <RateCriteria VersionCompliance="PreBook_V1" NumberOfRooms="1" TotalRate="270.00" TotalRateInclusive="280.00" 
RatePlanCode="LV7" RoomTypeCode="A03" RoomCodeContext="Native" RateCodeContext="Native"> 
                                                            <GuestCount Type="Adult" Count="2"/> 
                                                            <AgentInfo Number="12345678" Type="TIDS"/> 
                                                            <DateRange InDate="2023-01-14" OutDate="2023-01-15"/> 
                                                            <RateSearch RatePlanCode="AB1" RatePlanType="Negotiated"/> 
                                             </RateCriteria> 
                              </PreBook> 
               </Form> 
</HotelML> 
```

Request Examples –

1. No availability:

```
<HotelML xmlns="http://www.xpegs.com/v2001Q3/HotelML"> 
      <Head> 
             <Route Destination="XX" Source="00"> 
                   <Operation Action="Create" App="UltraDirect-d2c7_prod_07" AppVer="V1_1" DataPath="/HotelML" StartTime="2021-10
28T15:32:05.631+00:00" Success="true" TotalProcessTime="388"/> 
             </Route> 
             <Error Code="XXXXX" Description="PRODUCT NOT AVAILABLE" Type="Process"/> 
      </Head> 
      <Property xml:lang="en" Code="XM;8500" Token="1623893870725"/> 
</HotelML>
```

2. Price Change:

```
 <HotelML xmlns="http://www.xpegs.com/v2001Q3/HotelML"> 
      <Head> 
             <Route Destination="XX" Source="00"> 
                   <Operation Action="Create" App="UltraDirect-d2c3_prod_08" AppVer="V1_1" DataPath="/HotelML" StartTime="2022-02
09T19:03:40.217+00:00" Success="true" TotalProcessTime="1248"/> 
             </Route> 
<Warning Code="XXXX" Description="PRICE CHANGE" Type="Process"/> 
      </Head> 
      <Property xml:lang="en" AvailabilityStatus="Open" Code="XM;8500" Token="xxxxxxxxx_1635512924"> 
             <Rate> 
                   <RatePlan Code="LV7" CommissionableStatus="Commissionable" Description="RA1 - Breakfast Included BB Bed and breakfast" InDate="2023
01-14" Indicator="Negotiated" OutDate="2023-01-15" RequestedRatePlanCode="AB1" Status="Open"> 
Page 96 of 127 
 
                         <Amenity Code="BRKFST" Confirmable="true" Property="true" Room="true"/> 
                         <RoomType BookableRate="270.00" Code="A03" NativeCurrency="EUR" RateFrequency="Daily" RoomDescription="Junior Suite with 1 
Double Bed + 1 Sofa cum Dou ble bed" RoomRateText="RA1 - Breakfast Included Junior Suite with 1 Double Bed + 1 Sofa cum Dou ble bed" 
TotalRate="290.00" TotalRateInclusive="300.00" PriceChangeIndicator="Increased"> 
                               <CommissionPolicy Percentage="10.00"/> 
                               <GuaranteePolicy LateArrivalTime="18:00:00.000" Required="false" HoldTime="18:00:00.000"/> 
                               <CancelPolicy Time="18:00:00.000" Date="2022-02-18" PenaltyAmountTaxIndicator="Unknown" 
PenaltyAmountFeeIndicator="Unknown"/> 
                         </RoomType> 
                   </RatePlan> 
             </Rate> 
      </Property> 
</HotelML> 
```

3. Normal (available and no price change):

```
<HotelML xmlns="http://www.xpegs.com/v2001Q3/HotelML"> 
      <Head> 
             <Route Destination="XX" Source="00"> 
                   <Operation Action="Create" App="UltraDirect-d2c3_prod_08" AppVer="V1_1" DataPath="/HotelML" StartTime="2022-02
09T19:03:40.217+00:00" Success="true" TotalProcessTime="1248"/> 
             </Route> 
      </Head> 
      <Property xml:lang="en" AvailabilityStatus="Open" Code="XM;8500" Token="xxxxxxxxx_1635512924"> 
             <Rate> 
                   <RatePlan Code="LV7" CommissionableStatus="Commissionable" Description="RA1 - Breakfast Included BB Bed and breakfast" InDate="2023
01-14" Indicator="Negotiated" OutDate="2023-01-15" RequestedRatePlanCode="AB1" Status="Open"> 
                         <Amenity Code="BRKFST" Confirmable="true" Property="true" Room="true"/> 
                         <RoomType BookableRate="270.00" Code="A03" NativeCurrency="EUR" RateFrequency="Daily" RoomDescription="Junior Suite with 1 
Double Bed + 1 Sofa cum Dou ble bed" RoomRateText="RA1 - Breakfast Included Junior Suite with 1 Double Bed + 1 Sofa cum Dou ble bed" 
TotalRate="270.00" TotalRateInclusive="280.00" PriceChangeIndicator="NoChange"> 
                               <CommissionPolicy Percentage="10.00"/> 
                               <GuaranteePolicy LateArrivalTime="18:00:00.000" Required="false" HoldTime="18:00:00.000"/> 
                               <CancelPolicy Time="18:00:00.000" Date="2022-02-18" PenaltyAmountTaxIndicator="Unknown" 
PenaltyAmountFeeIndicator="Unknown"/> 
                         </RoomType> 
                   </RatePlan> 
             </Rate> 
      </Property> 
</HotelML> 
```
