Integrate your bot with Kommunicate
Note: This section of our docs is not up to date. Please visit updated docs page.
Overview
Kommunicate has the provision to integrate any third-party (Dialogflow, Microsoft Bot Framework, IBM Watson etc) or custom-made bots in the website. You can deploy your bots to automate the repeated tasks and reduce the workload on your human agents. Bots can handle all the incoming conversations and when unable to answer, they can assign conversion to humans. In this section, learn how to:
- Integrate with any bot platform
- Assign all conversation to the bot
- Assign conversation to bot based on certain events
- Handoff the conversation to human if bot is not able to answer
Integrate with any bot platform
Kommunicate has the built in support for some bot platforms like Dialogflow and provides integration with other bot platforms by custom bot integration. Here is the list of supported platforms(we will add more platforms in due course) and the detailed instructions for integration:
Amazon Lex (coming soon)
Microsoft Bot Framework (coming soon)
Once you have integrated the bot you can let it handle all the incoming conversations. You can design your bot to collect the required detail and handoff the conversation to a human agent if its not able to answer.
Assign all the new conversations to the bot by default
Once you have integrated a bot, you need to enable the conversation rules for the bots.
Go to Kommunicate Dashboard -> Settings -> Conversation rules and enable "Assign new conversations to bot" and select the bot from drop down list.
Once this is done, all new incoming conversations will be assigned to the selected bot. You can test it out by starting a new conversation from your website and see how your bot reply. You can always design your bot to handoff the conversation to human agents if it's not able to answer.
Assign conversations to specific bots based on the webpage
If you wish to assign conversations to specific bots based on which webpage the conversation is started from, pass a botId in botIds
array in the installation script in webpages where the specific bot need to be the default bot to handle incoming conversations.
...
var kommunicateSettings = {"appId": < APP_ID >,"agentId":<AGENT_ID>,"botIds": [<BOT_ID>],"conversationTitle":<CONVERSATION_TITLE>,"onInit":<CALLBACK_FUNCTION>};
...
Assign conversations to specific bots based on certain events
You can start group conversations with bot using startConversation(conversationDetail, callback)
.
var conversationDetail = {
agentId: <AGENT_ID>, // optinal, if you dont pass agent Id, default agent will automatically get selected.
botIds: [<BOT_ID>], // array of bot Ids
assignee: <ASSIGNEE>// agent/bot's id who you want to assigne the conversation. if nothing is passed, conversation will be assigned to default agent.
};
Kommunicate.startConversation(conversationDetail, function (response) {
console.log("new conversation created");
});
Handoff the conversation to human if bot is not able to answer
Bot to human handoff comes in handy when the bot is unable to answer the customer or is unable to understand what the customer is saying. There are multiple ways of achieving this and it depends on the bot platform. Detailed instructions can be found here for dialogflow and custom bots.
Use Rich messages to make conversations interactive
Your bot can be designed to send rich text messages to make conversations more interactive and useful. Here is a list of rich text messages supported by Kommunicate.
When setting an intent response in Dialogflow console, click on Add Response under DEFAULT
tab and choose Custom Payload. Set below JSON as the response of the intent.
{
"platform": "kommunicate",
"metadata": {
// valid JSON for any type of Kommunicate's Actionable message.
}
}
Pass any kind of Kommunicate supported Rich Messages
Example: Sample JSON for Suggested Replies
{
"platform": "kommunicate",
"metadata": {
"contentType": "300",
"templateId": "6",
"payload": [{
"title": "Yes",
"message": "Cool! send me more."
}, {
"title": "No ",
"message": "Don't send it to me again"
}]
}
}