Skip to content

A Complete Guide on How to Build a Chatbot (Easy to Hard)

April 30, 2019

As companies grow more comfortable with the idea of using chatbots on their websites, even those who don’t have in-house developers might want to get on board with the chatbot trend.

To do this, someone has to know how to build a chatbot, which can be confusing for non-tech-savvy people. Even companies who do have in-house developers might not have someone skilled at creating a chatbot on their own.

Fortunately, there is more than one way to build a chatbot, each requiring a varying level of technical skills.  

Unless the person building your company’s chatbot knows how to code using different coding languages, it will be difficult to attempt creating one – even if they are a developer. To ensure someone on your team can help with the chatbot creation process, providing them with different ways to approach the task will result in a stronger end product.

Let’s review the three different ways to build a chatbot, starting with most technical:

How to build a chatbot from scratch

Building a chatbot from scratch is something that is best saved for somebody who is highly tech-savvy and has an idea about, if not strong expertise on, coding and how to develop a program (or chatbot) from the ground up.

Still, in order to get started, you’ll need to decide on a chatbot building platform to house your bot. 

Because building a chatbot with code is immensely difficult for people with no development background and limited exposure to coding languages, it’s good to research sample chatbot code from expert developers as a jumping-off point for those determined to learn how to build their own bot without help.  

coding for a chatbot example

Image courtesy of Analytics Vidhya via Medium.com

If you’re one of those people, you might want to choose a common language like Python to get started. Additionally, you can find useful chatbot creation software for your chatbot building needs to help expedite the process.  

See the Easiest-to-Use Chatbots →

Chatbot platforms to build your first bot

  1. IBM Watson Assistant
  2. TARS
  3. Amazon Lex
  4. Verloop
  5. Chatfuel
  6. Azure Bot Service
  7. Collect.chat

Code-based frameworks for bot development

While not exactly software, code-based frameworks for bot development require a programming language, but they give developers the tools to customize their chatbot. These frameworks provide the database tools, analytic features, and infuse AI into the bot.

Some frameworks for developing a chatbot from scratch are:

  1. Microsoft bot framework
  2. Wit.ai
  3. API.ai 

For non-developers, use chatbot creation software

One of the many benefits of hopping on board the chatbot train in 2019 is the fact that chatbot creation websites are everywhere. What’s more, many of these sites offer low- or no-code options for users, specifically for people with no coding background whatsoever.

TIP: Learn more about the difference between low-code and no-code development.

Conversely, some chatbot creation sites allow users to hand off the responsibility of actually creating the bot to someone on their staff.

For example, Instabot gives users the option to get a free, custom-built bot created by one of their developers. On their site, their on-page chatbot prompts the site visitor with buttons with sample queries from which the user can choose. 

instabot chatbot chat box

Image courtesy of Instabot

Options like Start Free Trial and Custom Bot Built for Free guide interested parties to a series of extended questions that help direct them to the appropriate “chatbot architect” (AKA the developer) who will be creating your chatbot for you.  

instabot chat next steps

Image courtesy of Instabot

Their site bot will ask for more information, such as contact details, the web address for the site you want your bot to be connected to, and what responsibilities you want your chatbot to have. These queries ensure that the proper chatbot architect is tasked with creating your site’s bot.

As seen above, the Instabot chatbot is able to understand the information I type to it; however, it is clear that the chatbot contains a combination of canned responses and natural language processing (NLP) capabilities.

This means that the bot is programmed to recognize FAQs and key phrases/responses, as well as identify the components of an email address. Instabot understands that a proper email address should contain words before and after the @ sign, plus a .com/.net/.org ending to indicate that it is indeed a viable email address.  

Building a chatbot through Facebook Messenger

Possibly the most common method, Facebook chatbots seem to be the tool of choice for many companies, big and small. What makes this option ideal are the multiple tools that Facebook provides to users. There’s an entire page dedicated to developers; however, non-developers interested in building a chatbot can use it as well (thanks to the user-friendly site directions).

Creating your chatbot through Facebook and hosting it via Messenger is ideal for many because Facebook provides tools and guided directions on how to actually build your bot. Users who go this route will end up learning some elements of coding in the process, but it’s low-code so that even beginners can create a bot on their own. Plus, countless people worldwide use Facebook, so your chatbot will be visible to millions.

