The Flight Search solution contains example flows to search for the cheapest flights between two locations.
User: I want to find a flight.
Bot: Where would you like to depart from?
Bot: Where would you like to fly to?
Bot: When would you like to depart?
Bot: When would you like to return?
Bot: The cheapest flight from London to Barcelona departing on Monday Oct 22, 2018 and returning on Wednesday Oct 24, 2018 costs GBP 89 and is operated by Vueling.
User: What is the price if I depart one day later?
Bot: The cheapest flight from London to Barcelona departing on Monday Oct 23, 2018 and returning on Wednesday Oct 24, 2018 costs GBP 67 and is operated by Vueling.
User: I am looking for a flight from Dallas to Paris tomorrow and returning 3 days later
Bot: The cheapest flight from Dallas to Paris departing on Friday Nov 2, 2018 and returning on Monday Nov 5, 2018 costs USD 2398,55 and is operated by American Airlines.
User: What if I depart from Austin?
Bot: The cheapest flight from Austin to Paris departing on Friday Nov 2, 2018 and returning on Monday Nov 5, 2018 costs USD 2698,55 and is operated by Air France.
This solution contains the following components:
|Flight Search||Folder||Folder which contains subfolders for the flows, subflows and language objects that are part of this solution.|
|Find flight||Flow||Slot filling flow. Allows user to find a flight using departure city, destination city, departure date and return date.|
|Refine search||Flow||Context dependent flow. Allows users to change search crriteria.|
|Get departure airport||Subflow||Asks user for departure airport or city if unknown|
|Get destination airport||Subflow||Asks user for destination airport or city if unknown|
|Get departure date||Subflow||Asks user for departure date if unknown. Also makes sure date is in the future.|
|Get return date||Subflow||Asks user for return date if unknown. Also makes sure date is in the future.|
|AIRPORTS.ENTITY||Language object||Language object containing airports. If an airport is not recognized, it can be added here.|
|AIRLINE_RETURN.REC||Language object||Captures different ways of expressing return, inbound etc.|
|TRAVELCLASS.MUL||Language object||Captures travel classes 'economy' and 'business'|
|flightSearchParameters||Global variable||Map in which the search criteria used to find a flight are stored.|
|flightSearchInProgress||Global variable||Boolean that tracks if the Find cheapest flight flow is active.|
|amadeusApiKey||Global variable||Contains the Amadeus Self-Service API key, used by the Find Flights integration.|
|amadeusApiSecret||Global variable||Contains the Amadeus Self-Service API secret, used by the Find Flights integration.|
|activeTopic||Global variable||Used to track the active topic of the conversation.|
|Conversation Topic||Scripted Context||Global variable to track active topic.|
|Amadeus API||Integration||Integration to find the cheapest flight.|
|DateTimeHandler.1.0.0.jar||File||A .jar file needed for date time handling.|
Make sure you check for possible conflicts before you import this solution into an existing solution (merge solutions).
To search for matching flights, the solution uses the Amadeus Self Service - Flight Low-fare Search API. To be able to use this API you will need to register here and then obtain an API Key and API Secret here. You need to store the API Key the global variable
amadeusApiKey and the secret in the global variable
This solution can be imported into Teneo as a new solution. Once imported, please make sure to assign the lexical resources called 'Teneo Lexical Resource English' and 'DateTime - English' from 'Resources -> Lexical'.
The solution can be downloaded from the link below:
Was this page helpful?