Best Practices At Implementing A Cross Platform Chatbot - Webclerks Meetup - Ondrisek

Embed Size (px)

Citation preview

Best Practices At Implementing
A Cross Platform Chatbot

Hi guys!

My name is Dr. Barbara Ondrisek and today I'm going to give a talk about my experience developing one of the very first chatbots on Facebook and definitely Austrias first Facebook Messenger and Skype chat bot.

About me: Ive made my PhD at the University of Technology Vienna and been working as a freelancer for more than 15 years for different mostly big companies mostly as a Backend developer on web projects (most recently for George / Erste Bank).

Chatbots &
Natural Language Processing

What are chatbots?A chatbot is a service that enables you to interact with a service or company through a conversational interface. Microsoft announced end of March at their BUILD conference the bot-support on Skype. Two weeks later Facebook announced at their F8 conference that they finally opened their messenger API for bots and the first bots started to be approved by Facebook. Only a few days later Hi Poncho, a Facebook Messenger weather bot, raised 2M of funding.Further Google presented at their Google I/O (mid May) another innovative chat platform Allo that also should support bots. Further they announced in mid July their Cloud Natural Language API as a Natural Language Processing (NLP) and Machine Learning framework. IBM also released their NLP framework Watson. So all of the big players in the field are pushing the topic.Just a couple of days ago, Google announced, they bought api.ai, a machine learning framework.

Messenging Apps

(c) Benjamin Keyser

Why are we doing this? 1 minute of 3 online spent minutes is spent mobile, but we see that the usage of numbers of apps is dropping (80% of time is spent in 3 apps), but not messenger apps! The current app trend is to go away from social media to messengers.

This graph is already outdated, ...

Usage numbers

(c) Tosh

WhatsApp: 1 Billion monatlich aktive User (MAU)Facebook Messenger: 1 BillonQQ (ICQ China): 900 MAUWeChat (WhatsApp in China): 800 MAUTwitter: 310 MAUSkype: 300 MAULine App (Asien) : 220 MAUTelegram: 100 MAUKik (USA): 300 Millionen registrierte User (gesamt)

Slack: 3 Millionen tglich aktive UserHipChatIMessage: 250 mio usersViber: 784 million registered userKakao: 160 mioBBM: 100 mio MAU

Platforms per region

(c) david pichsenmeister

Different messenger platforms different countries

Kik is super popular in the US, Viber is very popular in Slavik countries, Line is popular in Asian countries. So if you decide to launch a bot in a certain region take this regional differences in account.

Mica, the Hipster Cat Bot

However, after Facebook announced to open up their Messenger platform to bots I was eager to try their API and started to develop Mica, the Hipster Cat Bot, which started as a chatbot for Facebook Messenger and Skype, that helps you discover the best places near by.

Mica started as a spin-off of LIKE A HIPSTER, an app that shows you trandy places.

Facebook Messenger

This is the Facebook Messenger implementation - We designed her personality like this:

She is a cat and a bot. She likes funny cat pictures and milk, but doesn't like water. She also enjoys hanging out in hip coffee shops and knows the the best places worldwide.

The internet loves cats ... so I created Mica, the Hipster Cat Bot as fictional character and my chatbot got a face. First I thought I use my cat's face as fb page icon, but than I thought an abstraction would fit better.

Many different implementations

So, why only stay with one platform? There are so many such as Kik, Line App, Telegram and so I thought I implement it on Skype!Microsoft announced end of March two weeks earlyer than Facebook - at their BUILD conference the bot-support on Skype. Facebook Messenger has 1 billion unique users per month, but Skype still has 300 mio!

Skype

and so I decided to implement it on Skype!Skype implementation is missing some features. Meanwhile there are structured messages (buttons), no animated content (gifs, videos)...

Implementation Details

To implement a bot for Facebook Messenger or Skype you simply have to implement a Webhook that can be written in any language you want. I chose Java because I like the object oriented language most.In Java you have to write DTOs to handle the different REST resp. Json objects.The backend is hosted on AWS EC2 and uses also a simple MySQL database to store basic data about the user such as the users name or last city.

- Mica on Facebook, on Product Hunt - Mica on Skype, on Product Hunt - Mica on WeChat - Mica on Telegram, on Product Hunt - Mica on Kikdeveloping the character, learnings, personality far more important than thought

Features per Platform

Features per Platform (2)

Features per Platform (3)

Lessons Learned

First of all:- Just do it! It's not so complicated to implement basic chatbot!

- The APIs are still in BETA, although the FB API is more stable than the Skype version. Skype, especially the iOS version, was so buggy that after the day of my Product Hunt launch one of the Skype Skype (!) developers contacted me to go through the bugs ;)

-Bot functionality is still limited. App developers are laying early groundwork on user experience, bot personality, getting access to data, developing algorithms, improving NLP, and many more challenges.

- User Experience is extremely important. Otherwise users get frustrated. So a UX-Designer joined my team!

I founded the Chatbots Agency, the first agency for chatbots with (paying!) international customers.

Any Questions?

Any questions?

webclerks