How to Build Your First Bot for Messenger: 6 Key Steps
How to Build Your First Bot for Messenger: 6 Key Steps
This guide will break down the exact steps and tools required to create a chatbot for Facebook Messenger, along with the actual development price.
Join the DZone community and get the full member experience.Join For Free
Chatbots are now all over the place. Facebook Messenger has already over 11,000 of them, and Telegram, just around 1,000. Chatbots are now taking your Taco Bell orders, answer your support questions at KLM, or just tell you what the weather's like in your area.
There’s a good reason why users become more and more fond of chatbots. For starters, over 75% global smartphone owners access at least one messaging app per day. Businesses can tap into this opportunity to connect with customers on a more personal level without investing in more customer service reps. Bots are perfectly capable of doing this job.
The question, however, lies in how to build bots for Messenger. Those funny, efficient, and accurate types that are actually helpful and deliver value rather than irritation. This guide will break down the exact steps and tools required to create a chatbot for Facebook Messenger, along with the actual development price.
Step 1: Define Your Bot’s Purpose
Just because chatbot development is so hot right now doesn’t mean that your company needs one. Know your whys before moving to your hows. Clearly outline why you are making this bot. Some reasons might be:
To engage with customers.
To generate leads.
To automate a certain time-consuming routine.
To offer a better overall experience when customers use your services.
Step 2: Prepare Your Toolkit
Some good news here: you don’t need to be a professional developer to build a simple chatbot for Telegram, Facebook Messenger, or any other messaging app out there.
For our project, we’ve used Chatfuel, a free drag and drop tool that allows creating attractive Messenger chatbots with hardly any code required. However, the bot's functionality is rather limited.
If you plan to develop a more advanced solution, take a look at some of the best tools:
Meya: offers development environment and hosting for a large number of platforms including Slack, Messenger, and Telegram.
Reply.ai: a comprehensive, enterprise-level chatbot development platform.
Api.ai: helps to build better language interactions for chatbots.
Motion.ai: a visual bot builder, trainer, and deployment platform for a variety of projects.
Conversational Design Essentials
Now, considering that we are done with the prep stage, it’s time to move on to the more complex stage: getting things right with your chatbot UI and overall design.
Conversational interfaces mean that interactions with a service occur via a conversation (voice and texting), rather than using the standard GUI controls like buttons, scrolling or swiping.
Here’s an example of a great chatbot conversation. Can you believe Chloe isn’t human?
Now, let’s break down this example into actual steps that you can use as a blueprint to develop a chatbot for your startup.
Step 3: Use Hints for Getting Started
Initiating a successful conversation with a chatbot may be difficult for some users. There are no familiar controllers like those found in iOS/Android apps.
Most people just stare at the screen and wonder, "what am I supposed to do here?" or, "what can this bot do for me?"
A quick introduction message from your bot describing how they can help and what they do is essential for getting off on the right foot.
Keep your message short and sweet. Additionally, you may use buttons to prompt action. They will serve as additional hints of the bot's capabilities.
Step 4: Work on the Conversation Flow
First of all, you need to teach your chatbot to understand different types of questions and validate user input accordingly.
Rob Ellis created a great library called qTypes, which stores over 40 types of various questions and answer prompts for chatbots.
Input data validation is another tricky aspect. Users talk to the bot they way they please after all. There are no standard controllers, hence the most common UX design principles don’t quite work here.
Here are a few ideas to help you cope with the common problems:
Take advantage of Facebook-native formats. Lists, for instance, will allow you to organize and present your information more effectively.
Confirm user input. If the answer is acceptable, make a quick summary before moving to the new question.
- Always suggest what went wrong. If the provided answer isn’t valid, explain what went wrong. Make your bot sound witty rather than annoying in this case.
If a certain user input is critical but the user didn’t add it, then it’s better to make an educated guess and return to this point later in the conversation.
You can use Normalizer to process common abbreviations and misspelled words and to convert British or Canadian spellings to US English.
Step 5: Improve Your Chatbot Microcopy
Aspiring chatbot developers need to wear many hats, a copywriter’s included. You want your bot to sound human, fun and helpful, rather than too serious and annoying, right? Hence, focus on creating the copy to transfer that vibe. Here are some general tips to help you get started:
Avoid gender-specific pronouns, as you never know who’s on the other side of the interface.
Use simple, straight-to-the-point wording.
Smileys and emojis are alright as long as they make sense.
Create a set of custom canned replies for common problems to make the conversation more engaging.
Suggest connecting to your human help rep whenever a chatbot can’t help.
Use the same world flow as when you are talking to a live person.
Step 6: Infuse Some Personality
The most likable bots are the ones who have a distant personality. Both Siri and Cloe can make jokes and witty small talk. While teaching your bot the same level of word mastery may be a bit tricky, you can take the other route and create a backstory for your bot:
Assign a name and gender to it.
Offer information on the bots interests and skills.
Teach them about various holidays to make witty remarks and congratulate users.
When working on the chatbot copies you can shape your persona around the Big Five Personality traits:
● Inventive and curious vs. consistent and cautious.
● Efficient and organized vs. easy-going and careless.
● Outgoing and energetic vs. solitary and reserved.
● Friendly and compassionate vs. analytical and detached.
● Sensitive and nervous vs. secure and confident.
Last, but not least, add a few jokes. A smile can make even the most awkward conversation more pleasant.
Chatbot Development Costs
The cost to build your own chatbot will largely depend on the route you take. You can always DIY a simple one using the open-source resources if you have the time and experience. Certain chatbot self-service platforms do come with recurring fees, however.
You may be asked to pay between $19 per month for hosting 15 bots and 2500 interactions max and $50 per month for 25 bots and a maximum of 20,000 messages.
The development costs will also largely depend on your bot's “smarts.” Hiring a team to build a simplistic Facebook messenger bot with a basic feature set will cost you $2,000 - $10,000 per bot.
Building a more advanced specimen who is capable of continuous self-learning and having an AI engine to power all the functionality can set you back for a larger sum.
Opinions expressed by DZone contributors are their own.