How to Configure the Onboarding Module

 

About

The Onboarding module enables SmartHub to interact with users the first time they visit the SmartHub site.

Defaults
Important!
The module is loaded by default only on the Results HTML page.
If you have results from an iManage content source on your Index HTML page (Index.html, stored at the SmartHub root level) then you must additionally load the JavaScript file <SmartHub_root>/modules/Onboarding/Onboarding.js" on the Index page as well.

The Onboarding module is used to:

  • Display "one-time" information to end users
  • Collect information or feedback from users
  • Trigger additional flows when a specific event happens on the SmartHub page
    • Example: Show results on the SmartHub site page from a Content Source which requires the user to authenticate first.

Structure

  • The Onboarding module acts as a mini-framework which manages sub-modules
  • Sub-modules run in a predefined sequence based on specific triggers

How to Customize the Onboarding Module

Before continuing, familiarize yourself with the information in the topic How to Use the UI Builder. Note that the Onboarding module is disabled by default.

UI Builder

  • The easiest and fastest way to insert and customize Onboarding is via the SmartHub UI Builder.

  • For more information, see How to Use the UI Builder.

Procedure:

  1. SmartHub administrators can simply click the UI Editor link from the SmartHub Administration page.

  2. Click the Select a page link from the top menu.

  3. Select (double-click) an HTML page such as Results.html page.

    1. Below, the Results.html page is shown for sample purposes.

    2. BA Insight recommends you use page and folder to modify. Leave the default files as templates.

      1. Example: Customizations/CustomResults.html. Default Results.html is under the top most SmartHub directory.

      2. See Creating Custom Pages.

  4. Select the Advanced mode from the top right of the page.

  5. Select Advanced settings edit.

  6. Scroll down to line 310 (this may vary), which contains the text SH.Onboarding.CustomSettings


  7. Click the link Default Settings at the top right.

  8. A new browser tab opens with all available SmartHub module settings.

  9. Search for the word "Onboarding" on the page to quickly navigate to the Onboarding default settings, shown below:
  10. Copy
        SH.Onboarding = SH.Onboarding || {};
        SH.Onboarding.DefaultSettings = {
            Enabled: false,
            GenericDialogTemplatePath: SH.RootLevelURL + "/modules/Onboarding/templates/GenericDialogTemplate.html",
            OnboardingModules: {
                "FederatedImpersonation": {
                    Active: true,
                    Priority: 1,
                    Path: SH.RootLevelURL + "/modules/Onboarding/OnboardingModules/FederatedImpersonationModule.js",
                    ModuleSettings: {
                        Backends: {
                            "iManage": {
                                TrySilentAuth: true,
                                InfoMessage: "This page wants to show you <b>iManage</b> results. After you click \"Ok\" you will be asked to sign in to iManage.".toLocaleString(),
                                AuthDialogTitle: "Sign-in required",
                                DismissMessage: "You will no longer be prompted to authenticate to <b>iManage</b>. You can change this setting by accessing <b>Remote Content Sources</b> under your <b>Personalization</b> options.".toLocaleString(),
                                DismissDialogTitle: "Important!"
                            },
                            "OtherBackendRequiringLogIn": {
                                TrySilentAuth: true,
                                InfoMessage: "Message which informs the user about the need to authenticate".toLocaleString(),
                                AuthDialogTitle: "Sign-in required",
                                DismissMessage: "Message that will appear if the user dismissed the authentication modal.".toLocaleString(),
                                DismissDialogTitle: "Important!"
                            }
                        }
                    }
                },
                "SampleOnboardingModule": {
                    Active: false,
                    Priority: 2,
                    Path: SH.RootLevelURL + "/modules/Onboarding/OnboardingModules/SampleOnboardingModule.js",
                    ModuleSettings: {
                        CustomSettingName: "CustomSettingValue"
                    }
                }
            }
        }
  11. Copy the Onboarding settings section from SH.Onboarding.DefaultSettings.
  12. Go back to your Advanced settings edit tab.

  13. Paste the copied settings inside section SH.Onboarding.CustomSettings.
    • Note: By default, Onboarding is disabled by default: Enabled: false.

  14. Modify settings as desired. Refer to the "Onboarding Settings" table below.

  15. Click Save changes.

  16. Click the link Preview <html> file.html at the top of the code editor.

  17. Review your HTML page in the new tab that opens.

  18. Make any necessary changes back in the code editor. Repeat steps 14-18 as necessary.

  19. Click Save changes.

