Developer Docs | Kommunicate

Developer Docs | Kommunicate

  • Docs

›React Native

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

Conversation

Launching chat screen

You can open the chat screen by calling the below function:

RNKommunicateChat.openConversation((response, message) => {
        if(response == 'Error') {
          console.log(message);
        } else {
          //chat screen launched successfully
        }
      });

Launching individual chat thread

You can open an individual chat thread by calling the below function and passing the clientChannelKey the clientChannelKey is which you got from the buildConversation method "Success" response message object.

let clientChannelKey = "clientChannelKey" //pass the clientChannelKey here
let takeOrder = true //skip chat screen on back press, pass false if you want to show chat screen on back press
      
RNKommunicateChat.openParticularConversation(clientChannelKey, takeOrder, (response, responseMessage) => {
        if(response == 'Error') {
          console.log(message);
        } else {
          //conversation launched successfully
        }
      });

Starting a new Conversation

You can start a new conversation by using the below function:

 let conversationObject = {
      'isSingleConversation' : false //passing false will start the same conversation everytime
     };

  RNKommunicateChat.buildConversation(conversationObject, (response, responseMessage) => {
        if(response == "Success") {
            console.log("Kommunicate create conversation successful the clientChannelKey is : " + responseMessage);
        } else {
            console.log("Kommunicate create conversation failed : " + responseMessage);
        }
      });   

If you have the list of agentIds and botIds, you can pass it in the below conversation object for create the conversation use the below method:

 var conversationObject = {
      'isSingleConversation' : false,
      'agentIds':['<AGENT_ID>'],  //List of agentIds. AGENT_ID is the emailID used to signup on Kommunicate
      'botIds': ['<BOT_ID>']  //List of botIds. Go to Manage Bots(https://dashboard.kommunicate.io/bots/manage-bots) -> Copy botID
       };
       
 RNKommunicateChat.buildConversation(conversationObject, (response, responseMessage) => {
        if(response == "Success") {
            console.log("Kommunicate create conversation successful the clientChannelKey is : " + responseMessage);
        } else {
            console.log("Kommunicate create conversation failed : " + responseMessage);
        }
      });  

Starting a Unique Conversation

You can create a unique conversation using the below method. A unique conversation is identified by the list of agentIds and botIds used to create the conversation. If the same set of Ids are passed to the below method, then the already created conversation would be returned instead of creating a new conversation:

 var conversationObject = {
      'agentIds':['<AGENT_ID>'],  //List of agentIds. AGENT_ID is the emailID used to signup on Kommunicate
      'botIds': ['<BOT_ID>']  //List of botIds. Go to Manage Bots(https://dashboard.kommunicate.io/bots/manage-bots) -> Copy botID
       };

 RNKommunicateChat.buildConversation(conversationObject, (response, responseMessage) => {
        if(response == "Success") {
            console.log("Kommunicate create conversation successful the clientChannelKey is : " + responseMessage);
        } else {
            console.log("Kommunicate create conversation failed : " + responseMessage);
        }
      });  

Note: Refer this if you want to use other paramters for creating the converstion, like metadata etc

Rich Message

Rich message provide a better overall conversational experience to the users, make the interface look pretty, they also drive more actions from your users and provide a good conversational experience. There are a variety of response types to choose from. For example, you can show images, play videos, provide buttons, list, forms, or card carousels.

Refer the following link to use rich messages in Kommunicate.

  • Rich Messages
← Push NotificationCustomization →
  • Launching chat screen
  • Launching individual chat thread
  • Starting a new Conversation
  • Starting a Unique Conversation
  • Rich Message
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.