Cheapest Price
The Cheapest Price plugin helps you find the best price among all your Suppliers by grouping similar options together.
You can decide how to group the options—for example:
- Return only the cheapest option for a specific meal plan.
- Return only the cheapest option for each hotel and room type.
This way, you always get the best price based on your selected criteria!
Important considerations
- If you use Hotel-X in multimode (multiple suppliers at once), make sure to map hotel codes and other entities. This allows us to group and compare options correctly.
- If you need a more advanced aggregation plugin, which lets you compare options from different suppliers and set preference rules for specific suppliers, you can use the Preference Plugin instead.
You don't need to create any files for this plugin. Just specify it in the settings
> plugins
field in your search query.
1. Execute Cheapest Price Plugin in your Query
To use the plugin add the following field to the settings
node of your request. Note that cheapest price plugin can just be executed in search query. In order to successfully execute the cheapest price plugin, you will need to create the request with the following variables.
step
: "RESPONSE"type
: "PRE_STEP"name
: "cheapest_price"parameters
:-
primaryKey
: Criteria used to aggregate and create groups to compare options, separated by commas. For example: "hotel, supplier, board". Possible values are:- hotel
- supplier
- board
- binding
- cancelPolicy
- currency
- market
- payment
- promotion
- rateRules
- refundable
- room
- supplement
- surcharges
- ratePlan
- status
-
optionsPerKey
: Limits the number of options per aggregation group, this being defined by the previous primakyKey parameter. Value: Integer. -
internalCurrencyConversion
: Enables internal currency conversion for aggregation. Value:true
orfalse
. By default, aggregation considers the currency, meaning that only options sharing the same currency are grouped together. If you receive responses from multiple suppliers using different currencies but want to internally compare them, you can enable this option. When set totrue
, Travelgate will apply an internal currency conversion (updated every day) to allow aggregation and comparison of options within the sameprimaryKey
group, even if they have different currencies. This conversion is only used for aggregation purposes—the final response will always return prices in their original currency.
-
primaryKey
is a mandatory parameter in order to activate the plugin. optionsPerKey
and internalCurrencyConversion
are optional and complementary of the first.
For instance, if you want to find the most affordable option for each hotel, supplier, and room:
"settings": {
"plugins" : [
{
"step" : "RESPONSE",
"pluginsType" : [
{
"type" : "PRE_STEP",
"name" : "cheapest_price",
"parameters" : [
{
"key" : "primaryKey",
"value" : "hotel,supplier,room"
},
{
"key" : "optionsPerKey",
"value" : "1"
}
]
}
]
}
]
}
Special Aggregation Key: eqRates
There is a special value for the aggregation key "eqRates" that will combine the rateRules and ratePlans of an option and group all of the options, based on the file uploaded in the SFTP with the name:
📁HotelX
📁HotelX_0000
📁BusinessRules
📄SupplierContext_rateplanraterule.csv
With this uploaded CSV file, all the options with the ratePlan code "NOREEMBOLSABLE" and no rateRules will be compared with each other. Similarly, all the options without a ratePlan code or without a mapped ratePlan and with rateRules set to "NON_REFUNDABLE" will also be compared with each other.