Akumina Hub

Overview

There are 2 types of integration with your Akumina Intranet:

  1. Integrate the SmartHub UI in the Akumina search page
  2. Replace the default Akumina SearchBox that is present on all the Akumina intranet pages suite bars with a SmartHub Searchbox with TypeAhead

Requirements

  • BA Insight SmartHub widget must be installed by deploying the Akumina packages available into your SmartHub installation directory

  • SmartHub must be accessible from the internet via HTTPS

  • SmartHub must be secured with Azure Active Directory

  • Users must be able to log in to both Akumina intranet and SmartHub using the same account

  • Access to the Azure Portal App Registration

    • You must edit the URLs that are allowed to use the App registration

  • A SmartHub login page must be uploaded in Akumina. See Configure the login page.

Security Configurations

Configure the login page

To configure a SmartHub login page in Akumina, do the following:

Configure the web.config File

  1. Open the web.config file from SmartHub:

    1. Remove the X-Frame-Options and Content-Security-Policy headers.


Configure Security in SmartHub Admin

  1. Navigate to the SmartHub Administration page.

  2. Go to the Security Settings section.

  3. Add your Akumina site URL to the Trusted App Redirect URLs field.

  4. Click Save.

Install the SmartHub Widgets

Procedure:

  1. Install the BA-Insight SmartHub Results widget:

    1. Navigate to the Akumina App Manager by using the toolbar from your site.

    2. Navigate to Akumina Central

    3. Click on the Management Apps tab.

    4. Open the Widget Manager:

    5. In the Widget Manager choose Import Widget and select the SmartHubResults.zip file from the SmartHub installation folder under /integrations/akumina/ and click Import ZIP

    6. In the Widget Manager choose Import Widget and select the SmartHubSearchBox.zip file from the SmartHub installation folder under /integrations/akumina/ and click Import ZIP

Add the SmartHub Widgets to an Akumina Page

  1. Navigate to the desired Akumina page.

  2. Enter edit mode and add the widget you want to use.


Note: Only one type of each widget is supported per page.

SmartHub Results Widget

About the Widget

  • The widget is used to embed a SmartHub page inside an Akumina page.

Prerequisites

Configure the Search Results HTML Page

  1. Open your Results page in the UI Builder

  2. Create a copy of the page and give it a name such as "Embedded-Results.html".

  3. Switch to the newly created page.

  4. Go to Advanced HTML Edit and make the following changes:

    1. Remove all the non-script tags from the head and everything above the <head> tag.

    2. Replace the <head></head> and <body></body> tags with <div> and </div> while keeping the inner contents of those tags:


    3. For the DIV with ID "search" add a new attribute data-main="true"

    4. Replace the src attribute of logo with the absolute URL.


    5. Change the SHRootLevelURL value to your SmartHub root address.

    6. Make sure that customSettingFile is pointing to "Embeded-Results.html"

    7. Copy
      const customSettingsFile = SHRootLevelURL + "/_bai/v1.0/pagesettings?page=Embeded-Results.html";
  5. Go to Advanced Settings Edit and add the following code to the SH.Loader.FilesToLoad section.

    1. Change the URL to any custom CSS or JavaScript file that was added to use the full SmartHub URL instead of the relative URL, or to use the SHRootLevelURL.

    2. Load the correct theme file

    3. Change the URL to point to the location of the Akumina home site

    4. Copy
      SH.Loader = SH.Loader || {};
      SH.Loader.FilesToLoad = {
        "https://smarthub.contoso.com/modules/Authentication/OAuth.js": {
              "params": {
                  "id": "OAuth",
                  "data-login-redirect-uri": "https://akuminahomepage"
              }
          },
          "/_bai/v1.0/pagetheme?page=/Embeded-Results.html": {}
      };
  6. If you plan to use the SmartHub SearchBox or the Akumina Searchbox the SmartHub SearchBox should be disabled.

  7. Copy
    SH.SearchBox = SH.SearchBox || {};
    SH.SearchBox.CustomSettings = {
        ".sh-search-section": {
            Enabled: false
        },
        ".sh-akumina-search-section": {
            Enabled: true,
            SearchBoxTemplatePath: SHRootLevelURL + "/modules/SearchBox/templates/searchboxTemplate.html",
            ScopedSearchTemplatePath: SHRootLevelURL + "/modules/SearchBox/templates/scopedSearchTemplate.html",
            KeepRefinersTemplatePath: SHRootLevelURL + "/modules/SearchBox/templates/keepRefinersTemplate.html",
            ShowScopedSearch: true,
            ShowKeepRefiners: true,
            RemoveResultsOnClear: true,
            ShowSelectedScope: false,
            EnableDuplicateSearch: true,
            ModuleDetails: {
                SearchBoxPlaceholder: "Search...".toLocaleString(),
                KeepRefinersLabel: "Keep Refiners".toLocaleString()
            }
        }
    };
    SH.SearchBox.PathsToExclude = [];
  8. In the search results UI, you will see tab components. To hide these tabs, change the UI editor to Advanced mode, click Advanced CSS Edit, and add the following rule:
    Copy
    .BAInsightCustom .coveo-tab-section {
      display:none;
    }

