Salesforce

Overview

The Salesforce Connector allows the KM platform to ingest and index articles, cases, and documentation from your Salesforce instance. This is achieved by creating an External Client App in Salesforce to act as a secure bridge.


Prerequisites

  • Salesforce Admin Access: Required to create External Client Apps and manage OAuth settings.

  • Leena AI KM Admin Access: Required to input credentials and manage the integration.

  • Redirect URL: Located in your Leena AI KM Dashboard under Settings > Integrations > Salesforce.


Installation Steps

1. Configure the Salesforce External App

  1. Log in to Salesforce and navigate to Setup.

  2. Use the Quick Find box to locate External Client App Manager and select New External Client App.

  3. Basic Information: Add the details about the app as you may deem suitable.

  • External Client App Name: Leena_KM_Connector (or preferred name).


  1. Go to OAuth Settings and select Enable OAuth.

  2. OAuth Settings---->App Settings---->Callback URL Add Callback Url fetched from Leena KM dashboard.

  3. OAuth Settings---->App Settings---->OAuth Scopes Select all Available OAuth Scopes.


  4. OAuth Settings---> Plugin Policies

  • Select Permitted Users as 'All users can self-authorize' . Leave other fields as blank within plugin policies.


  1. OAuth Settings---->OAuth FLows and External Client App Enhancements:
  • Flow Enablement: We recommend you to select 'Enable Client Credentials Flow' and 'Enable Token Exchange Flow'.

  1. OAuth Settings--->App Authorization
  • Within Refresh Token Policy to select 'Expire refresh token after specific time'.
  • Within IP relaxation select 'Enforce IP restrictions'.


  1. OAuth Settings--->Security
    Within Security section select the following configuration.




  2. OAuth Policies--->Flow Enablement

Within Flow Enablement Section select the following configurations.



  1. Click Create to create the APP.

2. Retrieve Client Credentials

  1. Open the app you just created in the External Client App Manager.
  2. Go to the OAuth Settings tab.
  3. Copy consumer Key and Secret for later use:
  • Consumer Key (used as Client ID)

  • Consumer Secret (used as Client Secret)

3. Setup Leena AI KM Dashboard

  1. Navigate to Settings > Integrations > Salesforce > Connect.
  2. Fill in the fields using the credentials gathered in Step 2:
  • Client ID: Enter the Consumer Key.
  • Client Secret: Enter the Consumer Secret.
  1. Base URL:
  • Go to Salesforce Company Settings > My Domain Details.

  • Copy the Current My Domain URL.

  • Note: Ensure it starts with https://.

4. Authentication & Metadata

  1. Once you have filled Connection name, Client ID, **Client Secret **and Base URL Click Generate Refresh Token.

  2. You will be redirected to the Salesforce Authentication page. Log in and authorize the connection.

  3. Once redirected back to Leena AI, click Connect.

  4. Metadata Filtering: Once Connected, click on configure Salesforce to sync Salesforce content based on metadata filters, file name and expiration date.


⚠️ Important Notes

[!IMPORTANT] Always ensure the Consumer Secret is kept secure. If the secret is rotated in Salesforce, you must update the integration settings in Leena AI immediately to avoid sync failures.


Configuration Summary

FieldSource
Client IDSalesforce Consumer Key
Client SecretSalesforce Consumer Secret
Base URLSalesforce My Domain URL (with https://)
Callback URLLeena AI KM Dashboard