Integrating MaxAI

Pre-integration Steps

Before you begin

MaxAI integrates with HCL Discover via Unica Platform. MaxAI uses Unica Platform for authentication, hence you must create a user in Unica Platform with all the relevant permissions.

Procedure

  1. Create a user in Unica Platform.
    1. On Unica Platform, navigate to Settings > Users > New Users
  2. Assign permissions to the newly created user.
    1. On Unica Platform, navigate to Settings > User roles and permissions > Unica MaxAI > <partition> > Add roles and assign permissions.
    2. Assign the permissions Assistant > View Insights to the newly created user for Discover.
  3. Configure CORS.
    1. On Unica Platform, navigate to Settings > Configuration > MaxAI > CORS Configuration.
    2. Provide values for the following fields:
      Enable CORS
      Enabled
      Allowed Origins (comma-separated)
      <DiscoverDomain>
      Allowed Methods
      GET,POST,PUT,DELETE,OPTIONS
      Allowed Headers
      access-control-allow-origin, Content-Type, Authorization, m_tokenId, sso_destapp, api-auth-mode, cache-control, m_user_name, cache-control, pragma, xsrf_token, Origin, Access-Control-Request-Method,401
      Allow Credentials
      Enabled

Update Discover Configuration

Procedure

  1. In HCL Discover, update the Discover Configuration to <InstallPath>\HCL\Unica Discover\Portal\api\appsettings.json.
  2. Within "insights", change the values of the following fields:
    PlatformAuthURL
    <domain-name>/unica/api/manager/authentication/login
    Note: Only HTTPS URLs will work.
    PlatformUserName
    <username>
    PlatformPassword
    <password>
    platformSSO_DestApp
    AION
  3. Ensure that the following condition is met:
    ReplayBaseURL
    localhost:38000/
    Note: Used for internal call to Replay server http://localhost:38000/LoadSession, for getting payload for MaxAI
  4. Access <InstallPath>\HCL\Unica Discover\Portal\web\assets\data\appsettings.json, and
    • Within "insights", ensure that apiGetPlatformAuth value is {{API_BASE_URL}}Insights/GetPlatformAuth.
      Note: This is discover internal server call, which calls platform authentication for token.
    • Change "GetPlatformLogin" value to http://<domain-name>/maxai/platform/login.
      Note: This is external call to MaxAI from Discover UI.
    • Change "QueryExecute" value to http://<domain-name>/maxai/insight/discover-inference.
      Note: This is external call to MaxAI from Discover UI to get Insights.