Onboarding Settings

General Options for Onboarding Module

Option Value Description

Enabled

Boolean

Default: false

If set to "true" it enables the sub-modules to load and trigger flows.

GenericDialogTemplatePath

String

Default: SH.RootLevelURL + "/modules/Onboarding/templates/GenericDialogTemplate.html"

Defines the path to the default template for the generic dialog.

To customize the template:

  1. Duplicate the existing template
  2. Modify it as you desire
  3. Point to the new template file using this option
OnboardingModules

Object

Default:

Copy
{
    "FederatedImpersonation": {},

    "SampleOnboardingModule": {}

}

This contains the definitions of all sub-modules.

Out-of-the-Box sub-modules are found under this option. 

  • SampleOnboardingModule
    • A dummy module that displays a simple information message on page load.
    • Scope: To provide an example for configuration and development of custom modules.

  • FederatedImpersonation
    • Use this module to show results from a Remote Content Source (search engine) which requires manual user authentication.
      • Example: iManage search engine
    • See more details about configuring this sub-module in the dedicated topic below.

Onboarding Sub-Modules

  • Sub-modules are managed by the Onboarding framework.

  • Each sub-module defines a flow which triggers when a specific event happens.

Federated Impersonation Sub-Module

This onboarding module launches a configuration wizard whenever it detects that the page is attempting to show results from a Content Source (source system) which requires manual authentication.

Configuration Options

Option Value Description

Active

Boolean

Default: true

If this is set to true, the Federated Impersonation sub-module checks the results on the page for an "authorization required" result for a specific search engine (such as iManage). If such a result is discovered, then it shows a dialog to the user which guides them through the authentication process.

Priority

Number

Default: 1

Defines the priority of the module if multiple modules are set to trigger on the same page load.

  • Sub-modules with lower numbers run first.

Path

String

Default: SH.RootLevelURL +
"/modules/Onboarding/OnboardingModules/
FederatedImpersonationModule.js"

The path to the file which contains the implementation of the sub-module.

  • Loaded only if the sub-module is set to Active:true

ModuleSettings

Object

Default:

Copy
{
    Backends: {
        "iManage": {
            InfoMessage: "This page wants to show you <b>iManage</b> results. After you click \"Ok\"you will be asked to sign in to iManage.".toLocaleString(),
            AuthDialogTitle: "Sign-in required",
            DismissMessage: "You will no longer be prompted to authenticate to <b>iManage</b>.You can change this setting by accessing <b>Remote Content Sources</b> under your <b>Personalization</b> options.".toLocaleString(),
            DismissDialogTitle: "Important!".toLocaleString()
        },
        "OtherBackendRequiringLogIn": {
            InfoMessage: "Message which informs the user about the need to authenticate".toLocaleString(),
            AuthDialogTitle: "Sign-in required",
            DismissMessage: "Message that will appear if the user dismissed the authentication modal.".toLocaleString(),
            DismissDialogTitle: "Important!".toLocaleString()
        }
    }
}

These are settings particular to each sub-module.

The Federated Impersonation sub-module has the following custom settings:

Backends: A single collection of all the Content Source names (search engines) that require authentication:

Backend Configuration

iManage:

This is the out-of-the-box search engine which requires authentication. If you named your iManage search engine a name other than "iManage" then adjust the configuration. 

TrySilentAuth:

If this is set to "true", the confirm dialog will not appear. The user will be redirected directly to iManage and back. This is useful if you have multiple backends. If the authentication process fails, then the user is shown the confirm dialog.

InfoMessage:

The first message that the end user sees when the module detects that additional authentication is required.

AuthDialogTitle:

This is the title of the initial dialog (info dialog).

DismissMessage:

This is the title of the second dialog (dismiss dialog).

OtherBackend
RequiringLogIn
This is an example of how to add a second search engine that requires user authentication.