This website is no longer maintained. Please, visit documentation.indigitall.com to read our updated documentation.
EN |
ESquick integration guide
This article shows the minimum development that must be done to start using chat.
Our Chat is available through npm.
npm (Node Package Manager) it is a package management system. It consists of a command line client and an online database of public and private packages.
To import the Chat to your project, follow these steps:
$ cd /PATH/TO/YOUR/PROJECT
$ cordova plugin add indigitall-chat-cordova-plugin
Initialize the Chat with the indigitall.chat.init()method to start receiving push notifications. This initialization must be done within the index.html of your project. To verify that the integration has been carried out correctly, you will have two callbacks in the initialization, a success with the correct loading of the chat and another with the error if there is one.
window.plugins.indigitall.chat.init({
channelKey: "your_channel_key",
//opciones personalizables
externalCode:"your_external_code",
titleChat: "your_title_chat",
botName:"your_bot_name",
defaultUserName:"your_default_username",
messagePlaceholder:"your_message_place_holder",
openFileText:"your_open_file_text",
primaryColor:"your_primary_color",
backgroundChatColor:"your_background_chat_color",
backgroundBarColor:"your_background_bar_color",
fullscreen:"bool",
zIndex: "your_z_index",
defaultChatIconResource: 'your_chat-bubble',
logLevel: logLevel,
infoContactTopBarTitle: 'your_title_top_bar_info_contact',
welcomeLabel:
{
title: 'your_title_welcome_label',
body: 'your_body_welcome_label',
icon: 'icon_welcome_label',
backgrounColor: 'your_color_welcome_label',
textColor: 'your_text_color_welcome_label',
closeIcon: 'your_close_icon_welcome_label',
closeIconBackGroundColor: 'your_backgrounColor_close_icon_welcome_label',
delay: 'your_delay_to_show_welcome_label'
},
chatAutoOpenTime: "your-chat_auto_open_time_in_seconds"
},()=>{
//DO SOMETHING
}, (error)=>{
//DO SOMETHING
});
The following fields are custom. If they are not added, the Chat will show the default values.
You can check if the welcome event has been fired with this method:
let isEmitted = window.plugins.indigitall.chat.isWelcomeEmitted((isEmitted) => {
//success
}, (error)=> {
//Log error
});
If you want to send a message custom you can use this method:
window.plugins.indigitall.chat.setCustomEvent("Your_event", () => {
//success
}, (error)=> {
//Log error
});
You can also control the action of deleting messages with this method:
window.plugins.indigitall.chat.clearAllMessages(() => {
//success
}, (error)=> {
//Log error
});
Start automating your communications thanks to our administration API