Introducing Go4 — ATD’s Facebook Messenger Bot

Flavio Silva
TDx: Technology & Design
5 min readApr 22, 2016

I understand why many people are skeptical about bots. Many weren’t created with a clear value proposition while others simply exist to entertain you for a few seconds.

But don’t let that fool you. Bots, or conversational apps, are here to stay. They will completely transform how you interact with businesses —Have a question? Ask the bot. Frictionless. No need to download a new app, get used to its navigation structure, to then find the information you are looking for. Advancements in NLP and AI will just make that interaction easier.

In this article I’ll discuss the creation process of Go4, a bot that will help many attendees during our upcoming conference, ATD 2016, in Denver, Colorado.

My goal for Go4 was simple. Build a bot that knows everything about our annual event. Plus, ensure that the bot is actually better, and faster, at certain things when compared to a regular mobile app experience.

Feel free to use this article as a guide. At times, the task may sound a bit large — but with baby steps, you’ll get there. For context, it took me a week to get from idea to a working version of the bot (Sprint Book, :hint:hint). That includes developing all the search, dynamic pages, data pipelines, and bot logic.

Creating Use Cases

Nothing better than paper and pencil. To start, I drafted my main use cases:

  • Searching for sessions (“gamification sessions”)
  • Searching sessions by categories or tracks (“coaching sessions”)
  • Searching for speakers (“Bob”)
  • Searching for exhibitors (“Adobe”)
  • Common answers to queries like “what is the wifi password”, “how much is the party”, “where is lunch”, etc.

Planning

Great, now I know what the bot is supposed to do. Next, I decided on how folks would interact with it. That involved learning more about the Messenger API, and the available message templates.

I decided that the application would have 4 primary response types. I’ve opted to not show images for the most part, so the cards take up less vertical space.

Simple text messages

For basic questions and images, in case I try to give the Go4 a “personality”.

Exhibitor Card

Action: View Website (launches the browser on the exhibitor’s site).
Action: More Details (a quick text with an overview of the exhibitor).

Speaker Card

Action: View Sessions (shows all sessions for that speaker)
Action: Biography (returns a short summary about the speaker)

Session Card

Action: More Details (shows detailed information about the session, in an optimized web page)
Action: More Like This (using Solr MLT to index relevant keywords on the session description, objectives, and categories).

I also made extensive use of card lists, returning cards in a scrollable format.

Writing Code

Now that I know what to build, it was time to start writing code.

Unfortunately, I had almost none of the data I needed to ready to use… Giving up? Not an option!

To summarize, these are the main steps I took:

  • From the outset, I decided to use Wit.AI — an amazing platform by Facebook — that helps with parsing free text entries. I created my stories and callbacks to functions that not yet existed.
  • Create a new database, and schema to hold conference information.
  • Write code that pulled all the exhibitor, session, and speaker information from our vendors, Map Your Show and Attentive Interactive using their respective APIs.
  • Create a new Solr cluster with a proper schema, including event-specific stop words, and selected fields to “indexVectors” so they can be used by the “MoreLikeThis” handler.
  • Ingest data into Solr.
  • Create a Node.JS application, and use MongoDB to save all questions and context information.

Test, break things, fix things. I believe I got to 110 releases on Heroku by now :)

Putting It All Together

As part of the review process, I had to recorded a quick video of my interaction with the app.

Some cool features I’d like to highlight are:

  • The “More Like This” session list, something we don’t have today on our application or website and I thought would be a great feature for a conference. Enjoyed a session? Click “More Like This”!
  • Being able to ask Go4 for “coaching sessions tomorrow morning” and allow the bot to pull relevant sessions that are happening at the time you’ve asked for. Super cool!
  • An extremely fast way to search for anything. Simply open Messenger (which is probably already on your Home Screen…) and send — get your results in seconds.
  • Adding domain knowledge, such as coffee shop locations, wi-fi credentials, lost and found, dinner options, and so forth. We’ll add more as we analyze the requests.

Platforms Used

  • Wit.AI, to create stories and entities.
  • Instead of hosting them on our servers, I decided to use Heroku. I’m really happy with how they work. It couldn’t be easier to get the app up and running, plus the GitHub integration works great. I used the free plan for development, which is great.
  • Node.JS
  • SOLR, for searching
  • A few .NET backend services

And now we wait for the approval process!

If you liked this article, please click the Recommend button below. :)

--

--