Integrate your AI agent 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 AI Agent Framework, IBM Watson etc) or custom-made AI agents in the website. You can deploy your AI agents to automate the repeated tasks and reduce the workload on your human agents. AI Agents 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 AI agent platform
- Assign all conversation to the AI agent
- Assign conversation to AI agent based on certain events
- Handoff the conversation to human if AI agent is not able to answer
Integrate with any AI agent platform
Kommunicate has the built in support for some AI agent platforms like Dialogflow and provides integration with other AI agent platforms by custom AI agent 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 AI Agent Framework (coming soon)
Once you have integrated the AI agent you can let it handle all the incoming conversations. You can design your AI agent 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 AI agent by default
Once you have integrated an AI agent, you need to enable the conversation rules for the AI agents.
Go to Kommunicate Dashboard -> Settings -> Conversation rules and enable "Assign new conversations to AI agent" and select the AI agent from drop down list.
Once this is done, all new incoming conversations will be assigned to the selected AI agent. You can test it out by starting a new conversation from your website and see how your AI agent reply. You can always design your AI agent to handoff the conversation to human agents if it's not able to answer.
Assign conversations to specific AI agents based on the webpage
If you wish to assign conversations to specific AI agents based on which webpage the conversation is started from, pass a botId in botIds array in the installation script in webpages where the specific AI agent need to be the default AI agent 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 AI agents based on certain events
You can start group conversations with AI agent 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 AI agent is not able to answer
AI Agent to human handoff comes in handy when the AI agent 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 AI agent platform. Detailed instructions can be found here for dialogflow and custom AI agents.
Use Rich messages to make conversations interactive
Your AI agent 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"
}]
}
}