The website of B&B hotels is operated, developed ans constantly expanded by TourismusSuite GmbH. The TourismusSuite system works in the background. This has been connected to the hotel search engine trivago for several years now. Availability queries of a trivago visitor have been processed through the TourismusSuite's own publicly available web service. If the guest has decided there for a B&B hotel, we will be redirected to the page of the offered room and the rate at www.hotelbb.de.
Regardless, trivago has specified the FastConnect Interface. According to this specification, connected hotel booking systems should offer available hotels, rooms and rates. In addition, it is intended to treat several, very different hotels in one query.
We had received the request from trivago to also offer several different hotels. Until then, we were only able to offer the hotels that are located in a certain region at the same time. It seemed to be an advantage for us to develop the implementation according to the FastConnect specification, because this gives us control and responsibility over the details of the offer. So trivago defines structures, the TourismusSuite determines the contents.
This means that the TourismusSuite can now control the implementation, which rooms and what rates trivago will offer and how the prices are composed. So far, these details had to realized by trivago after consultation with the TourismusSuite. From now on, this can, according to the order of our customer B&B Hotels, directly control the TourismusSuite and also test it through quality assurance.
We could e.g. certain rates – such as early booking rates or special rates – preferred or even not publish via trivago. Or if there are new pricing models available on the website of B&B hotels, they can also be directly translated for publication via trivago.
The FastConnect interface specifies two web services: Hotel Data and hotel availability
Hotel Data provides trivago the most important details of B&B hotels, such as name, address, descriptions and features (Wi-Fi, parking, elevator...).
The specification determines the HTTP method „GET“ and the address pattern „/Hotel_data“ between „/hotel_data.csv“. With the first pattern trivago has specified a particular JSON structure for the data in the web service response, for the second pattern, a specific CSV structure. We chose JSON because it allows more details to be transferred and can be easily implemented with our available resources.
Hotel Availability offers trivago available rooms for certain hotels, including prices and description. The specification determines the HTTP POST method and the /hotel_availability address pattern. Parameters (application / x-www-form-urlencoded) are set to transfer one or more hotels, arrival date, departure date, number of guests, country and language, currency, etc to the web service. With theses parameters the TourismusSuite carries out an availability inquiry to the indicated hotels and the further conditions. In response, the information on available rooms is sent in the form of a JSON data structure.
JSON is a generic way to transfer or safe data in a machine read textual form. The data can have a complex hierarchical structure. For this purpose, the detailed information is structured with different brackets, commas and quotation marks according to fixed guidelines. The JSON specification is very simple, has very low system requirements and supports a variety of computer languages. If necessary, you can also read the data yourself, which is useful for finding bugs. Compared to XML, it is easier to read, but has far fewer uses.
The two web services use the existing service of TourismusSuite to receive information about hotel and availability, rooms and rates. These services have just been extended to query different hotels at once.
They deliver the data in a structure that does not conform to the FastConnect specification. Therefore, the largest part of development involved translating the internal data structure so that the data complies with the FastConnect specification. This does not happen directly in JSON text form, but via an intermediate step: we had developed a framework of Java classes and set it up with annotations so that the tool FastXML Jackson could transfer the data info the specified JSON form.
From the result of a TourismusSuite service, the data is read element-by-element so that the intermediate Java object framework is building up. This will eventually be converted to the JSON text format.
This approach greatly facilitates the task, as data sometimes has to be reorganized into a different order and you do not have to worry about the technical implementation of the topic JSON (this is done by Jackson).
trivago publishes hotels on portals in different countries. There are usually different rules how to show prices. In Germany and the EU, the final price the customer has to pay must always be shown. Exceptionally certain costs can not be calculated but then it must be made very clear. In other countries it is usual not to show local fees or charges, but only hotel prices including taxes or only the net price of the hotel, excluding taxes.
In FastConnect, trivago specifies a parameter with which these various pules can be implemented. Because the TourismusSuite system is currently only used in the EU, this topic has not been dealt with for the time being. So the price calculation in the FastConnect Hotel Availability web service of the TourismusSuite had to be extended to determine the right final price, the value added tax and the net price as needed.
All developments are of course tested.
Fast, manual tests were performed with the tool Postman. This allows you to organize different types of web service queries in a project manager. Details of a query can be generalized by entering variables. Therefore one can quickly test various conditions manually.
trivago provides its own test suite for initial Hotel Availability web services. This can be used to check whether the FastConnect specification has been adhered to and whether the structure of the answer matches the request and the final price and price components are roughly plausible.
The final integration test was carried out by the QA department of trivago. The result of various queries with different parameters were checked for the plausibility and compared with the offer on the website of B&B hotels.
Because the FastConnect HotelAvailability web service were a new development, they could be installed on the production systems while the old process where trivago had queried availabilities through the public TourimusSuite Availability web service was still in operation. Therefore trivago was able to change their systems according to their own needs. The conversion took place on 21 June 2018.