iManage Backend

Prerequisites

Note: A service account can only be used only with a single SmartHub instance at any one time.

Required User Access and Authorization

  • This backend implements Federated Impersonation which means every user will have to log in for himself.
    • After the backend is configured, every user is provided with a fake result in the Results page (http(s)://[web-app-url]/Results.html) inviting him to authenticate.
    • The authentication message is configurable.
    • The user is redirected to iManage where he provides credentials to log in.
    • iManage redirects him back to SmartHub.
    • The user is provided only with the items for which he has access to in iManage.
    • Important! For easy user authentication admins should enable the Onboarding Module + Federated Impersonation.
      This eliminates the need for the end users to click on the fake authentication results.
      See: How to Configure Federated Impersonation (Remote Content Source)

Endpoints

  • The only endpoints used are:

    "/documents/search";
    "/api";
    "/auth/oauth2/token";

Create an Application in iManage

  1. Navigate to iManage Control Center using the URL in the format https://YourImanageServer/work/cc.
  2. Log in as an iManage Administrator.
  3. Select 'Applications' on the left side under section 'Settings.'
  4. Click the blue 'Add Application' button at top right.
  5. Select the 'Configure Manually' option.
  6. Set the App:
    1. Name
    2. API key
    3. Generate an API Secret using the Auto-Generate link.
  7. Record the API key and secret: both are needed later.
  8. Finally, press the blue 'Authentication' button.


  9. Set all the settings according to the screenshot below except for the following two:
    1. Redirect URL
      1. This must point to the file FederatedAuth.aspx in your SmartHub deployment.
      2. If SmartHub can be reached on the default port (80), then the URL in the screenshot can be used.
    2. Client Secret:
      1. This is automatically set to the value generated on the previous screen.
      2. Leave it unchanged.



  10. Finally, press the blue 'Access' button.
  11. Select the 'All Users' options and press the 'Review' button.


  12. Press the 'Finish' button.

How to Configure an iManage Backend

  1. Navigate to the SmartHub Administration page at http(s)://[web-app-url]/_admin.
    1. For example: http://smarthub.azurewebsites.net/_admin
  2. From the opening, default page (General Settings):
    1. Add New Backend: Click the "Add New Backend" link to add your new iManage backend.
    2. Backend type: Select iManageBackend from the drop-down list.
  3. Next, enter the Backend Name and corresponding information in the appropriate fields. See the following graphic and table below.

    Note: When registering the app, the Redirect URL must be: http(s)://<web-app-url>/FederatedAuth.aspx

Use the following table:

Property Required? Description Default Value
Server Url Yes

The URL of your iManage server.

https://cloudimanage.com
Document Profile Fields Yes type,document_number,edit_date,create_date,file_edit_date,operator,alias,subject,last_user,in_use_by,file_create_date,size,author,author_description,id,name,extension,size,workspace_id,workspace_
name,database,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10,custom11,custom12,custom13,custom14,custom15,custom16,custom17,custom18,custom19,custom20,custom25,custom26,custom27,custom28,custom29,custom30
Filter Mappings Yes

Maps Document Profile Fields to iManage filters.

Format: document_profile_field_1,filter1;document_profile_field_2,filter2;...etc

database,libraries;
Always Exclude Emails Yes Disabling this checkpoint will bring emails from iManage to SmartHub according to search criteria. Checked
Client Id Yes

Use the client ID specified in previous section while application was created.


Client Secret Yes

Use the client secret generated in previous sections while application was created.


Configuring the Property Mapper Stages

Property Mappings in the Property Mapper stages must be from SmartHub properties to iManage Document Profile Fields.

  • The only exception to this rule is the "Url" property.
  • Always map path related properties (such as "clickUri") to "Url"
  • See more info about document profile fields below.

Sample Property Mappings

Copy
clickUri,Url;
Path,Url;
title,name;
filetype,type;
FileExtension,extension;
date,edit_date;
Size,size;
DisplayAuthor,author;
Library,database;

Available Document Profile Fields

Copy
"results": [
      {
        "access": "string",
        "access_time": "datetime",
        "activity_date": "datetime",
        "arch_req": "string",
        "author": "string",
        "author_description": "string",
        "checkout_comment": "string",
        "checkout_date": "datetime",
        "checkout_due_date": "datetime",
        "checkout_path": "string",
        "checksum": "string",
        "class": "string",
        "class_description": "string",
        "comment": "string",
        "create_date": "datetime",
        "custom1": "string",
        "custom1_description": "string",
        "custom2": "string",
        "custom2_description": "string",
        "custom3": "string",
        "custom3_description": "string",
        "custom4": "string",
        "custom4_description": "string",
        "custom5": "string",
        "custom5_description": "string",
        "custom6": "string",
        "custom6_description": "string",
        "custom7": "string",
        "custom7_description": "string",
        "custom8": "string",
        "custom8_description": "string",
        "custom9": "string",
        "custom9_description": "string",
        "custom10": "string",
        "custom10_description": "string",
        "custom11": "string",
        "custom11_description": "string",
        "custom12": "string",
        "custom12_description": "string",
        "custom13": "string",
        "custom14": "string",
        "custom15": "string",
        "custom16": "string",
        "custom17": "number",
        "custom18": "number",
        "custom19": "number",
        "custom20": "number",
        "custom21": "datetime",
        "custom22": "datetime",
        "custom23": "datetime",
        "custom24": "datetime",
        "custom25": "boolean",
        "custom26": "boolean",
        "custom27": "boolean",
        "custom28": "boolean",
        "custom29": "string",
        "custom29_description": "string",
        "custom30": "string",
        "custom30_description": "string",
        "custom31": "string",
        "custom31_description": "string",
        "database": "string",
        "declared_date": "datetime",
        "default_security": "string",
        "document_number": "integer",
        "alias": "string",
        "edit_date": "datetime",
        "edit_profile_date": "datetime",
        "effective_security": "string",
        "extension": "string",
        "file_create_date": "datetime",
        "file_edit_date": "datetime",
        "id": "string",
        "is_in_use": "boolean",
        "in_use_by": "string",
        "in_use_by_description": "string",
        "is_archived": "boolean",
        "is_declared": "boolean",
        "is_checked_out": "boolean",
        "is_external": "boolean",
        "is_external_as_normal": "boolean",
        "is_hipaa": "boolean",
        "is_latest": "boolean",
        "latest": "string",
        "is_most_recent_activity": "boolean",
        "is_related": "boolean",
        "is_restorable": "boolean",
        "iwl": "string",
        "last_user": "string",
        "last_user_description": "string",
        "share_url": "string",
        "name": "string",
        "operator": "string",
        "operator_description": "string",
        "retain_days": "integer",
        "size": "integer",
        "subclass": "string",
        "subclass_description": "string",
        "type": "string",
        "type_description": "string",
        "version": "integer",
        "workspace_id": "string",
        "workspace_name": "string",
        "wstype": "string",
        "attachments": [
          {
            "attachment_id": "string",
            "id": "string",
            "name": "string",
            "size": "integer"          }
        ],
        "bcc": "string",
        "cc": "string",
        "conversation_count": "integer",
        "conversation_id": "string",
        "conversation_name": "string",
        "from": "string",
        "has_attachment": "boolean",
        "received_date": "datetime",
        "sent_date": "datetime",
        "subject": "string",
        "to": "string"      }
    ]


Available Filters

View the full set here: https://sdksandbox.goimanage.com/cloudimanage-docs/#/docs/resources-0-resources-0-resources-6-resources-2-methods-0

Copy
 "filters": {
    "edit_date": "string",
    "edit_date_from": "string",
    "edit_date_to": "string",
    "type": "string",
    "exclude_emails": "boolean",
    "email_only": "boolean",
    "anywhere": "string",
    "user": "string",
    "author": "string",
    "operator": "string",
    "owner": "string",
    "comments": "string",
    "container_id": "string",
    "include_subtree": "boolean",
    "personalized": "boolean",
    "custom1": "string",
    "libraries": "string",
    "custom2": "string",
    "custom3": "string",
    "custom4": "string",
    "custom5": "string",
    "custom6": "string",
    "custom7": "string",
    "custom8": "string",
    "custom9": "string",
    "custom10": "string",
    "custom11": "string",
    "custom12": "string",
    "custom13": "string",
    "custom14": "string",
    "custom15": "string",
    "custom16": "string",
    "custom17": "DocumentSearch.string or number",
    "custom18": "DocumentSearch.string or number",
    "custom19": "DocumentSearch.string or number",
    "custom20": "DocumentSearch.string or number",
    "custom21_from": "string",
    "custom22_from": "string",
    "custom23_from": "string",
    "custom24_from": "string",
    "custom21_to": "string",
    "custom22_to": "string",
    "custom23_to": "string",
    "custom24_to": "string",
    "custom21_relative": "string",
    "custom22_relative": "string",
    "custom23_relative": "string",
    "custom24_relative": "string",
    "custom25": "boolean",
    "custom26": "boolean",
    "custom27": "boolean",
    "custom28": "boolean",
    "custom29": "string",
    "custom30": "string",
    "name": "string",
    "name_comments": "string",
    "document_number": "DocumentSearch.string or integer",
    "document_version": "DocumentSearch.string or integer",
    "create_date": "string",
    "create_date_from": "string",
    "create_date_to": "string",
    "alias": "string",
    "sent_date": "string",
    "received_date": "string",
    "has_attachment": "boolean",
    "subject": "string",
    "sender": "string",
    "recipient": "string",
    "last_user": "string",
    "checked_out": "boolean",
    "in_use_by": "string",
    "in_use": "boolean",
    "exclude_shortcuts": "boolean",
    "body": "string"  }

Note: By default, SmartHub searches all the iManage libraries which the user has access to.
To filter by a Library (database) simply add the Library refiner on the page.
Example:
Copy
<div class="CoveoFacet" data-default-state="collapsed" data-title="Library" data-field="@Library" data-lookup-field="@Library" data-enable-settings="false"></div>

Note: Additional filters can be added if considered relevant (detailed list here)

Note: iManage search engine The search engine your SmartHub instance uses to perform queries. SmartHub can be configured to use more than one search engine. does not support the "startswith" operator.
In this case, search within refiners feature will be limited to match exactly the value written inside search within searchbox.
Example:  doc → returns doc / docx → returns docx.

The same limitation applies in the case of property restriction queries.

Configuring clicking results behavior

  • Single-click
    • Opens the document in a new tab in iManage preview 
  • Double-click
    • Opens the document in the native app for that document type.
    • For example, Word for documents, PowerPoint for Presentation, etc

Prerequisites:

  • The next products must be installed in your environment:
    • iManageAgentServices
    • iManageWorkDesktopforWindows
    • Office Suite

How to Configure:

  1. Go to iManage backend settings
  2. In Document Profile Fields add "iwl"
  3. Go to your SmartHub results page and add on fields to include "iwl" property
  4. Search on SmartHub results page for: "<script type='text/underscore' class='result-template' data-condition="isUserProfile != 'true'">"
  5. Replace everything from line above to </script> with this: 

Copy
<script type='text/underscore' class='result-template' data-condition="isUserProfile != 'true'">
                    <div class="coveo-result-frame core-result">
                        <div class="CoveoOpenPreviewAction"></div>
                        <div class="core-result-info-wrapper">
                            <div class="core-result-info">
                                <div class="core-info" >
                                    <% if(raw.iwl) { %>
                                        <div class="CoveoResultLink" rel='noreferrer' data-always-open-in-new-window="true" ondblclick="window.open('<%=raw.iwl%>&&command=opencmd')"></div>
                                    <% } else { %>
                                        <a class="CoveoResultLink" rel='noreferrer' data-always-open-in-new-window="true"></a>
                                    <% } %>
                                </div>
                                <div class="core-info" >
                                    <div class="CoveoFieldValue result-summary" data-field="@excerpt" data-caption="Excerpt" data-html-value='true'></div>
                                </div>
                                <div class="core-info widgets-placeholder" ></div>
                            </div>
                            <div class="CoveoActionBar core-action-bar" >
                                <a class='CoveoResultLink prettyURL sh-float-left' rel='noreferrer' target="_blank">
                                    <span title="<%= (raw.filetype||'document') + " from " + (raw.contentsource || raw.clickUri || 'Source') %>"><%= (SH.utils.getSourceSystemImage(raw.clickUri, raw.ContentSource) || raw.ContentSource) %></span>
                                    <span title="<%= raw.clickUri %>"><%= SH.utils.prettifyURL(raw.clickUri) %></span>
                                </a>
                                <div class="open-preview-button hidden  sh-float-right">
                                    <i class="sh-icon-button far fa-eye"></i>
                                    <span>Preview</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </script>