Tour de force

WooExpert Platinum WooCommerce partner - biggest elephant in the eCommerce room.
Mailchimp Partner Mailchimp partner - you know what’s the newest cutting edge customer experience solution? Great email subject!
Clutch logo Clutch - clients say we’re top dogs in eCommerce. Throw us that stick now.
WordPress Vip WordPress VIP - Enterprise hosting partner

Building a Neurabot with Facebook Messenger, Microsoft Bot Framework and WordPress REST API

NeuraTeam has a new boost! Office pets like dogs became mainstream ‘’thing’’ so we decided that we need someone or something different. Long story short, we present to you the latest member of our happy bunch – NeuraBot. His task is to facilitate communication, answer user questions and establish good relations. His special skills include more social media activity and presence than our community managers can handle..and yes, you guessed it right. It’s a boy!

Listen to this article
1x
0.5x 0.75x 1x 1.25x 1.5x

Chatbots are no longer a novelty. They’ve spread and settled on almost all online platforms. This trend is definitely related to social networks and messaging applications such as Facebook Messenger, Telegram, Snapchat or Slack, which have become an ideal channel for these helpers. They are no longer responsible solely for communication. Instead, they have a multifunctional role. From advertising, virtual assistance, education, entertainment to customer service/support and product ordering. Technology in this field is so advanced that artificial intelligence has entered into widespread use through Chatbots and conversational virtual assistants.

Need an Uber ride? You can order it with Chatbot assistance. You can also order food, buy movie tickets, send an order to the nearest Starbucks, book doctor’s appointment or flight, transfer money to a friend or pay your utility bills. You can do almost anything that comes to your mind.

But one of the most widespread areas to use Chatbots is in e-Commerce. They can be very helpful on multiple levels and provide a complete shopping service. You can use them for accurate and quick product search. They can simultaneously handle more product orders from multiple customers, therefore speed up the ordering and shipping process. In addition, chatbot allows you to pay for your purchased products, providing complete and integrated shopping experience.

Therefore, conversational UX is an exciting new topic. Meaning = you can spend a lot of time exploring it. Our previous articles and experiments on Chatbots covered natural language processing, UX theory and frameworks. In this blog post, we’ll be talking about practical examples of building a Chatbot on top of Microsoft Azure Bot Framework, WordPress REST API, and Facebook Messenger.

Neuralbot

Technical side

Here’s a clearer breakdown of these modules and their role in Conversational UX or better said – NeuraBot’s anatomy and organs:

Microsoft’s Bot Framework is the heart of the NeuraBot. ‘’The goal of this module is to take user’s chat request, parse it and send the appropriate response. Think of it like the central nervous and soul system of the Bot.’’ Bot Framework is pretty powerful and its features include user action and intention processing, natural language processing, deep learning functions (predictions, estimations, pattern analysis) and an FAQ engine to build a Bot that understands user questions and gives real-time answers. We used this framework to power up our Bot and route information from its brains to ears and mouth.

WordPress layer in the grand scheme represents intelligence and Bot’s memory. It holds all of it’s knowledge in the form of Questions and Answers (FAQ Custom Post Type) and syncs this “memory” with the Bot’s heart.

Facebook Messenger is NeuraBot’s ears and mouth. This is a communication channel and a place where users can talk and converse about needed support topics. You could also place your Bot on Skype, Viber, Slack or other 3rd party communication platforms. We will not go into integration details here, but note that this approach is pretty robust, documented and tested. There are a couple of development premises at work that we wanted to achieve:

  • Build a Bot using existing stable online solutions
  • Bot should be useful and able to respond to specific user queries
  • Conversation should take place where the users are i.e. Facebook Messenger
  • Bot should help our support staff with answering typical questions and therefore, reduce time spent on usual tickets and FB messages

Implementation

Setting up Azure Bot Framewrok was the first step in creating our Chatbot. There are other AI frameworks for building the backend of the Bot like AWS Lex, Wit.AI and Google’s own engine. We decided to use Azure as it is the most stable one, and it seems that Microsoft is putting the heftiest amounts of resources into their own R&D.

In this case, we will build a Bot that can answer users Facebook Page questions and for that, we use Azure QNAmaker module. This type of Chatbot can function just by setting it up in the Azure interface and connecting your Facebook Page Messenger account to channels setting. You will need 0 hours of coding experience to get this type of Bot up and running. The backend is built right into the Azure. As you can see in the screenshot – providing other channels of communication is a fairly simple point ‘n click adventure.

channels

Your questions and answers are training datasets. The Bot will learn your FAQ patterns better the more questions you provide. Just one quick tip: keep in mind that your users are humans – answers should be really short and specific as you need to mimic normal chat behavior. Do not go into lengthy answers and articles. This type of communication is not readable in a bus-riding chat thread. In a nutshell, it is better to split one conceptual answer into more relatable micro answers.

We used WordPress for our FAQ database as this platform supports the creation of Custom Post Types and can be connected to Azure Bot Framework API via REST interface (which we did). You could manually edit questions and answers right into the Azure QNAmaker, but this process would be prone to errors and not user-friendly. That’s why we used WordPress powerful user-friendly interface for managing custom content like FAQ. Getting WordPress managed content into Azure QNAmaker is possible via two APIs – WordPress REST API and Microsoft QNAmaker API.


NeuraBot future adventures

Future technical expertise and useful creative brainpower you need to use in this Bot building task:

– Utilizing LUIS engine for building more complex AI interactions (current QNAmaker is pretty simple technology and we used it only to present current Bot building capabilities. At the moment, we’re working on NeuraBot that integrates with LUIS language recognition). Language recognition technology is advisable because the human conversation is complex and based on the topic context. It is closely related to the Chatbot’s understanding of what the user is asking. There is always a chance that the question won’t make sense at all, and that Chatbot won’t be able to respond correctly.

– Thinking more about exact copywriting and short bot2user messages. This is a pretty important topic and it’s outside developers domain. Only those people with real experience in crafting good and concise messages i.e. copywriters, brand owners, senior customer support staff, sales reps or other team members that frequently converse with customers. This means that the challenge is to develop ChatBot which can mimic human interaction and conversation a.k.a speak like a human. This includes Bot’s personality which is implemented in its answers so it can respond in a ”believable” and human-like manner.

– Building complex user flow patterns (asking for client brief, asking design related questions, determining the cost of the project etc.). General business topics and issues that users have, should be wisely included in the Bot’s linguistic component. Such information is often subjective and specific to each user and his case. Considering the fact that some answers in different situations don’t necessarily need to apply to all users, it is desirable to implement them to the most important and most frequently asked questions, as well as issues that are most important to users. Answers to such questions must be concise and simple. It is certainly advisable to split them into multiple questions and answers to minimize information satiation in the communication process.

Enough with the theory! We suggest you take a coffee break and chit-chat with our NeuraBot on Facebook Messenger. Just don’t corrupt him with bad influence. That’s up to us!

😉

Petra Filip
Petra Filip Copywriter and Content Maker

Skilfull content creator always on the hunt for tech trends


Subscribe to our quarterly newsletter

Please fill in this field.
Please thick this field to proceed.

Related blog posts