How to Put FAQ Chatbot into Your App
Let’s start this article with a quite long question:
“What if you have an app or running website, and want to automate incoming questions about your products from your customers.
You want the question to be accessible from several chatting platforms, not only from your own platform but also from Facebook Messenger or even LINE as well.
In addition of that, if the chatbot fails to answer correctly, you want it to be handed over to your customer services team. What is the solution for that?”
The answer would be Qismo.
Qismo is a Software as a Service (SaaS) solution from Qiscus that offers several features, including gathering messages from chat platforms by connecting it to supported omni channels, chatbot integration, as well as smart agent allocation.
You just need to sign up to the service here.
Since you wanted to respond to the incoming questions automatically as well, you need to build a Frequently Asked Question Bot (FAQ bot).
You are free to build it using any bot frameworks you want, as Qismo is loosely coupled service, in terms of its capability to integrate with chatbot. For example, you may want to use Kata.AI, DialogFlow, Watson, Wit.AI, etc. to build your bot, as long as you are following Qiscus convention.
To ease your process, you may want to try using Kata.AI as they provided a user-friendly UI to build a chatbot, called Kata Platform. In general, it consists of Bot Studio and Natural Language (NL) Studio.
In addition to that, they already have a model to train your bot as an FAQ bot, as they have FAQ classification model on their NL Studio, which simplifies process of making FAQ chatbot.
Furthermore, what make it even easier is that they have provided seamless integration with Qiscus SDK by providing Qiscus channel. As you may use Qismo, you’ll definitely need this one.
Create FAQ Bot in Kata
Now, how to create one?
Let’s use Kata.AI to build one. So, get over to Kata Platform, login and create a new bot. Let’s called it Qiscus FAQ Bot.
As soon as you created one, you will be brought to the configs page. For more tutorial on how to create a bot in Kata, you can refer to Kata’s documentation.
Next, let’s go to the NL studio to create a Natural Language Understanding (NLU) model for this bot. We will use this NLU to understand what is the intent of each incoming question.
In the moving image above, we created a new NLU model called
qiscusfaq as well as initiated a new entity called
intent with a couple of labels,
intent entity will be used to identify what is a question about. In this example we classify incoming statement as greeting and products.
After that, let’s train this model to learn statements,
By doing so, our model will now be able to predict what intent in a new sentence. So for example, if we try to say “Halo”, it will classify the statement as greeting with certain confidential score.
After you are finished with the training, what left is to use this model in the bot flow by creating new NLU in the Bot studio.
Notice in the GIF above, you will need to grab the NLU id to be used when initiating new NLU. Beside that, you will have to specify the threshold and the intent as Intent. In the GIF above, we created a fallback flow. this flow is used as a fallback respond when our bot doesn’t understand a statement.
Finally, you will have to create a new flow called faq beside a fallback flow.
Easy Integration to Qismo
That’s all how you create an FAQ bot on Kata Platform. What left is to deploy it to Qismo as we want it to respond to any incoming messages in Qismo.
Kata Platform already supports deployment to Qismo directly. We need to set up three things:
- Qiscus Secret Key in Qismo,
- Qiscus Agent ID in Qismo,
- Qismo Bot webhook URL.
You can follow the GIF above.
Put FAQ Bot into Your App
We have signed up to the Qismo and created our FAQ bot, what we need to do next is to implement a widget in order for our customer to reach our service.
As Qismo is running on the top of Qiscus SDK, you have a flexibility to implement your chat client in any platform you want, whether it is on website or mobile apps.
To implement the chat widget on your website, all you need to do is to copy a snippet code from the Qiscus widget tab on the Qismo integration page to your website.
As result you will see chat widget and you can interact with customer service
Android in App Widget
You may want to put widget also in your mobile app. That is really possible because Qiscus Chat SDK support multi-platforms. To illustrate how it works, this is flow of how your app will interact with Qismo and Qiscus Chat SDK.
Here’s the main steps to implement chat widget in your apps :
- Clone qismo-widget-android repository
- Call API Qismo https://qismo.qiscus.com/api/v1/qiscus/initiate_chat to get credential account
- Save credential account in Qiscus Server
- Call API getChatRoom to get qiscusChatRoom
- Start chat with particular qiscusChatroom
How to build/run:
- Android Studio : Menu Build → Clean Project → Run (Shift + F10)
$cd /path/to/project $./gradlew assembleDebug
After running this project, you will see the login UI, this is very simple sample login UI, you can modify your own UI based on your need
Then you can start to chat with your customer service or your agent!
Very easy right? If you have any question you can right away send us email at [email protected] to ask more detail question and we will be happy to help you!