Versions Compared

Key

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

...

Code Block
<html>
    <head>
    <title>Bot Plugin test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    </head>
    <body>
        <div id="orbitabot"
        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 = 'menu-icon'
        data-orbita-bot-icon = 'chat-icon'
        data-orbita-bot-close = 'menu'
        data-orbita-custom-data = '{"chooseFlow": ""}'
        data-orbita-bot-Settings='{"elementId": "orbitabot", "template": "default"}'></div>
        <script src="/chatbot/v3/chat.js"></script>
    </body>
</html>

...

Flow Studio Control’s Directives

Experience Designer’s Directives

Choose many option

Autocomplete -- client side

Choose many option with none of the above

Autocomplete -- server side

Choose one option

Bootstrap carousel

Yes/No options

Bootstrap carousel with filter options

Single input control with texbox input type - hidden

Cardlist

Single input control with texbox input type -- single line

Cardlist with filter options

Single input control with texbox input type -- multi line

Html5 - Added properties (id, html, element)

Single input control with input type Date

Adaptive card

Single input control with input type DateTime

Card component (Single & Multi card)

Single input control with input type time

Single input control with input type email

Single input control with input type phone number

Rating control

Single input control using input type Text box with Hidden Input directive

...

The hook function in Bot v3 allows us to publish messages to the chatbot dynamically from outside the Bot. The hook function's available keys are detailed below.

Key

Snippet Syntax

Description

Sample

send_message

OrbitaChatBotV3.hook('send_Message', {value}, {payload})

This is used to send information to the Bot. The value passed is treated as both the value and data. The payload value is of type object string and value payload is of type string object

Sample: Passing user utterance to the Bot from the page in button click action/ page redirection.

OrbitaChatBotV3.hook("send_message", command);
Or
OrbitaChatBotV3.hook("send_message", '', command);

send_advancedMessage

OrbitaChatBotV3.hook('send_advancedMessage', {value}, {payload}, {data})

This is used to send information to the Bot.

data value is of type object string, value payload is of type string object, payload data is of type object

Sample: Passing a user friendly utterance to the Bot for display but also send complex data to the backend for business logic handling.

OrbitaChatBotV3.hook('send_advancedMessage', "",
{eventName: "Submit_Details"},
{name: 'PatientName', id: 1100 }
);

connect

OrbitaChatBotV3.hook('connect','', {payload})

This re-establishes a socket connection. Send the payload object as it is required (it can also be empty here).

OrbitaChatBotV3.hook('connect','', payload);
Or
OrbitaChatBotV3.hook('connect');

triggerEvent

OrbitaChatBotV3.hook('triggerEvent', '', {payload})

This allows to trigger an Event. The Event name is passed inside the payload object.

OrbitaChatBotV3.hook('triggerEvent', "",
{eventName: "Schedule_Appointment" }
);

disconnect

OrbitaChatBotV3.hook('disconnect','', {payload})

The socket connection will be disconnected. Send the payload object as it is required (it can also be empty here).

OrbitaChatBotV3.hook('disconnect','', payload);
Or
OrbitaChatBotV3.hook('disconnect');