Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Coming from version 2 of the bot

Bot In Node

  • The Bot In node listens to any pushes from the connected clients. Technically, receives socket events from the webpage.

    Image Modified

Bot Out Node

  • Emits a message to the specified client connected (SocketID). Technically, sends socket events to the webpage.

    Image Modified

Connected Bots

  • The Connected Bots node will return an array of all connected clients (socket IDs) at the project level.

    Image Modified

No iframes

  • The Chatbot V3 is not dependent on an iframe to integrate the chatbot into a webpage.

Template node

  • The required fields in this node are projectId, serverUrl.

  • The botSettings property helps in selecting the v3 chatbot setting.

botSettings: { elementId: 'orbitabot', template: 'default' }

  • The property template inside the botSettings object will determine which Bot setting the user wants to connect for the Bot (from the Experience manager Develop > Chatbot Settings). If this property is not populated, the Default bot setting will be used.

  • The elementId by default is 'orbitabot'. This determines where to inject the template created in the Bot settings. If the elementId is not mentioned, the default values will be injected.

For users who do not use the botSettings functionalities,

  • Add botSettings: false in the template node code

  • Set botContainerId: 'bot-v3' in the template node code

If the user wants to use the botSettings functionality

  • they must change the below properties to these values,

    Code Block
    botContainerId: 'chatWindow'
    botSettings: {elementId: 'orbitabot',template: 'default'} //optional
  • Comment out the below function in the old code, (this is deprecated)

    Code Block
    OrbitaBotPlugins.BotPlugin.init({
                botId:'bot-v3',
                width: '300px',
                height: '600px',
            });

  • isCustomUi property is removed. All the element Id properties are made optional. If not specified, default values will be set.

Sample template:

Code Block
<html>
<head>
    <title>Orbita Bot Test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
    <script src="/chatbot/v3/chat.js"></script>
    <script>
        OrbitaChatBotV3.init({
            projectId: '{{projectId}}',
            serverUrl: '{{req.headers.x-forwarded-proto}}://{{req.headers.host}}',
            botContainerId: 'chatWindow',
            botContentId: 'messages',
            botInputMessageId: 'input',
            botSendButtonId: 'orbita-send-button',
            botMicId: 'chatMic',
            botSpeakerId: 'un-mute',
            botMenuId: 'chatMenu',
            botIcon: 'chat-icon',
            botClose: 'menu',
            customData: {
                chooseFlow: ""
            },
            botSettings: {    
                elementId: 'orbitabot',
                template: 'default'  
            }
        });
    </script>
</body>
</html>

Sample with attributes:

Code Block
<html>
    <head>
        <title>Bot Plugin test</title>
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div 
        data-orbita-init='chatbot' 
        data-orbita-project-id='{{projectId}}'
        data-orbita-server-url='{{req.headers.x-forwarded-proto}}://{{req.headers.host}}'
        data-orbita-bot-container-id='chatWindow'
        data-orbita-bot-content-id='messages'
        data-orbita-bot-input-message-id = 'input'
        data-orbita-bot-send-button-id = 'orbita-send-button'
        data-orbita-bot-mic-id = 'chatMic'
        data-orbita-bot-speaker-id = 'un-mute'
        data-orbita-bot-menu-id = 'chatMenu'
        data-orbita-bot-icon = 'chat-icon'
        data-orbita-bot-close = 'menu'
        data-orbita-custom-data = '{"chooseFlow": "123"}'
        data-orbita-bot-Settings='{"template": "customui"}'></div> 
        <script src="/chatbot/v3/chat.js"></script>
    </body>
</html>

Whitelisting

To successfully launch Chatbot V3 from your environment, you have to whitelist the below domains. 3.2.26 Whitelisting

...