Everyone on our team flies often, and we’ve all wanted an easier way to search and book flights.
What it does
Search for American Airlines flights from a source to a destination on a certain date through Alexa. When searching for back-to-back flights it accurately optimizes for the shortest time interval between departure and arrival. Book an American Airlines flight through Alexa.
How I built it
Alexa Skills are like apps. Skills are voice-driven Alexa capabilities. In other words, Skills are the interface between users and Alexa. The development of an Alexa Skill involves developing a set of functions that represent various action flows - where each function takes a JSONized voice command and returns the next dialog. This set of functions can be hosted on AWS Lambda, an event-driven, serverless computing platform offered by Amazon, for remote access.
Challenges I ran into
- Free tier AWS severely restricts the way we could employ and utilize cloud services.
- Alexa's natural language interpretation is volatile, to say the least so some dialog flows won't perform consistently because Alexa would unexpectedly misprocess/misclassify the intent.
Accomplishments that I'm proud of
- We got the application to work completely flawlessly with the Flight Engine API we were given.
- The algorithm to search for connecting flights was non-trivial but it was satisfying at the end.
- Pulling the credit card information from the user's Amazon account (thanks to a suggestion from a developer at the American Airlines booth) took a good deal of configuration.
What I learned
We learned a lot about the workflow of an Alexa skill and chatbots in general. It rekindled our interest in event-driven programming and the functional programming paradigm, both of which, we want to explore more of.
What's next for AirAlexa
- Support more customization for booking tickets and searches.
- Allow the user to book multiple tickets at once.
- Connect the user's AA Advantage account to the Alexa skill to make it more personalized and "smarter".