Create Instagram Bot Handover from Chatbot to Agent Tutorial
Kata Platform https://platform.kata.ai is a platform to create chatbots and train them with Natural Language Processing (NLP). You can create any chatbots for any use-cases, such as FAQ, campaign, customer service, handover to human agents, and more.
Currently, we’ve launched Instagram chatbot with various features, such as End-users can receive automated replies by creating an Instagram story that mentioned brand, receive automated replies by replying to brand Instagram story, receive bot responses in image, text, quick reply, ice breaker (for first-time users only) and generic template (similar with a carousel in other messaging platforms). Learn more about Instagram DM Automation.
In this tutorial, we will create an Instagram chatbot that is able to send conversations to human agents, also known as "Agent Handover''. We will use the Kata Omnichat dashboard to connect chatbots with human agents. Learn more about Omnichat.
Chatbot Flow
Before we jump into the tutorial, let’s see the scenario for the conversation. We will create a chatbot using keywords.
Conversation Flow Table
Conversation flow table details can be seen here
Create Project
Objective: Register your new account and login to the Platform
-
Go to https://platform.kata.ai and click Sign Up to create new account
-
Input required fields in sign up page: Username, email address, role and captcha
-
Go to your registered email inbox. You will receive an email to verify your account and input your password
-
When you click the Confirm Email button in the verification email, you will be redirected to set up a password. Insert your password and confirm the password.
-
You will be redirected to the Login Page. Input your username and password to continue.
Objective: Create new chatbot project
Login to Kata Platform and create a project
-
Open your browser, then open the URL https://platform.kata.ai/login and enter your username & password.
-
Click "Login" to continue.
-
Click on "Create Project" and fill in the form. Each project contains one bot design, one NL, and one CMS.
Create Handover Flow
Objective: Define a flow
Create a flow name "handover". We will use 1 flow for this simple bot
-
Click "Create Flow" button on the Conversation Flow screen
-
Create flow "handover", other fields are left blank. Then, click Create.
Create "init" state
-
Click "+" icon in the bottom right to create a new state
-
Create state "init" and click the toggle to turn on “Initial State” and other fields are left blank. Then, click Create.
Create Greetings State to Respond End-User’s who Greet Bot via Direct Message
In this part, we are going to create a greeting flow to respond to end-users who greet the brand's bot via direct message, but not via Ice Breaker. For example, the end-user says "hi" to the bot and does not want to choose via Ice Breaker. Learn more about Ice Breaker.
Objective: Create greetings state to define how to respond
Create "greetingsState" as bot response to show keywords menu
-
Create another state by clicking the "+" icon in the bottom right to create a new state named “greetingsState”
-
Click "Add action", then click “+” in the action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "greetingsText"
-
Next, click the Add Variant button to fill in with this text:
Halo, selamat datang di layanan CS Bank ABC 😊 \n\nUntuk memulai, pilih menu yang tersedia: \n\nKetik "1" untuk melihat FAQ \nKetik “2” untuk melihat promo yang tersedia \nKetik “3” untuk melihat lokasi Bank ABC \nKetik “4” untuk berbicara dengan CS Bank ABC \n\n💡 Cukup ketik angka pilihannya, ya
- Click Create Action
Set the state into self-transition
The self-transition will make the actions under state will be repeatedly shown if end-users give an incorrect answer
-
Go to tab Transitions
-
Turn on on the Self Transition toggle
-
Then, click Create to finalize the state
Objective: Catch end-users messages when greeting the bot
Create "greetings" keywords to build understanding in chatbots when end-users greet the bot. We will use the NLUs feature to create the keywords.
-
Go to the menu "NLUs" which is placed under the “Conversation Flows” menu. Your screen will be switched to create NLUs
-
Click Create NLU
-
Then, fill in the fields as follow
NLU Name: greetings
NLU Type: Keyword
- Next, click "Add Keyword" to define any words to trigger the bot. Fill in the main keyword as follow
Main keyword: greetings
- Add a new word by pressing "enter" on your keyboard. Every time you write a new word, press “enter” on your keyboard to save words. Add these words
- Click "Create" to save the NLUs
Create "greetingsIntent" intent to catch user’s input
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. The choice of "Intent type" is text, which means it will catch incoming messages with text only. We also set up the intent into “As Initial”, which means the intent will be executed for the first time. On classifier, use “greetings” NLUs that we’ve created in the previous step to connect the intent with creating keywords for greetings.
Objective: Connect "init" and “greetingsState” states by creating a transition
Create a transition to connect "init" and “greetingsState” states. The transition will define in which condition the greetings state, including the actions’ state, will be executed.
-
Pull a line from the "init" state and drag it to the “greetingsState” state. If you succeed, then it will show a Create Transition drawer
-
Fill in the transition condition as follow
intent == "greetingsIntent"
- Click "Create Transition"
Create Greetings State to Respond End-User’s who Greet Bot via Instagram Story Mention
In this part, we are going to create a greeting flow to respond to end-users who mentioned the brand’s Instagram account in the end-users Instagram Stories. End-user will receive an automatic message in a direct message. Learn more about Instagram Story Mention.
Objective: Catch end-users who mentioned the brand’s in the end-users Instagram Story
Create "igMentionedIntent" intent to catch user’s input
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. We set up the intent into "As Initial", which means the intent will be executed for the first time. Choose intent type into data, because we will use a payload named story_mention.
- Then, click Create.
Objective: Create greetings state to define how to respond
Create "igMentionedState" as bot response to show keywords menu
-
Create another state by clicking the "+" icon in the bottom right to create a new state named “igMentionedState”
-
Click "Add action", then click “+” in the action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "igMentionedText"
-
Next, click the Add Variant button to fill in with this text:
Halo, terima kasih telah menyapa Bank ABC di Instagram Story Anda 😊 \n\nUntuk memulai, pilih menu yang tersedia: \n\nKetik "1" untuk melihat FAQ \nKetik “2” untuk melihat promo yang tersedia \nKetik “3” untuk melihat lokasi Bank ABC \nKetik “4” untuk berbicara dengan CS Bank ABC \n\n💡 Cukup ketik angka pilihannya, ya
- Click Create Action
Set the state into self-transition
The self-transition will make the actions under state will be repeatedly shown if end-users give an incorrect answer
-
Go to tab Transitions
-
Turn on on the Self Transition toggle
-
Then, click Create to finalize the state
Objective: Connect "init" and “igMentionedState” states by creating a transition
Create a transition to connect "init" and “igMentionedState” states. The transition will define in which condition the greetings state, including the actions’ state, will be executed.
-
Pull a line from the "init" state and drag it to the “greetings” state. If you succeed, then it will show a Create Transition drawer
-
Fill in the transition as follow
- Click "Create Transition"
Create Greetings State to Respond End-User’s who Greet Bot via Instagram Story Reply
In this part, we are going to create a greeting flow to respond to end-users who reply to the brand's Instagram Story. Learn more about Instagram Story Reply.
Objective: Catch end-users who reply to the brand’s Instagram Story
Create "replyStoryIntent" intent to catch user’s input
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. We set up the intent into "As Initial", which means the intent will be executed for the first time. Choose intent type into data, because we will use a payload named story_reply.
- Then, click Create.
Objective: Create greetings state to define how to respond
Create "igStoryReplyState" as bot response to show keywords menu
-
Create another state by clicking the "+" icon in the bottom right to create a new state named “igStoryReplyState”
-
Click "Add action", then click “+” in the action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "igStoryReplyText"
-
Next, click the Add Variant button to fill in with this text:
Halo, terima kasih telah menyapa Instagram Story Bank ABC 😊 \n\nUntuk memulai, pilih menu yang tersedia: \n\nKetik "1" untuk melihat FAQ \nKetik “2” untuk melihat promo yang tersedia \nKetik “3” untuk melihat lokasi Bank ABC \nKetik “4” untuk berbicara dengan CS Bank ABC \n\n💡 Cukup ketik angka pilihannya, ya
- Click Create Action
Set the state into self-transition
The self-transition will make the actions under state will be repeatedly shown if end-users give an incorrect answer
-
Go to tab Transitions
-
Turn on on the Self Transition toggle
-
Then, click Create to finalize the state
Objective: Connect "init" and “igStoryReplyState” states by creating a transition
Create a transition to connect "init" and “igStoryReplyState” states. The transition will define in which condition the greetings state, including the actions’ state, will be executed.
-
Pull a line from the "init" state and drag it to the “igStoryReplyState” state. If you succeed, then it will show a Create Transition drawer
-
Fill in the transition as follow
- Click "Create Transition"
Create Quick Replies
In this step, we will create bot responses named quick reply. Learn more about Quick Reply for Instagram Messaging.
Objective: Show available FAQ topics to end-user
Create "faqState" state
-
Click "+" icon in bottom right to create a new state
-
Fill in the state name with "faqState"
Create quick reply response type
-
Click "+" in action box to create a new action
-
When all actions available are shown, then choose "Quick Reply"
-
Input action name "qrText"
-
Fill in the Message field with:
Pilih topik yang kamu inginkan 😊
-
Next, click Add action button
-
Fill in the fields as follow
- Click button Create Action
Set the state into self-transition
The self-transition will make the actions under state will be repeatedly shown if end-users give an incorrect answer
-
Go to tab Transitions
-
Turn on on the Self Transition toggle
-
Then, click Create to finalize the state
Objective: Connect all greetings states to FAQ state
Connect greetings via direct message to FAQ state
-
Pull transition line which starts from "greetingState" to “faqState”
-
Fill in the Condition field:
content == "1"
- Click Create
Connect greetings via Instagram story mention to FAQ state
-
Pull transition line which starts from "igMentionedState" to “faqState”
-
Fill in the Condition field:
content == "1"
- Click Create
Connect greetings via Instagram story reply to FAQ state
-
Pull transition line which starts from "igStoryReplyState" to “faqState”
-
Fill in the Condition field:
content == "1"
- Click Create
Objective: Show bot response after end-user choose "Daftar rekening baru"
Create "rekeningBaruState" state
-
Click "+" icon in the bottom right to create a new state
-
Fill in the state name with "rekeningBaruState"
Create bot response
-
Click "+" in action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "rekeningBaruText"
-
Fill in Message field with:
Untuk mendaftar rekening baru, kamu harus menyiapkan KTP, KK asli dan foto diri
- Click button Create Action
Create bot action command to trigger next state to be executed
In this section, the bot will send the "next" command whenever this state is executed. The “next” command will be caught later into an intent for executing another state to confirm end-users whether they want to restart and show the menu or end the conversation.
-
Click "+" in action box to create a new action
-
When all actions available are shown, then choose "Command"
-
Input action name "nextCommand"
-
Fill in Command field with:
next
- Click button Create Action
Objective: Show bot response after end-user choose "Daftar kartu kredit"
Create "kartuKreditState" state
-
Click "+" icon in the bottom right to create a new state
-
Fill in the state name with "kartuKreditText"
Create bot response
-
Click "+" in action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "kartuKreditText"
-
Fill in Message field with:
Untuk mendaftar kartu kredit baru, kamu harus menyiapkan KTP, KK asli dan foto diri
- Click the button Create Action
Create bot action command to trigger next state to be executed
In this section, the bot will send the "next" command whenever this state is executed. The “next” command will be caught later into an intent for executing another state to confirm end-users whether they want to restart and show the menu or end the conversation. We already created this action in the previous step, so we will choose from available actions.
-
Click button Add action to add more action
-
In "Action name" dropdown, search “nextCommand” actions
-
Click "nextComman" action
-
Then, click Create Action button
-
Click Create to finalize the state
Objective: Connect FAQ menu response to quick reply options
Create transition to connect from faqState to rekeningBaruState
-
Pull transition line which starts from "faqState" to “rekeningBaruState”
-
Fill in the Condition field:
content == "Daftar rekening baru"
- Click Save
Create transition to connect from faqState to kartuKreditState
-
Pull transition line which starts from "faqState" to “kartuKreditState”
-
Fill in the Condition field:
content == "Daftar kartu kredit"
- Click Save
Create Generic Template (Carousel)
In this step, we will create bot responses named generic template. Learn more about Generic Template for Instagram Messaging.
Objective: Show bot response of generic template ("carousel") to end-users
Create carousel
-
Click "+" icon in the bottom right to create a new state
-
Fill in the state name with "carouselState"
Create bot response for the first carousel: Buy 1 Get 1
-
Click "+" in the action box to create a new action
-
When all actions available are shown, then choose "Carousel"
-
Input action name "carousel"
-
Next, click the Add Carousel button and fill in with the following fields:
Title: Buy 1 Get 1
Text: Gratis 1 pancake di Kafe ABC
Thumbnail image URL: https://images.unsplash.com/photo-1630370939015-408e783fb273?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1yZWxhdGVkfDF8fHxlbnwwfHx8fA%3D%3D&auto=format&fit=crop&w=900&q=60.jpg
- Click the Add action button. The first action will trigger another state to execute. Fill in with the following fields:
Label: B1G1
Postback
Payload
Key: carousel
Value: b1g1
- Then click the Add action button again to create another action. The second action will redirect to the open link. Fill in with the following fields:
Label: Lihat detail
URL
https://docs.kata.ai
Create bot response for the second carousel: Diskon 10%
- Next, click the Add Carousel button and fill in with the following fields:
Title: Diskon 10%
Text: Dapatkan di Mart ABC
Thumbnail image URL: https://images.unsplash.com/photo-1515706886582-54c73c5eaf41?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTR8fHNob3B8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=900&q=60.jpg
- Click the Add action button. The first action will trigger another state to execute. Fill in with the following fields:
Label: Diskon
Postback
Payload
Key: carousel
Value: diskon
- Then click the Add action button again to create another action. The second action will redirect to the open link. Fill in with the following fields:
Label: Lihat detail
URL
https://docs.kata.ai
-
Click Create Action
-
To finalize the state creation, click Create in the state drawer
Set the state into self-transition
The self-transition will make the actions under state will be repeatedly shown if end-users give an incorrect answer
-
Go to tab Transitions
-
Turn on on the Self Transition toggle
-
Then, click Create to finalize the state
Objective: Connect all greetings states to carouselState
Connect greetings via direct message to carousel state
-
Pull transition line which starts from "greetingState" to “carouselState”
-
Fill in the Condition field:
content == "2"
- Click Create
Connect greetings via Instagram story mention to carousel state
-
Pull transition line which start from "igMentionedState" to “carouselState”
-
Fill in the Condition field:
content == "2"
- Click Create
Connect greetings via Instagram story reply to carousel state
-
Pull transition line which start from "igStoryReplyState" to “carouselState”
-
Fill in the Condition field:
content == "2"
- Click Create
Objective: Show bot response after end-users choose "Buy 1 Get 1"
Create "b1g1State" state
-
Click "+" icon in the bottom right to create a new state
-
Fill in the state name with "b1g1State"
Create bot response
-
Click "+" in the action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "b1g1Text"
-
Fill in Text Response field with:
Kamu telah memilih promo "Buy 1 Get 1" dari Bank ABC. Silahkan mengunjungi Kafe ABC terdekat Anda dan tunjukkan pesan ini 😊
- Click button Create Action
Create bot action command to trigger next state to be executed
In this section, the bot will send the "next" command whenever this state is executed. The “next” command will be caught later into an intent for executing another state to confirm end-users whether they want to restart and show the menu or end the conversation. We already created this action in the previous step, so we will choose from available actions.
-
Click button Add action to add more action
-
In the "Action name" dropdown, search “nextCommand” actions
-
Click "nextCommand" action
-
Then, click Create Action button
Objective: Show bot response after end-users choose "Disc 10%"
Create "discState" state
-
Click "+" icon in the bottom right to create a new state
-
Fill in the state name with "discState"
Create bot response
-
Click "+" in action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "discText"
-
Fill in Text Response field with:
Kamu telah memilih promo "Diskon 10% di Mart ABC" dari Bank ABC. Silahkan mengunjungi Mart ABC terdekat Anda dan tunjukkan pesan ini 😊
- Click button Create Action
Create bot action command to trigger next state to be executed
In this section, the bot will send the "next" command whenever this state is executed. The “next” command will be caught later into an intent for executing another state to confirm end-users whether they want to restart and show the menu or end the conversation. We already created this action in the previous step, so we will choose from available actions.
-
Click button Add action to add more action
-
In the "Action name" dropdown, search “nextCommand” actions
-
Click "nextCommand" action
-
Then, click Create Action button
Objective: Connect carousel menu response to postback options
Create transition to connect from carouselState to b1g1State
-
Pull transition line which starts from "carouselState" to “b1g1State”
-
Fill in the Condition field:
content == "B1G1" || (intent == "carouselIntent" && payload.carousel == "b1g1")
- Click Save
Create transition to connect from faqState to kartuKreditState
-
Pull transition line which starts from "carouselState" to “discState”
-
Fill in the Condition field:
content == "Diskon" || (intent == "carouselIntent" && payload.carousel == "diskon")
- Click Save
Create Text Response
Objective: Show bot response in the text to end-users
Create text
-
Click "+" icon in the bottom right to create a new state
-
Fill in the state name with "locationState"
-
Click "+" in the action box to create a new action
-
When all actions available are shown, then choose "Text"
-
Input action name "locationText"
-
Next, click the Add Variant button and fill in with following fields:
Lokasi bank ABC terdapat di Jalan Haji Nawi, Jakarta Selatan. Lihat peta: https://goo.gl/maps/eD2BGC6ZL7JpgBnU6
- Click Create Action
Create bot action command to trigger next state to be executed
In this section, the bot will send the "next" command whenever this state is executed. The “next” command will be catched later into an intent for executing another state to confirm end-users whether they want to restart and show menu or end the conversation.
-
Click "+" in action box to create a new action
-
When all actions available are shown, then choose "Command"
-
Input action name "nextCommand"
-
Fill in Command field with:
next
-
Click button Create Action
-
Then, click Create to finalize the state
Objective: Connect all greetings states to locationState
Connect greetings via direct message to location state
-
Pull transition line which start from "greetingState" to “locationState”
-
Fill in the Condition field:
content == "3"
- Click Save
Connect greetings via Instagram story mention to carousel state
-
Pull transition line which start from "igMentionedState" to “locationState”
-
Fill in the Condition field:
content == "3"
- Click Save
Connect greetings via Instagram story reply to carousel state
-
Pull transition line which start from "igStoryReplyState" to “locationState”
-
Fill in the Condition field:
content == "3"
- Click Save
Create Handover to Human Agent Flow
Handover to human agent path is required to be implemented in Instagram Messaging and we will use Handover API template.
Objective: Create a flow that end-user can request handover to human agents by using Handover API
Create handover state
-
Click "+" icon in bottom right to create new state
-
Fill in the state name with "handover" and activate toggle “End state”
Create bot response to inform end-user that the handover request has been received and waiting for agents to reply
-
Click "+" in action box to create new action
-
When all actions available are shown, then choose "Text"
-
Input action name "waitForAgent"
-
Next, click the Add Variant button to fill in with this text:
Mohon menunggu, ya. Sedang kami hubungkan ke CS Bank ABC yang tersedia! 😊
- Click Create Action
Use Handover API to send handover request to Omnichat
-
Create another action by clicking "Add action"
-
Click "+" in action box to create new action
-
Fill in action name with "handover"
-
When all actions available are shown, then choose "API"
-
Choose Handover API
-
Click Create Action button
-
To finalize this step when creating a new state, click the Create button in the state drawer
Objective: Connect all greetings states to handoverState
Connect greetings via direct message to handover state
-
Pull transition line which start from "greetingState" to “handoverState”
-
Fill in the Condition field:
content == "4"
- Click Save
Connect greetings via Instagram story mention to handover state
-
Pull transition line which start from "igMentionedState" to “handoverState”
-
Fill in the Condition field:
content == "4"
- Click Save
Connect greetings via Instagram story reply to handover state
-
Pull transition line which start from "igStoryReplyState" to “handoverState”
-
Fill in the Condition field:
content == "4"
- Click Save
Create Confirmation State
Objective: Create a state that end-user will be asked to restart for showing all menu or end conversation
Create "confirmState"
-
Click "+" icon in bottom left to create new state
-
Fill in the state name with "confirmState"
-
Click "Add action", then click “+” to create new action
-
Choose Text, then fill in the action name with "confirmText".
-
Next, click the "Add Variant" button and input the following text:
Apakah ada yang ingin kamu tanyakan kembali? Pilih menu yang tersedia:\n\n1. Ketik "1" untuk melihat menu\n2. Ketik “2” untuk menyelesaikan pembicaraan
Set the state into self-transition
The self-transition will make the actions under state will be repeatedly shown if end-users give an incorrect answer
-
Go to tab Transitions
-
Turn on on the Self Transition toggle
-
Then, click Create to finalize the state
Objective: Create an intent to catch command for executing next state
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. The choice of "Intent type" is command, which means it will catch command only. On condition, it fills in with content with “next” which is a command that is sent from bot after executed responses such as quick replies, carousel, and text.
- Click Create to finalize
Objective: Connect all bot responses states to confirmState
Connect quick replies responses states to confirmation state
-
Pull transition line which starts from "rekeningBaruState" to “confirmState”
-
Fill in the Condition field:
intent == "nextIntent"
-
Click Save
-
Next, pull transition line which starts from "kartuKreditState" to “confirmState”
-
Fill in the Condition field:
intent == "nextIntent"
- Click Save
Connect carousel responses to confirmation state
-
Pull transition line which starts from "b1g1State" to “confirmState”
-
Fill in the Condition field:
intent == "nextIntent"
-
Click Save
-
Next, pull transition line which start from "discState" to “confirmState”
-
Fill in the Condition field:
intent == "nextIntent"
- Click Save
Connect "locationState" to “confirmState”
-
Pull transition line which start from "locationState" to “confirmState”
-
Fill in the Condition field:
intent == "nextIntent"
- Click Save
Objective: Create state to restart menu
Create a "backToMenu" state to restart menu
-
Click "+" icon in bottom left to create a new state
-
Fill in the state name with "backToMenu"
-
Turn on toggle End State
-
Click "Add action", then click “+” to create a new action
-
Choose Command, then fill in the action name with "backToMenu".
-
Next, fill in the Command with:
toMenu
- Click Create to finalize
Create "toMenuIntent" intent
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. This intent will trigger show main menu as bot response
- Then, click Create.
Update transition condition from "init" to “greetingsState”
In this step, we will update transition condition and use toMenuIntent as one of the conditions. It is because this intent, if executed, will trigger a greeting response and showing the menu in bot.
-
Click transition between "init" and “greetingState”
-
Edit drawer will be shown
-
Update condition field into this
intent == "greetingsIntent" || intent == "toMenuIntent"
- Click Save to update
Objective: Create state to end conversation
Create a "bye" state to end conversation and show thank you response
-
Click "+" icon in bottom left to create a new state
-
Fill in the state name with "bye"
-
Turn on toggle End State
-
Click "Add action", then click “+” to create a new action
-
Choose Text, then fill in the action name with "bye".
-
Click Add Variant button
-
Next, fill in the Text with:
Terima kasih sudah menghubungi Bank ABC 😊
- Click Create to finalize
Objective: Connect transition between confirmState to backToMenu and bye state
-
Pull transition line which starts from "confirmState" to “backToMenu”
-
Fill in the Condition field:
content == "1"
-
Click Save
-
Next, pull transition line which start from "confirmState" to “bye”
-
Fill in the Condition field:
content == "2"
- Click Save
Create Fallback Intent
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. We set up the intent into "As Fallback", which means the intent will be executed as fallback. It becomes a new layer of fallback in Handover flow, before literally fallback-ed to fallback flow.
- Click Create to finalize
Finalize Your New Bot
Objective: Publish your bot to save the chatbot flow
-
Click on the "Publish" button which is placed on top right corner
-
Fill in the changelog. You can input "Initial version" in the changelog
-
Click Publish to save the changelog. Lastly, your final chatbot flow will be like this:
Objective: Testing your bot in emulator
-
On the bottom of your right screen, there is a small button named "Test Chatbot". Click the button to start.
-
You can try to test your bot by inputting a message in the text bot. Say "hi" to your bot. If it succeeds, your bot will reply as follows
- If you want to restart the session, click refresh icon which is placed at the bottom
Objective: Deploy your bot
Create new deployment
-
Go to the "Deploy" menu in the left sidebar
-
On this page, click on the "New Deployment" button which is placed in the top right corner. If you successfully clicked, it will show a create deployment drawer
-
Choose any deployment version you want to deploy and fill in the changelog. Or you can simply follow this screenshot
- Click Submit to finish the deployment
Create a new environment as prerequisites to deploy the bot to channel
- Go to the Environment menu which is placed under the current menu ("Overview"). If you successfully entered the Environment menu, you will see a page like this. These 3 environments represent that your chatbot will be tested in development or staging first before go live as in Production stage.
-
Click the Create Environment button in the Development environment and you will see a drawer to create a new environment
-
Choose the development version you want to (in this tutorial we will use the 1.0.0 version)
-
Fill in the environment URL. This environment URL will be useful if you use our CMS feature, learn more about CMS.
-
Click Create to finalize
-
You will notice the button is changed into the Create Channel button.
In this step, you will need an Omnichat https://omnichat.kata.ai account and an Omnichat inbox to deploy the bot. Let’s get started!
Create Inbox in Omnichat
Follow these tutorials in Omnichat to continue:
-
Register a new Omnichat account in Omnichat. Learn more about how to register account in Omnichat
-
Create a new channel inbox. Learn more about create inbox in Omnichat
-
For IGDM chatbot: Section How to Set Up > Connect to Instagram Messaging
-
For WA chatbot: Section How to Set Up > Connect to Whatsapp Messaging
-
Create Agent Bot in Omnichat
Follow the tutorial in Omnichat to continue. Continue to create agent bot.
Connect Bot to Omnichat
- If you succeed to follow the above tutorials, you will see an access token generated in Omnichat that needs to be pasted into the Platform. The screenshot below
-
Next, open the Kata Platform URL https://platform.kata.ai and do login
-
Click your project that already had a chatbot and deployed
-
Then, go to the menu: Deploy > Environment. You will see this screen.
-
Click "+" Create Channel” button in channel table list and drawer to set up the channel will be shown
-
Choose Omnichat in Channel Type
-
In the Access Token field, paste your access token that was generated from the Omnichat inbox.
-
Click Save to deploy your bot
-
Few steps to the final ✨ A created channel will generate a webhook URL. Copy the webhook URL in the Platform to Omnichat.
Finalize Agent Bot in Omnichat
-
Go back to Omnichat https://omnichat.kata.ai and do login
-
Go to menu: Settings > Integrations > Agent Bot. You will see this screen and information that you’re still in the first step to finalize
-
Click "Edit" button in the agent bot configuration
-
A drawer will appear to fill in the Platform webhook URL. Paste your chatbot webhook URL
-
Click Update and you will be redirected to agent bot list
-
Lastly, turn on the toggle in Activate Agent Bot. Your chatbot is already connected to the Omnichat inbox and ready to use!
Update Instagram Bot to Use Ice Breaker
Ice Breaker is useful for first-time users can understand the available menu or topics in your Instagram bot. To use Ice Breaker, we need to create an Instagram inbox as a prerequisite. Learn more about Ice Breaker.
Also, you need to successfully finish the Instagram bot until connect to agent bot Omnichat. Go back to the first step.
Before we jump to the tutorial, here is the general conversation flow for using Ice Breaker.
Scenario Flow | Details | Component Details |
---|---|---|
First time end-users chat the brand's Instagram DM, then it will show Ice Breaker. Learn more about Ice Breaker. It will not show when using Instagram Story Mention or Instagram Story Reply. | Show ice breaker FAQ Promo | - |
Objective: Create Ice Breaker in your Instagram inbox
Follow the tutorial on how to set up Ice Breaker in Instagram Inbox.
Objective: Create intent to trigger bot response if end-users click all Ice Breaker
Create intent for FAQ menu
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. This intent will trigger the FAQ state to show FAQ response when end-user click "FAQ" in Ice Breaker feature
- Then, click Create.
Create intent for Promo menu
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. This intent will trigger the promo state to show promo response when end-user click "Promo" in Ice Breaker feature
- Then, click Create.
Create intent for "Lokasi" menu
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. This intent will trigger the location state to show location response when end-user click "Lokasi`" in Ice Breaker feature
- Then, click Create.
Create intent for "Berbicara dengan CS" menu
-
Click the Intent tab which is placed next to the Conversation Flows sidebar.
-
Click Create Intent button
-
Fill in the intent as follows. This intent will trigger the handover state to handover end-user to human agent when end-user click "Berbicara dengan CS" in Ice Breaker feature
- Then, click Create.
Objective: Create transition for mapping bot responses after end-users clicked the Ice Breaker
Connect "init" to “faqState” to trigger FAQ response after end-users clicked “FAQ” in Ice Breaker
-
Pull transition line from "init" to “faqState”.
-
Create transition drawer will show.
-
Fill in condition as follow:
intent == "faqIceBreaker"
- Click Create
Connect "init" to “carouselState” to trigger generic template (“carousel”) response after end-users clicked “Promo” in Ice Breaker
-
Pull transition line from "init" to “carouselState”.
-
Create transition drawer will show.
-
Fill in condition as follow:
intent == "promoIceBreaker"
- Click Create
Connect "init" to “carouselState” to trigger text response after end-users clicked “Lokasi” in Ice Breaker
-
Pull transition line from "init" to “locationState”.
-
Create transition drawer will show.
-
Fill in condition as follow:
intent == "locationIceBreaker"
- Click Create
Connect "init" to “handoverState” to trigger handover to human agents after end-users clicked “Berbicara dengan CS” in Ice Breaker
-
Pull transition line from "init" to “handoverState”.
-
Create transition drawer will show.
-
Fill in condition as follow:
intent == "csIceBreaker"
- Click Create
Objective: Publish updated bot and deploy to Omnichat again
Follow the tutorial to finalize your bot.