Teneo Developers

Amadeus

The Flight Search solution contains example flows to search for the cheapest flights between two locations.

Amadeus Logo

The Flight Search solution contains example flows to search for the cheapest flights between two locations. Watch the video for an explanation of the core concepts used this solution.

Core concepts

  • Slot filling
  • Subflows
  • Date handling
  • Integration
  • Sharing information between flows
  • Flow links

Example conversations

User: I want to find a flight.

Bot: Where would you like to depart from?
User: London

Bot: Where would you like to fly to?
User: Barcelona

Bot: When would you like to depart?
User: Tomorrow

Bot: When would you like to return?
User: Wednesday

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.

Solution components

This solution contains the following components:

NameTypeDescription
Flight SearchFolderFolder which contains subfolders for the flows, subflows and language objects that are part of this solution.
Find flightFlowSlot filling flow. Allows user to find a flight using departure city, destination city, departure date and return date.
Refine searchFlowContext dependent flow. Allows users to change search crriteria.
Get departure airportSubflowAsks user for departure airport or city if unknown
Get destination airportSubflowAsks user for destination airport or city if unknown
Get departure dateSubflowAsks user for departure date if unknown. Also makes sure date is in the future.
Get return dateSubflowAsks user for return date if unknown. Also makes sure date is in the future.
AIRPORTS.ENTITYEntityLanguage object containing airports. If an airport is not recognized, it can be added here.
TRAVELCLASS.ENTITYEntityCaptures travel classes 'economy' and 'business'
AIRLINE_RETURN.RECLanguage objectCaptures different ways of expressing return, inbound etc.
flightSearchParametersGlobal variableMap in which the search criteria used to find a flight are stored.
flightSearchInProgressGlobal variableBoolean that tracks if the Find cheapest flight flow is active.
amadeusApiKeyGlobal variableContains the Amadeus Self-Service API key, used by the Find Flights integration.
amadeusApiSecretGlobal variableContains the Amadeus Self-Service API secret, used by the Find Flights integration.
activeTopicGlobal variableUsed to track the active topic of the conversation.
Conversation TopicScripted ContextGlobal variable to track active topic.
Amadeus APIIntegrationIntegration to find the cheapest flight.
DateTimeHandler.1.2.3.jarFileA .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).

Dependencies

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 amadeusApiSecret.

Download

  1. Download the solution here.
  2. Import the solution into Teneo studio. We recommend you to import it into a solution that is based on the Teneo Dialogue Resources English.