Facebook even provides people who are creating a chatbot with examples of successful bots (including sample code!) to aid in chatbot development. 

FB messenger bots example page

Image courtesy of Facebook

Another aspect of chatbots hosted on Facebook is how they can be integrated into an external site (i.e. your home web page can have the chatbot’s code embedded into it!). Now, you have the option for users to access your chatbot on Facebook directly or from your homepage, giving them a choice as well as ease of accessibility.

8 tips for building your first chatbot

The use of chatbots for conducting customer service and 24/7 web-based assistance has risen rapidly in the past decade.

According Mikael Yang, 80% of business to customer communication is going to be done through bot messengers within the next three to five years. So, to keep on pace with this trend, you might have considered adding a chatbot to your company’s website, but stopped yourself because you weren’t sure how to approach the challenge.  

If you’re a go-getter and want to make your own chatbot, keep reading for 6 expert tips on creating a chatbot, as well as setbacks and triumphs they had during the process! 

1. Make sure your chatbot doesn’t sound robotic

Though your chatbot is a robot, it shouldn’t seem like one. Using natural language processing to give your chatbot a natural conversation flow that makes it human-like and easy to understand is crucial for enhancing customer interactions with your bot.

It’s much easier to ask questions to a bot that can recognize human language patterns and respond in a relatively understandable format than rewriting a query over and over in hopes that the bot will understand. Think of it this way: when you call your cable provider to make a complaint, the first person you interact with is an automated voice assistant.

Question: How many times have you shouted “AGENT!” at the phone while the voice assistant ignored your request? Frustrating, isn’t it? You want to avoid that same possibility for frustration with your chatbot. A user shouldn’t have to type their question multiple times in order to be directed to the appropriate representative.

2. Remember these four steps: Build. Train. Deploy. Track.

For the non-tech-savvy, there are four steps to remember when creating your chatbot: build, train, deploy, and track

  1. Build: The first and most obvious step to creating a chatbot is building it. Once you build your chatbot, whether through an external site, on Facebook, or completely on your own, the development process is the most important element. Once you decide what your bot will be used for, how intelligent you want it to be, and where it will be hosted, you’re ready to train it to have human-facing interactions.
  2. Train: As mentioned earlier, training your chatbot is a process that is relatively simple, but incredibly repetitive. Depending on how smart you want your bot to be: basic level, responding to FAQs and canned inquiries versus high-level, understanding human language by being fed sample interactions in order to strengthen its natural language capabilities – will determine how much training your bot needs.

    If you only want it to answer questions you auto-populate on your site, then it won’t have to learn as much as it would if you want it to respond to user inquiries akin to a human representative. Alternatively, if your end goal is to use the chatbot only as a guide to redirect your users to a human customer service agent, then your chatbot needs much less training than a more intelligent bot would.
  3. Deploy: After building and training your bot to complete the tasks you want it to do, you need to deploy it. Whether you’re using Facebook as your platform or inserting the source code of your freshly-created bot into your webpage, once deployed, your bot needs to be shown off to your users. Once users know your bot is live, they’ll know to use it as a knowledge source for finding information as well as asking questions about your company, products, and anything else the bot has been trained to share responses about.
  4. Track: This final step is one far too many people skip over. In order to see how efficient adding a chatbot is for your company, shouldn’t you be tracking the success of your bot? Tracking your chatbot’s success rates is pretty simple, but not often thought of as a closing step in the chatbot creation process.

    After your bot has been deployed, and once it has interacted with people, it’s important to ask your customers how their interaction with your chatbot went. Were there serious issues that need to be addressed? Was your chatbot flawless in its interaction to the point that it was nearly impossible to tell it apart from your human customer service representatives? (If so, run!)

    Regardless, chatbot tracking is a necessary step to include to find flaws and improve on your bot’s language capabilities and success rates. You can administer a post-interaction survey, guide your users to a human representative to answer questions, or have the bot send an automated questionnaire when the user goes to X-out of their conversation. It’s a win-win for everyone!

3. Plan for a time-consuming process

“It took us about 3 months to develop an MVP which was the first working version of a product. The whole development process is quite time-consuming (from learning and testing processes to the actual chatbot production). Luckily, you can create a chatbot prototype within a couple of months. The prototype is used for UI and conversational flow testing. 

