2.6 App configuration for enabling chatbot

The below section details the process of app configuration for enabling chatbot to appear on OFSLL home page.
  1. Enabling BOT and adding parameters:
    • Channel ID
    • URI
    • Enabled – Yes / No
  2. Enable the FLS Access Key - FLL.CMN.UIX.TXNCHATBOT.BUTTON as indicated in the Access Setup screen.

    Figure 2-25 Enable the FLS Access Key



  3. Search for System parameter in the box below.
  4. Enter the Channel id, click save and return.
  5. Enter the URI , click save and return.
  6. Enable Transaction bot.

    Figure 2-29 Enable Transaction bot



    The below code needs to be implemented in the chatbot.js file as shown below:

    Figure 2-30 Code implementation



    Ensure that no changes are done to the following js code:

    function onLoginPageLoad(event) {
    var source = event.getSource();
    AdfCustomEvent.queue(source, "LoginChatbotEvent",
    {
    'someArg' : 'true'
    },
    true);
    }
    function onHomePageLoad(evt) {
    var eventSource = evt.getSource();
    AdfCustomEvent.queue(eventSource, "HomeChatbotEvent",
    {
    'someArg' : 'true'
    },
    true);
    }
    function initSdk(name, uri, channel) {
    var chatWidgetSettings = {
    initUserHiddenMessage : 'Hi', openChatOnLoad : false, URI : uri, channelId : channel,
    font: '12px "Helvetica Neue", Helvetica, Arial, sans-serif',
    locale: 'en-US',
    enableClearMessage: true,
    enableAutocomplete:false,
    setSize:('400px' ,'786px'),
    showConnectionStatus:true,
    showTypingIndicator:true,
    displayActionsAsPills:true,
    enableSpeech:true,
    enableAttachment:false,
    enableBotAudioResponse: true,
    skillVoices: [{
    lang: 'en-US',
    name: 'Samantha'
    }, {
    lang: 'en-US',
    name: 'Alex'
    }, {
    lang: 'en-UK'
    }]
    };
    if (!name) {
    name = 'Bots';
    }
    setTimeout(function () {
    const Bots = new WebSDK(chatWidgetSettings);// Initiate library with configuration
    Bots.connect()// Connect to server
    .then(function () {
    })
    window[name] = Bots;
    });
    }
  7. Web-sdk.js needs to be added from the << OFSLL Installed Directory >>/ /web_interface/ofsllbot/WebApp/scripts.
    The BOT after login is as shown below:

    On clicking bot icon, the interface is as displayed: