Developer Docs | Kommunicate

Developer Docs | Kommunicate

  • Docs

›Ionic/Cordova/Phonegap

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:

Cordova

If you are using native Cordova:

kommunicate.launchConversation((response) => {
          //conversation launched successfully
        }, (response) => {
         //conversation launch failed
        });

Ionic

If you are using the ionic framework:

this.kommunicate.launchConversation()
   .then((response : any) => { /*sucessfully launched*/ })
   .catch((error : any) => { 
     /*error occurred*/
     console.log(error);
    });

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 a new conversation method on success response.

let convObj = {
        'clientChannelKey' : clientChannelKey, //pass the clientChannelKey here
        'takeOrder' : true //skip chat list on back press, pass false if you want to show chat list on back press
      };

Cordova

If you are using native Cordova:

kommunicate.launchParticularConversation(convObj, function(response) {
        //Conversation launched successfully
      }, function(response) {
        //Conversation launch failed
      });

Ionic

If you are using the ionic framework:

this.kommunicate.launchParticularConversation(convObj)
   .then((response : any) => { /*conversation sucessfully launched*/ })
   .catch((error : any) => { /*error occurred*/ });

Starting a new Conversation

To start a new conversation first create a conversation object:

 let conversationObject = {
      'isSingleConversation' : false
     };

Then call the conversationBuilder function.

Cordova

If you are using native Cordova:

  kommunicate.conversationBuilder(conversationObject, (clientChannelKey) => {
     //The response will be a clientChannelKey which is used for launching a particular conversation.
     console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey);
    },(error) => {
      console.log("Kommunicate create conversation failed : " + error);
    });

Ionic

If you are using the ionic framework:

this.kommunicate.conversationBuilder(converationObject)
    .then((clientChannelKey: any) => console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey))
    .catch((error: any) => console.error("Error creating conversation." + error));

Creating conversation for specific bots

If you have the list of agentIds and botIds, you can pass it in the below conversation object.

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
      };

Then call the conversationBuilder function.

Cordova

If you are using native Cordova:

  kommunicate.conversationBuilder(conversationObject, (clientChannelKey) => {
     //The response will be a clientChannelKey which is used for launching a particular conversation.
     console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey);
    },(error) => {
      console.log("Kommunicate create conversation failed : " + error);
    });

Ionic

If you are using the ionic framework:

this.kommunicate.conversationBuilder(converationObject)
    .then((clientChannelKey: any) => console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey))
    .catch((error: any) => console.error("Error creating conversation." + error));

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
       };

Then call the conversationBuilder function.

Cordova

If you are using native Cordova:

  kommunicate.conversationBuilder(conversationObject, (clientChannelKey) => {
     //The response will be a clientChannelKey which is used for launching a particular conversation.
     console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey);
    },(error) => {
      console.log("Kommunicate create conversation failed : " + error);
    });

Ionic

If you are using the ionic framework:

this.kommunicate.conversationBuilder(converationObject)
    .then((clientChannelKey: any) => console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey))
    .catch((error: any) => console.error("Error creating conversation." + error));

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
    • Cordova
    • Ionic
  • Launching individual chat thread
    • Cordova
    • Ionic
  • Starting a new Conversation
    • Cordova
    • Ionic
  • Creating conversation for specific bots
    • Cordova
    • Ionic
  • Starting a Unique Conversation
    • Cordova
    • Ionic
  • 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.