Markets Group
Markets Group plugin groups the input markets from Search depending on the agrupations you’ve decided beforehand. In order to be able to use the plugin, you’ll have to decide which markets to join for which supplier. This way the Search will only process as many transactions as groups have been formed by the plugin, since all of the markets of a same group would return the same options.
To get started with the Markets Group plugin, follow these simple steps:
1. Create and Upload your Markets Group File
To get started, create your markets markets_groups file in the correct format and then upload it to your SFTP account. We've provided a template file below ⬇️ to help you with this process. Just click on the file name, add your own rules, save it in CSV format, and then upload it to the corresponding folder in your SFTP.
📁HotelX
📁HotelX_0000
📁BusinessRules
📄markets_groups.csv
Keep in mind that this plugin is only available in Search step and the markets groups will not be recalculated after Search step. So if you take an option from Search that has been executed with market groups, those groups will remain the same through all the booking flow, even if you change those groups via SFTP.
File format specification
- File Name: markets_group.csv
- Directory: HotelX/HotelX0000/BusinessRules
- Delimiter: Comma (
,
) - Header Row:
- Supplier: Supplier code
- Markets: List of groups of markets
- Each group will be separated by
;
and each market will be separated by#
- Each group will be separated by
- Other: Boolean value true/false
- True: The Search input markets (
HotelCriteriaSearchInput
) not found in this configuration file, will be joined together and we will launch a query to the provider searching for options in these markets. - False: These markets will be discarded.
- True: The Search input markets (
📹Learn how to change the format of the csv file in order to edit and save it
2. Execute Markets Group Plugin in your Query
Once you've uploaded your markets group file, to use the plugin add the following field to the settings
node of your request. Note that markets group plugin can just be executed in search query. In order to successfully execute the markets group plugin, you will need to create the request with the following variables.
step
: "REQUEST_ACCESS"type
: "PRE_STEP"name
: "markets_group"
"settings": {
"plugins": [
{
"step": "REQUEST_ACCESS",
"pluginsType": {
"type": "PRE_STEP",
"name": "markets_group"
}
}
]
}