Skip to main content

Mapping

Mapping plugin serves to convert either the Supplier's native codes to the Buyer's codes or vice versa. To do this, you need a file that shows how the Buyer's and Seller's codes relate, so our system can do the conversion automatically.

This feature includes Hotel Map, Board Map, Room Map, Rate Map, Amenity Map, Promotion Map and Room Description Map categories.

Keep in mind

Please be aware that by default, options where board, rates, or room codes maps are not found will still be returned with the supplier's original code. If you would rather not receive options in your search results where those entities couldn't be mapped, please reach out to our team to configure it from our side.

To get started with the Mapping plugin, follow these simple steps:

1. Create and Upload your Mapping File

To get started, create your mapping file for the desired entity (hotel, board, room...) 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.

sftp.xmltravelgate.com

📁HotelX
     📁HotelX _0000
         📁Maps
             📁Hotel
                 📄BuyerContext_SupplierContext_hotel_map.csv
             📁Board
                 📄BuyerContext_SupplierContext_board_map.csv
             📁Room
                 📄BuyerContext_SupplierContext_room_map.csv
             📁Rate
                 📄BuyerContext_SupplierContext_rate_map.csv
             📁Amenity
                 📄BuyerContext_SupplierContext_amenity_map.csv
             📁Promotion
                 📄BuyerContext_SupplierContext_promotion_map.csv
             📁Room description
                 📄BuyerContext_SupplierContext_roomdescription_map.csv

info

You should create one file for each supplier that you want to map an entity.

note

If you need assistance with requesting your credentials to access the SFTP server, determining the endpoint and directory format, or learning how to upload, update, and delete SFTP files, please refer to the overview section of Plugins.

File Format Specification

  • File Name: BuyerContext_SupplierContext_entity_map.csv
  • Directory: HotelX/HotelX_0000/Maps/[entity]
  • Delimiter: Comma (,)
  • Header Row:
    • Buyer Context: Buyer's context code
    • Supplier Context: Supplier's (Seller's) context code. This code can be found in the My Connections section on the Travelgate website.
📹 Learn how to change the format of the csv file in order to edit and save it
Can I use a default code for un-mapped Supplier codes?

Imagine you've created a board mapping file for your Supplier's connection, but there are cases where you want to use a consistent code like 'RoomOnly' for meal plans that couldn't be mapped or for new board codes added by the supplier. To achieve this, you can utilize the 'Default Code' feature.



This feature allows you to define a default code for each code in the source (supplier) context. The entities that can have default codes include: Board, Room, Rate, Amenity, Promotion and Room Description. To use this feature, simply add a new row in the BuyerContext column with your default code and place an asterisk (*) in the Supplier context column:

Buyer Context, Supplier Context
Room Only, RO
All Inclusive, AI
Room Only, *

In the example above, all the codes of entity board of supplier that are not found in the mapping file, will be "Room Only" in the response. Please note that you can assign only one default code to each Supplier context.

2. Execute Mapping plugin in your query

When working with your search query, you have two distinct ways to implement mapping:

Option 1: Mapping only with Buyer context and SFTP files

If your search query's context is defined as your own Buyer context (meaning it differs from the supplier's context), Hotel-X will make an effort to map all entities (such as hotels, boards, etc., excluding amenities and promotions) to align with the query's context.

Important

In this scenario, there's no need to specify a plugin in your query. Just provide your own context in the context field and upload the mapping files to your SFTP account.

On the other hand, please note that it's absolutely mandatory to use the plugin in your search query to map amenities and promotions:

"settings": {
"plugins": [
{
"step": "RESPONSE_OPTION",
"pluginsType": {
"type": "PRE_STEP",
"name": "amenity_mapX"
}
}
]
}
"settings": {
"plugins": [
{
"step": "RESPONSE_OPTION",
"pluginsType": {
"type": "PRE_STEP",
"name": "promotion_mapX"
}
}
]
}

Option 2: Mapping with mixed contexts for specific entities

While you can use either the Supplier's context or your own Buyer's context via SFTP files in your search query, you can also mix both contexts for specific entities like boards, amenities, and promotions. For instance, you can keep using the Supplier's context for hotels or rooms but switch to your Buyer context for boards, amenities, and promotions. This approach lets Hotel-X exclusively focus on mapping the entities you've specified in your query.

To enable this, just include the plugin in your query. After uploading your mapping file, add the following field to the settings node of your request. To make the most of the mapping plugin, configure the request with the appropriate variables based on the type of mapping you intend to perform:

Remember, you can only change the context for the board, amenity and promotion entities:

  • step: "RESPONSE_OPTION"
  • type: "PRE_STEP"
  • name: "{entity}_mapX"
  • parameters:
    • key: "context"
    • value: {BuyerContext}
"settings": {
"plugins": [
{
"step": "RESPONSE_OPTION",
"pluginsType": {
"type": "PRE_STEP",
"name": "{entity}_mapX",
"parameters": [
{
"key": "context",
"value": "{BuyerContext}"
}
]
}
}
]
}
Remember

Keep in mind that the mapping plugin can only be executed in a search query.