Inspiration

Have you ever stayed at an airbnb, VRBO or other vacation rental and wished you had the owner right there to answer a question? Me too. When we're on holiday we want to relax and have fun, not do a bunch of research or get frustrated trying to figure out how something in the house works. As both a vacation rental owner and occasional guest, I thought: what if we could use an AI chatbot to bridge the gap?

What it does

The Vacation Rental Concierge bot will provide you expert local knowledge about the vacation rental you are going to. Do you need restaurant recommendations in the area? Need the wifi password? Looking for things to do nearby? Just ask! This isn't generic information scraped from the internet, it is custom content provided directly by your vacation rental owner or manager. Make the most of your stay and spend your time enjoying your holiday, not hunting for answers.

How I built it

The foundation of the bot service was built using Amazon Lex, Lambda and DynamoDB. Lex provided the NLP mapping a guest's request to an intent. A Lambda function was used as a webhook for intent fullfillment. The Lambda function then leveraged DynamoDB as a persistence layer to provide the appropriate vacation rental content dynamically after a guest provides a code given to them by the property owner. I built an Owner/Manager web based Portal with HTML/Javascript/CSS that allows owners to easily enter their custom vacation rental information. DynamoDB backends the portal as well. Using this architecture, the bot is capable of significant scale thanks to services that autoscale in the background. I used Lex's built in integration with Slack to deploy the bot on that messaging platform.

Challenges I ran into

Not being a professional programmer, there were many challenges along the way. Almost every aspect of the development was a learning experience. One example of this was identity/access management for the Owner/Manager Portal. I needed a way to authenticate users and dug into OAuth, eventually integrating Login with Amazon into the portal. Most of the challenges were simply spinning up on a technology from scratch, but some were related to limitations of the tools. For example I found that the total size of the session attributes in a PostContent request and response with Lex is 12 KB. Sometimes the JSON that contains a given vacation rental's custom content is larger than that. As a result I need to check that each time and do a work around I developed for cases when it is true. Another tool limitation challenge was the choice of chat channel - I originally pursued Facebook Messenger but quite far into the development cycle I found that Messenger has some key limitations. For example, although Lex allows up to 5 buttons in a ResponseCard GenericAttachment, it turns out that Messenger only allows for 3. Further, while Lex allows for more, Messenger limits text responses to 640 characters, which is somewhat inadequate for this use case. Slack doesn't have these limitations, so I switched over. However with Slack I had to figure out how any guest could access the Concierge bot. This use case differs from others in that a guest will not want to install a chatbot into their Slack team when only using it for a few days at a vacation rental. To deal with that, I set up a 'Vacation Rental Virtual Concierge' Slack Team where the bot is installed. Then I had to figure out how to allow guests to automatically join that team, since Slack only provides native capability to do individual manual invitations. I found an open source library to help with that, and set up a Heroku app to host a page where guests can request invitations automatically.

Accomplishments that I'm proud of

I'd say there are three primary things I'm proud of in pulling this project together: 1) the breadth of technologies that I had to learn, 2) the overall architecture of pulling together the various components, and 3) the basic idea of the vacation rental concierge bot. More and more travelers are choosing airbnb and other vacation rentals over hotels and the market is exploding. Vacation rentals comprise over a $100B industry today and that number is projected to hit $170B within 2 years.

What I learned

I learned a tremendous amount through the process of delivering the end result of this project. The list includes Amazon Lex, finer points of NodeJS including callbacks and error handling techniques, OAuth 2, various ways to use the AWS SDK including documentClient, deployment automation with Gulp, and Login with Amazon for the portal. Since Allowed Origins must use https, I had to dig into SSL and learn how to use certbot and letsencrypt. On the Slack side I learned how to build a Slack app, and to work around the issue of manual guest invitations with Heroku.

What's next for Vacation Rental Concierge Bot

I'm looking ahead to a go-live date where the concierge bot will be launched publicly. I will also be porting the capability over to other chat platforms in the coming months.

Built With

Share this project:

Updates