Customization

We can add the following fields are custom. If they are not added, the Chat will show the default values.

<script src="../indigitall-web-chat.js"
 charset="utf-8" 
 onload=
 "WebChat.init({
    channelKey: your_channel_key,

    <!--custom data-->

    externalCode: 'your_external_code',
    titleChat: 'your_title_chat',
    botName: 'your_bot_name',
    defaultUsername: 'your_default_user_name',
    primaryColor: 'your_primaryColor',
    backgroundChatColor: 'your_background_chat_color',
    messagePlaceholder: 'your_message_place_holder',
    zIndex: your_z_index,
    openFileText: 'your_text_open_file'
    fullscreen: false,
    defaultChatIconResource: 'your_chat-bubble',
    logLevel: WebChat.LogLevel.your_level,
    infoContactTopBarTitle: 'your_title_top_bar_info_contact',
    welcomeLabel:
        {
            title: 'your_title_wellcome_label',
            body: 'your_body_wellcome_label',
            icon: 'icon_wellcome_label',
            backgrounColor: 'your_color_wellcome_label',
            textColor: 'your_text_color_wellcome_label',
            closeIcon: 'your_close_icon_wellcome_label',
            closeIconBackGroundColor: 'your_backgrounColor_close_icon_wellcome_label',
            delay: 'your_delay_to_show_wellcome_label',
            clearMessages: true,
            welcomeEvent: 'your_event'
        }
    })">
</script>
  • your_channel_key is an alphanumeric string that identifies your indigitall project.

The following fields are custom. If they are not added, the Chat will show the default values.

  • your_external_code is a string that identifies each device.
  • your_title_chat It is a string with the title that you want to be shown in the chat.
  • your_bot_name is a string with the name of the bot that will be displayed above the bubble on the left side.
  • your_default_user_name It is a string with the default name that the user will have and will be displayed above the user's bubble.
  • your_primary_color is a string with the main color of the chat, buttons and floating icon in hexadecimal or object color.
  • your_background_chat_color is a string with the chat background color in hexadecimal or object color.
  • your_message_place_holder It is a string with the message that is displayed in the text field where it must be written.
  • zIndex numeric indicator to position the chat on the z axis.
  • your_text_open_file It is a string with the text that will be displayed in the case a file has to be downloaded.
  • your_log_level indicates log you can see
  • your_title_top_bar_info_contact title top bar of contact view
  • wellcomeLabel show the wellcome label with the optional fields as json object.
  • clearMessages is a boolean that indicate if you want to delete or clear all messages from session storage every time you open the chat
  • welcomeEvent is a string to define the welcome message one time you open the chat

Functionalities

You can check if the welcome event has been fired with this method:

let isEmitted = indigitallChat.isWelcomeEmitted();

If you want to send a message custom you can use this method:

indigitallChat.setCustomEvent("Your_event");

You can also control the action of deleting messages with this method:

indigitallChat.clearAllMessages()