Settings

On this page you will learn more about settings in HotelX.

What are settings?

Settings are the common configuration that will be used in order to build the request to the supplier/s.

There are two kind of settings, overridable and partially overridable. You can find the partially overridable settings in the first level of settings and are known as HotelX_Settings. These settings are formed by some non-overridable settings such as “group” and “testMode”, some overridable global settings such as “timeout”, “auditTransactions”, etc., and some overridable baseSettings such as “businessRules”.

There are several levels of settings that can be combined in order to build customised settings. The hierarchy of heritage and type of settings for each level is:

0 - Criteria common settings fields (currency, auditTransactions, businessRules, etc.)
1 - Access Settings [Base Settings]
2 - Supplier Settings [Base Settings]
3 - Query Settings [HotelX Settings]
4 - Database Access Settings [Base Settings]
5 - Database Supplier Settings [Base Settings]
6 - Database Client Settings [Default Settings]
7 - Database Group Settings [Default Settings]

Any field that is empty in one level, will be filled in with the value of the following level.

There is a special case, which is the Criteria fields specified in the query. Those have preference over the values in database. If those are empty in the query, they will be filled from the values in the database setted up early.

Which settings are mandatory and from where are comming from?

  • Context: Mandatory. This field has to be filled in the query or in default settings
  • Client: Mandatory. Has to be filled in the query
  • Group: Optional. If it’s not filled in the query, it will be taken from our internal database
  • Timeout: Mandatory. This field has to be filled in the query or in default settings
  • AuditTransactions: Optional
  • BusinessRules: Mandatory. This field has to be filled in the query or in default settings
  • Suppliers: Optional
  • Plugins: Optional
  • TestMode: Optional
  • ClientTokens: Optional
  • CommitRequired: Optional
  • Language: Mandatory. This field has to be filled in the query (Criteria) or in default settings
  • Currency: Mandatory. This field has to be filled in the query (Criteria) or in default settings
  • Nationality: Mandatory. This field has to be filled in the query (Criteria) or in default settings
  • Markets: Mandatory. This field has to be filled in the query (Criteria) or in default settings

Where can Settings be applied?

Settings can be applied to the following operations:

Queries

These queries have the same settings configuration Click here to see configuration

Mutations

These mutations have the same settings configuration Click here to see configuration

If you need to modify any fields of the database Settings, please contact our Help Center. Please find an example of each type of the settings above:

HotelX Settings Query/Mutation settings

"settings": {
 "group": "HotelX_test",
 "client": "xtg",
 "context": "HOTELTEST",
 "testMode": true,
 "timeout": 18000,
 "language":"es",
 "suppliers": [
  {
   "code": "HOTELTEST",
   "settings": {
    "auditTransactions": true
   },
   "accesses": [
    {
     "accessId": "1",
     "settings": {
      "currency": "EUR"
     }
    }
   ]
  }
 ]
}

Base Settings Access or supplier settings (from Query or database)

"settings": {
    "timeout": 300, 
    "auditTransactions": true, 
    "businessRules": 
      {
        "optionsQuota": 500,
        "businessRulesType": "CHEAPER_AMOUNT"
      }  
}

[Default Settings] Group or client database settings

"settings": {
  "context": "CONTEXT",
  "client": "client",
  "timeout": {
    "search": 18000, 
    "quote": 25000, 
    "book": 180000
  }, 
  "language": "en", 
  "currency": "EUR", 
  "nationality": "ES", 
  "market": "ES", 
  "businessRules": {
     "optionsQuota": 0, 
     "businessRulesType": "CHEAPER_AMOUNT"
  }
}

If we send a Query with the previous HotelX Settings, the configuration that will be sent to the Seller is:

  • Context: “CONTEXT”      //From DB Default Settings
  • Language: “en”      //From HotelX Query/Mutation Settings
  • Currency: “EUR”      //From Access Settings in Query/Mutation (Base Settings)
  • Nationality: “ES”      //From DB Default Settings
  • Market: “ES”      //From DB Default Settings
  • Timeout: 18000      //From HotelX Query/Mutation Settings
  • AuditTransactions: true      //From Supplier Settings in Query/Mutation (Base Settings)
  • BusinessRules/OptionQuota: 0      //From Access DB Settings (Base Settings)
  • BusinessRules/BusinessRulesType: “CHEAPER_AMOUNT”      //From Access DB Settings (Base Settings)

Plugins

As you can observe in GraphQL API Specifications, the input field “plugins” allows to insert plugins that will be executed during execution process.

Default Plugins

Additionally, it is possible to load default plugins in our database. Currently, the only way to load these plugins in our database is contacting our Customer Care team. These default plugins will be executed in all the Queries and Mutations specified above if no filters are specified.

Filter Plugins

Besides, in the Query/Mutation Settings, there is a filter that allows to include or exclude the execution of any plugin. The way it works is similar to the Access Filter in Hotel-Search and it is only allowed specifying includes or excludes, not both. HotelX always reads Query/Mutation input plugins and then joins them to the loaded default plugins of our database, then applies the plugin filters.

  • On the one hand, if you specify plugins to be included, these plugins will be executed only if they are found in all the joined plugins (Query/Mutation input plugins in settings and Default plugins from database).

  • On the other hand, if you specify plugins be to excluded, these will be deleted from joined plugins and consequently not executed.

The way of indicating which plugins we want to include/exclude is introducing Step, Type and Name of the plugin in the Query/Mutation.

Timeout

The timeout is the timeout in milliseconds that will be applied to the connection with seller/sellers/supplier/s. If more than one supplier is requested, timeout will be applied to all suppliers and cut the connection with those suppliers that exceed this timeout. Travelgate will not close the connection with the client if this timeout is exceeded.