Configure the SmartHubResults Widget

  1. Go to the Akumina Page where you have added the widget

  2. Go to Edit Mode

  3. Select and edit the SmartHubResults widget

  4. Add the Embedded-Results.html complete URL on the HTML page link setting.

  5. Save the widget


SmartHub SearchBox Widget

About

The widget is used to embed the SmartHub SearchBox in an Akumina Page, replacing the Akumina Searchbox

Prerequisites

Configure the SmartHub Searchbox Setting Files

  1. Navigate to <SmartHub_root>/integrations/Akumina.

  2. Copy the "TypeAheadSettings " folder to your customizations folder.

  3. Rename the files with better fitting names.

  4. Update the <SmartHub Site> in the following section in the file NewResultsPageSettings.js with your SmartHub site address.

  5. Copy
    window.SH = {
           Loader: {
               FilesToLoad: {},
               PathsToExclude: {}
           },
           TypeAhead: {},
           IntegrationMode: true,
           RootLevelURL: typeof (SHRootLevelURL) == "undefined" ? "" : SHRootLevelURL,
           SmartAnalyticsURL: "<SmartHub Site>/_bai/Analytics",
           SmartHubAddress: "<SmartHub Site>",
       }
  6. Update <Akumina Page> and <Results Page> in the following section in the file NewResultsPageSettings.js.

    Copy
    JSFilesToLoad[SH.SmartHubAddress + "/modules/Authentication/OAuth.js"] = {
           "params": {
               "id": "OAuth",
               "data-login-redirect-uri": "<Akumina HomePage>",
               "data-redirect-uri": "<Results Page>",
               "data-search-uri": SH.SmartHubAddress + "/_bai/v1.0/search",
               "data-userprofile-uri": SH.SmartHubAddress + "/_bai/v1.0/userprofile",
               "data-bothelper-uri": SH.SmartHubAddress + "/_bai/v1.0/chatbot",
               "data-spellcheck-uri": SH.SmartHubAddress + "/_bai/v1.0/spellcheck",
               "data-analytics-uri": SH.SmartHubAddress + "/_bai/Analytics",
               "data-integration-uri": SH.SmartHubAddress + "/_integration",
               "data-smartautomations-uri": SH.SmartHubAddress + "/_bai/integration/appbus/list",
               "data-federatorimpersonation-uri": SH.SmartHubAddress + "/_bai/v1.0/federatedImpersonation"
           }
       };

Configure the SmartHub SearchBox Widget

  1. Go to the Akumina page where you have added the widget.

  2. Go to Edit Mode.

  3. Select and edit the SmartHub SearchBox widget.

  4. Set the selector for the container where the SmartHub SearchBox will render.

  5. Change the SHRootLevelURL value to your SmartHub root address.

  6. Add the full URL for the TypeAhead custom settings modified earlier.

  7. Add the full URL for the TypeAhead page settings modified earlier.

  8. Save the widget.

Info: The out-of-the-box the value for the SmartHub SearchBox is ".respSearch" meaning it replaces the Akumina SearchBox.
If the container doesn't exist it can be added by modifying the Akumina Master page via the View Manager or the value changed to one that exists in the page.
The Akumina SearchBox can also be manually removed by editing the Master Page via the View Manager.
Note: If SmartHubResults and SmartHubSearchBox widgets are used on the same page make sure that both widgets use the same settings for SH.SearchBox and SH.TypeAhead.
Note: Only one type of each widget is supported per page.