HotelX Mapping

The map plugins are used to change the supplier codes to client codes or vice versa. There are four types:

  • Hotel map 
  • Board Map 
  • Room Map 
  • Rate Map 

Our map formats share a common structure. In order to load your maps you just need to follow the instructions below:

Example files

You can download example for the files structure here

Entity Maps

File Format

The file should be in the following format:

  • Encoding: UTF-8

  • File Name: [Context Source]_[Context Destination]_[entity]_map.csv

    • Context Source: it corresponds to the client code

    • Context Destination: it corresponds to the supplier code

    • 1 file for each supplier

  • Header Row: Code Source, Code Destination

    • Context Source: it corresponds to the client codes

    • Context Destination: it corresponds to the supplier codes

  • Delimiter: Comma (“,”)

  • Directory: /F[folder code]_[unique code]/HotelX_[unique code]/Maps/[entity]/

File Names

All map files must have the same name structure as follows - you need create a file for Context Destionation

Entity File Name
Hotel [Context Source]_[Context Destination]_hotel_map.csv
Board [Context Source]_[Context Destination]_board_map.csv
Room [Context Source]_[Context Destination]_room_map.csv
Rate [Context Source]_[Context Destination]_rate_map.csv


Entity File Name
Hotel /F[folder code]_[unique code]/HotelX_[unique code]/Maps/Hotel/
Board /F[folder code]_[unique code]/HotelX_[unique code]/Maps/Board/
Room /F[folder code]_[unique code]/HotelX_[unique code]/Maps/Room/
Rate /F[folder code]_[unique code]/HotelX_[unique code]/Maps/Rate/

Sample Files

Let’s suppose we have the following client code and supplier code, then we need to create one file for each supplier we have * Client code: GUE

  • Supplier Code: BVJ

Name: GUE_BVJ_hotel_map.csv

Code Source, Code Destination

Plugin Name

Entity Map Plugin Name
Hotel HotelMapX
Board BoardMapX
Room RoomMapX
Rate RateMapX

Other Maps

Map by provider hotel

This plugin allows to convert the room codes in supplier context but by hotel. Is the same plugin (room map) explained before but it offers the possibility to map by supplier and hotel.

Format File

The file must be in the below format:

  • Encoding: UTF-8 
  • File Name: [Context Source]_[Context Destination]_room_map.csv
  • Header Row: ToRemove 
  • Directory: /F[folder code]_[unique code]/HotelX_[unique code]/Maps/

If you are using a file of room map, is necessary that you modify this file adding a new column. Please, see the next example down:

Sample File

Name: xtg_provider_room_map.csv Data:

Code Source,Code Destination,Code Hotel

How you can see, in the same file are combined maps with 3 values and maps with 2 values. The rows with two values are mapped by provider. The files with three values are mapped by provider and hotel. Is possible to use only the mapping by provider hotel, in this case, your file only has rows with three values.

How applies

What happens if you use the combined plugin(room map and room map by provider hotel)? In this case, all the rooms with provider hotel map will be mapped to your context (the context put in the first value of file’s name (client context)) and the room codes that don’t have provider hotel map, will be mapped with provider map code (in case that exist). If no map codes are found, the option can be discarded (this rule is configurable).

Execution example

    "plugins": {
        "step": "RESPONSE_OPTION",
        "pluginsType": [
                "type": "ROOM_MAP",
                "name": "room_map",
                "parameters":[{"key":"hotel", "value":"true"}]

Besides, an alternative for room map is also shown below:

Description Room Map

As a room map alternative, you can generate a room code from a room description. This plugin applies some rules over the description and generates a code. You need to load other files for this plugin.


We have two files for this plugin:

  • Alias Table: it is used to replace some words from the description 
  • Noise Words: it deletes some words from the description 

Alias Table

Format File

The file must be in the below format:

  • Encoding: UTF-8 
  • File Name: roomDescriptionMapX_aliasTable.csv 
  • Header Row: ToReplace, ReplaceWith, Order 
  • Delimiter:  Comma (“,”) 
  • Directory: /F[folder code]_[unique code]/HotelX_[unique code]/Maps/plugin/

Sample File

Name: roomDescriptionMapX_aliasTable.csv

1 bed,apt,102
1 bedroom,apt,100
2 bedroom,2-bedroom,200
3 bed,3-bedroom,303

Noise Words

Format File

The file must be in the below format:

  • Encoding: UTF-8 
  • File Name: roomDescriptionMapX_noiseWords.csv 
  • Header Row: ToRemove 
  • Directory: /F[folder code]_[unique code]/HotelX_[unique code]/Maps/plugin/

Sample File

Name: roomDescriptionMapX_noiseWords.csv Data:


How applies

When you execute the plugin the steps to be followed are:

  1. Get room description.
  2. Replace strings with roomDescriptionMapX_aliasTable.csv, the order to apply this replace depends on the order column.
  3. Sort the description words alphabetically.
  4. Remove words with roomDescriptionMapX_noiseWords.csv file. 
  5. Get your new code. 

Execution example

    "plugins": {
        "step": "RESPONSE_OPTION",
        "pluginsType": [
                "type": "ROOM_MAP",
                "name": "mapping_room_description"

Modifying data

Once mapping files are loaded, we can perform the following operations on them:

Updating data

We have two options:

  1. Reprocessing the same data by renaming the file and just removing “_processed”: Example example_processed.csv –> example.csv
  2. Changing the data by deleting the processed file and uploading a new one with new information.

Deleting data

Uploading a new file only with headers (no information).