previous

Daily Rates with Buckets API

The Daily Rates with Buckets API — daily_rates_with_buckets() — consists of two APIs: .rput and .updateDailyRates. This API allows a third-party external interface to distribute updates to OPERA daily rates. The updated daily rate values are stored in the Daily Rates Details "as-is" without any intermediate calculations. OPERA supports up to 10 daily rate rate codes; the Daily Rates with Buckets API will make updates to existing rate codes that are configured as daily rates. (Attempts to update rate codes that are not Daily Rate rate codes will not result in an API failure or error report.) Only the targeted daily rates are updated.

Updated values can be above or below a hurdle set by the yield management system. In the event that the updated value is below the hurdle rate, that rate will be automatically closed should the Daily Rate rate code be designated as yieldable.

The Daily Rate rate codes in OPERA support 1 and 2 adult amounts (not 3 - 5 adult amounts). The Extra Adult and/or Extra Child amount field on the rate code configuration, or extra child rate buckets should be used to specify amounts for numbers of adults above 2 adults, or for children. (The Rates>Rates by Defined Buckets application function, along with the Rates>Max Age Rate Bucket / Min Age Rate Bucket application settings control child rate bucket definitions.)

Occupancy thresholds are not definable attributes for daily rates set via the Daily Rates with Buckets API.

It is assumed that for the initialization of daily rates functionality, the API would provide a full overlay of rates (e.g., 365 days of rate information) to populate the Daily Rate rate code's rate details. Thereafter, the Daily Rates with Buckets API would provide daily rate updates for specific dates. The Rates>Daily Rates Max Days application setting determines the maximum number of days in the future that daily rates can be configured. The initial full overlay, or subsequent updates to daily rates, may not exceed the defined allowable maximum. Any daily rate updates for dates exceeding the maximum number of days are ignored.

Note: Calls to this API will verify that the required IDeaS license code (OPP_IDEA) is active.

Procedures

The Daily Rates with Buckets API consists of 2 procedures:

Parameter

Type

Description

in_resort

varchar2

Property ID

in_rate_code

varchar2

Daily Rate Rate Code to be updated.

in_room_type

varchar2

Room type to which rates apply.

in_rate_date

date

Date for which rate is to be updated.

in_one_adult_rate

number

Rate amount - 1 adult.

in_two_adults_rate

number

Rate amount - 2 adults.

in_extra_adult_rate

number

Rate amount - extra adult.

in_extra_child_rate

number

Rate amount - extra child.

in_child_charge_1

number

Rate amount - child rate bucket 1.

in_child_charge_2

number

Rate amount - child rate bucket 2.

in_child_charge_3

number

Rate amount - child rate bucket 3.

RETURN

varchar2

Status code

 

 

 

Parameter

Type

Description

(NONE)

 

 

RETURN

varchar2

Status code

Example:

DECLARE

VRET VARCHAR2(4000);

IN_PROPERTY VARCHAR2(20) := 'PROPERTY';

IN_RATE_CODE VARCHAR2(20) := 'RACK';

IN_ROOM_TYPE VARCHAR2(20) := 'DLX';

IN_NUMBER_OF_DAYS NUMBER := 2;

BEGIN

PMS_P.INITIALIZE(IN_USER => 'INTERNAL USER', IN_PASSWORD => 'PASSWORD', IN_RESORT => IN_PROPERTY);

FOR I IN 1 .. IN_NUMBER_OF_DAYS LOOP

VRET := DAILY_RATES_WITH_BUCKETS.RPUT(IN_PROPERTY => IN_PROPERTY,

IN_RATE_CODE => IN_RATE_CODE,

IN_ROOM_TYPE => IN_ROOM_TYPE,

IN_RATE_DATE => TO_DATE('05-feb-2006', 'dd-mon-rrrr') + (I - 1),

IN_ONE_ADULT_RATE => 101,

IN_TWO_ADULTS_RATE => 202,

IN_EXTRA_ADULT_RATE => 10,

IN_EXTRA_CHILD_RATE => 2,

IN_CHILD_CHARGE_1 => 10,

IN_CHILD_CHARGE_2 => NULL,

IN_CHILD_CHARGE_3 => NULL);

IF VRET != 'SUCCESS' THEN

DBMS_OUTPUT.PUT_LINE('vRet=' || VRET);

END IF;

END LOOP;

VRET := DAILY_RATES_WITH_BUCKETS.UPDATEDAILYRATES;

IF VRET != 'SUCCESS' THEN

DBMS_OUTPUT.PUT_LINE('vRet2.1=' || VRET);

ELSE

DBMS_OUTPUT.PUT_LINE('vRet 2=' || VRET);

END IF;

COMMIT;

END;

Table Structures

TEMP_DAILY_RATES_RECOMMD

Field

Data Type

Notes

RESORT

VARCHAR2(20)

Property ID

RATE_CODE

VARCHAR2(20)

Daily rate rate code

ROOM_TYPE

VARCHAR2(20)

Room type

RATE_DATE

DATE

Date of the daily rate

ONE_ADULT_RATE

NUMBER

Rate for one adult

TWO_ADULTS_RATE

NUMBER

Rate for two adults

EXTRA_ADULT_RATE

NUMBER

Rate for extra adults

EXTRA_CHILD_RATE

NUMBER

Note: If the property has the Rates>Rates by Defined Buckets application function set to Y, child rate bucket values should be supplied rather than the Extra Child Rate because OPERA will not reference this column.

IN_CHILD_CHARGE_1

NUMBER

Rate for child bucket 1

IN_CHILD_CHARGE_2

NUMBER

Rate for child bucket 2

IN_CHILD_CHARGE_3

NUMBER

Rate for child bucket 3