Skip to main content

KFirst

The KFirst dashlet is an integration of the USU Knowledge Management product KWidget aka KFirst. You can easily connect an existing USU Knowledge Center to the USU Portal and use tools like Knowledge Search, FAQ and Chatbot.

dashletsearch.png

You can assign a Chatbot or a KFirst widget to a portal page. Unlike the other dashlets, the KFirst dashlet can only be added via the the Page designer.

Important

Only one KFirst dashlet can be inserted per Portal Page.

In addition to the general attributes, you have the following configuration options:

Resource

Target

Add the target URL/path of the resource and define the request method.

Method

  • GET method retrieves data from the specified target

  • POST method creates/updates the specified target. The data sent to the target is stored in the Body attribute that is displayed after selecting the POST method.

Body Params/Body Edtior

Notice

The field is only available when the target method POST is selected.

  • Body Params

    Define a key and value.

    Click on Iconto add another key and value.

    Delete a key and value by clicking on the Icon.

  • Body Editor

    With the body editor you can create/edit the keys and values directly via JSON.

Chatbot authentication

Important

To make the USU Chatbot authentication work, configuration in all relevant systems is needed: USU Chatbot, USU Service Management and USU Portal.

  1. Login in private mode on your KFirst Manager application.

    e. g. https://your.server.url/kfirst-mananger

  2. Go to Widgets > Portal > Activity sets > mainpage

  3. Scroll down to the Activites section

  4. Click on the pencil icon to edit the relevant Bot.

  5. Open the Special Settings tab and add &sessionId=${KFIRST.config.sessionId} at the end of the Object URL

    e. g. https://your.server.url/kbot-widget/bots/vm/74jgcMhl-InYfsSieo1Ls4vVdxOqFhCjrjggoLQN-Q=/bot.html?sessionId=${KFIRST.config.sessionId}

  6. Click on Save changes

To integrate authentication, follow the following steps:

  1. Call the Authentification Service with OpenID-Connect-UserInfo-Token. You will. get the generated_session_id as response.

    You can find the service and a detailed documentation (README) here:

    Chatbot templates - GISA authorization service

  2. Add the KFirst snipped to portal website, where generated_session_id is a response from the service.

    <script>
    /*
        Call Keycloak Service
        Get generated session id in response
    */
            var KFIRST = {};
            KFIRST.config = {};
            KFIRST.config.sessionId = "generated_session_id";
    </script>
    
    <script type="text/javascript" 
        src="http://localhost:28080/kfirst-widget/js/loader.js?apikey=fL-zz1O-c9ReWdmh4fN8E4Vgc7pYspIq0sFwfFpdsyg%3D" 
        async="async" defer="defer">
    </script>
  3. Configure the bot as embedded frame activity with adjusted URL

    e. g. http://localhost:xxxxx/kbot-widget/bots/preview/Zyi69nraJNp5k3ylXNICW1281p7fjkvz3gsSpPFbd1Y=/bot.html?sessionId=${KFIRST.config.sessionId}

Chatbot language

There are two ways to set the language for the chatbot:

Preset language via URL
  1. Login in private mode on your KFirst Manager application.

    e. g. https://your.server.url/kfirst-mananger

  2. Go to Widgets > Portal > Language settings

  3. Scroll to the 2. Language detection section

  4. Click on Add.

  5. In the dialog select URL parameter and click Add.

  6. Activate the lang URL parameter and save that it's on the highest positon.

  7. Go to Widgets > Portal > Activity sets > mainpage

  8. Scroll down to the Activites section

  9. Click on the pencil icon to edit the Self-Service-Bot.

  10. Open the Special Settings tab and add lang=${KFIRST.config.lang} to the Object URL.

    e. g. https://your.server.url/kbot-widget/bots/Test/8Es81xfH4FL_V5seIKsgCRkOZfgXaFfec4w3sLo0Z8=/bot.html?lang=${KFIRST.config.lang}&sessionId=${KFIRST.config.sessionId}

  11. Click on Save changes

  12. Open the Chatbot Manager App.

  13. Go to Home > Bots overview > [Botname] > Mandatory Settings > Widget UI Settings

  14. Open the Advanced settings tab

  15. Choose the Language detection method Language from URL query parameter.

Language based on browser language
  1. Login in private mode on your KFirst Manager application.

    e. g. https://your.server.url/kfirst-mananger

  2. Go to Widgets > Portal > Language settings

  3. Scroll to the 2. Language detection section

  4. Click on Add.

  5. In the dialog select Browser language and click Add.

  6. Activate the Browser language parameter.

  7. Open the Chatbot Manager App.

  8. Go to Home > Bots overview > [Botname] > Mandatory Settings > Widget UI Settings

  9. Open the Advanced settings tab

  10. Choose the Language detection method Language from browser.