From a technical perspective, we needed to train our chatbot to imitate a human-to-human conversation. For this purpose, we used sequence-to-sequence modeling, which is the same that is used in Google translate. It allows us to generate a large number of conversational logs, so we used different datasets to train our chatbot to respond in a human-like manner. 

When creating a chatbot, you have to consider multiple aspects. First of all, you should have a clear picture of all the tasks for your chatbot. Then, you can create a diagram and analyze how the conversation with a chatbot can flow.  

Since we have extensive expertise, we didn't have to learn how to code. However, for those who are new to programming, there are various sources that can simplify the development process. If you use such sources as DialogueFlow for development of simple bots, you don't even need to code.” 

- Diana Meleshkova, Marketing Specialist at iTechArt Group

4. Have coders and analytically-minded people on your team

“My company built a chatbot from scratch using Python and Google Dialog Flow. It took about 6 months to bring the product to market. Our bot, Adam, guides patients through clinical trials and is capable of answering questions, collecting data, and dynamic scheduling.  

Part of the team knew how to code, and the other part (myself) was analytical and helped with building out some of the algorithms.” 

- Rob Welch, MBA Candidate at Tepper School of Business, Carnegie Mellon University

5. Give the chatbot a “real” voice

“At my previous job, we developed a chatbot for Coca-Cola. One of the biggest things you must have in mind is imagining a real conversation flow. For that, you have to create a script with questions and answers related to the campaign, brand, or product.

Watch out with being ‘too robotic’ because people normally hate this kind of practice. They want to feel like they are speaking with a human, not with a chatbot. Lastly, always offer a way to chat with a real person for special requests that can’t be solved by the chatbot.”

- Juan Jose Mateo, Social Media Manager at Fierce Digital

6. Budget wisely, especially when using advanced features

“I have used 2 different software platforms to build, the first being MobileMonkey, which is a great platform for those just getting introduced to chatbots. The platform I currently use is ManyChat, which is extremely robust, and offers all of the features currently available through Facebook Messenger.  

The only real roadblocks in setting up a chatbot are cost (if you’re using advanced features – both the platforms I’ve mentioned have free tiers), time, and some marketing know-how. The learning curve isn’t steep, but it is time-consuming. 

As far as coding goes, you don’t really have to know how to code to make it work. I do have a background in code, so embedding my chatbot on our website wasn’t hard for me. Still, for someone who doesn’t know anything about coding, most platforms give you what code you need, and tell you exactly where to put it.” 

- Tayler Christensen, SEO Strategist at Cougar Digital Marketing & Design

7. Prepare for limitations

“The time it takes to build a chatbot depends on how complex the bot is. If you are going to do a simple lead generation bot that sends the customer a resource or coupon after they submit their info, this can take less than an hour. However, if you want to do a calculator or quiz where there is a score or multiple outcomes based on your answers, it can take several days to test and make work properly. 

An important function that we try to include in all of our chatbots is being able to pull the lead data and information from people who are interacting with our bots either by using native integrations built into the chatbot software or by Zapier to send the data to our database marketing software like Hubspot. 

As far as limitations, there are many. You can only have so many characters on buttons. The size of your images and videos have to be a certain size.” 

- Steven Page, VP of Digital Strategy at Giant Partners

8. Understand AI, NLP, and software development concepts

“Our company has built chatbots for large tech retail organizations. We have done this from scratch by building out the backend infrastructure and language models, as well as the front end user experience.

We have a background in natural language processing (NLP), artificial intelligence (AI), and computer science. If one is building a chatbot from scratch, it is important to be an expert in software development concepts, as well as AI concepts of machine learning and NLP. It is also important to know about linguistics, parts of speech (nouns, verbs), and dependency parsing.”  

- Rutu Mulkar, PhD, Founder at Ticary Solutions

Are you ready to hop on board the chatbot train?

Sometimes, it’s best not to follow trends and do your own thing. This is not one of those times. To make sure you’re on board with the forward movement of human-bot interaction, make sure you strongly consider adding an AI chatbot to your website today!  

If you need more motivation for creating a chatbot, check out 35 must-read chatbot statistics for 2019

Get your Chatbot Stats roundup Download Now, FREE →

Never miss a post.

Subscribe to keep your fingers on the tech pulse.

By submitting this form, you are agreeing to receive marketing communications from G2.