Developer Docs | Kommunicate

Developer Docs | Kommunicate

  • Docs

›Bots

Web

  • Installation
  • CMS Installation
  • Authentication
  • Conversation
  • Conversation Assignment
  • Customization
  • Localization
  • Logout
  • Troubleshooting

Android

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout

iOS

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout
  • Troubleshooting

React Native

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Logout

Flutter

  • Installation
  • Authentication
  • Customization
  • Conversation
  • Push Notification

Ionic/Cordova/Phonegap

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout
  • Resolving Errors

Rich Messages

  • How To Use
  • Types of Rich Messages

Bots

  • Bot setup
  • Dialogflow Integration
  • Lex Integration
  • Kompose Bot Builder
  • Custom Bot Integration
  • Import Kompose Bot
  • Bot Samples

Integrations

  • Zapier

Platform APIs

  • Authentication
  • Endpoints

Dashboard Features

  • Analytics

Configuration

  • Email Fallback
  • Webhooks
  • Access Token URL

Kompose GUI Bot Builder

Overview

Kompose is a GUI bot builder based on natural language conversations for Human-Computer interaction. You don’t need any coding skills to master Kompose. It has a simple, intuitive, and easy-to-use interface.

Bot Integration with the Kompose

  • Login to your Kommunicate dashboard.
  • Navigate to the Bot Integration section >> Select Kompose >> Setup Bot

Kompose Bot Builder

Tutorial Blog: Create a chatbot using Kompose bot builder

Video tutorial: Create a chatbot using Kompose bot builder in 5 minutes

Bot to Human handoff in Kompose

Bot to human handoff is useful when the bot is unable to answer the customer question or is unable to understand what the customer is saying and if the user needs to talk to a human agent directly.

1. Fallback Intent:

  • In Kompose, there's an intent "Unknown User Input". In this intent, you have to setup fallback message when bot is not able to answer. You have to set the bot message that should be shown to user, if it's unable to answer. Also, you can assign to human agent with the custom payload. When none of the intents are matched, the fallback intent is triggered, the bot response associated with it is shown to the user.

Kompose-Bot-to-Human

2. To assign a conversation to a specific support agent:

  • Add the JSON code below (as a custom payload) to the bot response of the Intent. Specify the agent's email ID (same email ID which an agent uses to log into the Kommunicate dashboard) in KM_ASSIGN_TO parameter. If KM_ASSIGN_TO parameter is left empty, the conversation routing rules will be applied and the conversation will be assigned to a human agent based on the routing rules.
{
  "platform": "kommunicate",
  "message": "our agents will get back to you", 
  "metadata": {
    "KM_ASSIGN_TO": ""  
  }
}

Set "KM_ASSIGN_TO": "<AGENT'S USER_ID>" if you want to assign the conversation to specific agent.

Kompose-Bot-to-Human

Disable Small Talk option in Kompose

  • Login to your Kommunicate dashboard.
  • Navigate to the Bot Integration section >> Select Kompose >> Select Bot >> Click Setting ⚙️ >> Disable Small Talk

Kompose Bot Builder

Webhooks in Kompose

Webhook feature in Kompose allows you to send responses to your user from your own custom webhook server. This is helpful when you need to return some data from your data base or need to send some responses based on your own custom logic.

Integrating your webhook with Kompose

  1. Navigate to the Bot Integration section >> Select Kompose >> Select Bot >> Click Setting ⚙️ >> Webhook

  2. This section will ask you a webhook URL and request header for the webhook. Webhook URL is required at your backend server so that messages sent to bot can be forwarded to your server. You can use same webhook for multiple bots or can configure different webhook. Kommunicate will send the data to your webhook in below format:

{
    "botId": "bot id who has received the message. This id is same as shown in dashboard.",
    "key": "unique id for every message",
    "from": "user id who has sent the message",
  "message": "message sent by user to the bot",
  "nlpResponse": [ { "message": "Greetings!" } ],
  "matchedIntent":"greetings.hello",
    "groupId": "conversation id",
    "metadata": "extra information with message",
    "contentType": "content type of the message (text, html, location, etc)",
    "applicationKey": "your APP_ID shown in Dashboard Install section",
        "source": "identifies if message is sent from web or mobile",
    "eventName": "events ie. WELCOME , KOMMUNICATE_MEDIA_EVENT etc",
    "createdAt": "message sent time"
}
  1. Kompose sends the message to your webhook and waits for the response. The timeout limit for the webhook URL is set to the 30 seconds. Your webhook should return the array of message in response in below format:
[{
    "message": "A message can be simple as a plain text" 
}, {
    "message": "A message can be a rich message containing metadata",
    "metadata": {
    "contentType": "300",
        "templateId": "6",
        "payload": [{
            "title": "Suggested Reply button 1",
            "message": "Suggested Reply button 1",
        }, {
            "title": "Suggested Reply button 2",
            "message": "Suggested Reply button 2" 
        }]
    }
}]

Each object in message array is rendered as separate message in Kommunicate chat widget.

Welcome message from bots

Kommunicate sends some specific events to your webhook in eventName property. When a user creates a new conversation Kommunicate sends eventName: WELCOME to your webhook. You can check for this property in payload and reply with a welcome message.

Skip bot welcome message

Skip the 'WELCOME' event from dialogflow by setting

 "skipBotEvent":'["WELCOME_EVENT"]'

Skip bot welcome message through Settings

var defaultSettings = {
    "skipBotEvent": '["WELCOME_EVENT"]',
};
Kommunicate.updateSettings(defaultSettings);

Skip bot welcome message for a specific conversation

var conversationDetail = {
    "skipBotEvent":'["WELCOME_EVENT"]'
};
            
Kommunicate.startConversation(conversationDetail, function (response) { });      

Send attachments to bot

When a user attaches a file or shares location, Kommunicate sends eventName: KOMMUNICATE_MEDIA_EVENT to your bot along with the attached file information. You can find the file information in KM_CHAT_CONTEXT object in metadata. Below is the sample of webhook payload with attachment detail:

This is sample JSON for file attachment:

{
    "eventName": "KOMMUNICATE_MEDIA_EVENT",
    "metadata": {
        "KM_CHAT_CONTEXT": {
            "attachments": [{
                "type": "image/png", // media type (in form of type/subtype) . Use the regex 'type/*' to get the generic type
                "payload": {
                    "name": "file name",
                    "url": "file url",
                    "size": "size in bytes"
                }
            }]
        }
    },
    "createdAt": 1552638706610,
    
}

Attachment object for location message

{
    "attachments": [{
        "payload": {
            "lat": "Latitude",
            "lon": "Longitude"
        },
        "type": "location"
    }]
}
← Lex IntegrationCustom Bot Integration →
  • Overview
  • Bot Integration with the Kompose
  • Bot to Human handoff in Kompose
    • 1. Fallback Intent:
    • 2. To assign a conversation to a specific support agent:
  • Disable Small Talk option in Kompose
  • Webhooks in Kompose
    • Integrating your webhook with Kompose
    • Welcome message from bots
    • Skip bot welcome message
    • Send attachments to bot
Facebook Open Source

710 East Wing Street,
Arlington Heights, IL 60004,

(+1) (310) 909-7458
hello@kommunicate.io

Docs
WebAndroidiOSIonic/PhonegapReact NativeFlutter
Product
Pricing and FAQsRequest Demo
Social
FacebookTwitterLinkedin
Copyright © 2021 Kommunicate.io.