Salesforce

Salesforce is a very rich data source for Cases, and Knowledge Base entries. Its data model is quite rich and is most dynamic and highly customizable from instance to instance, making it one of the most complex and comprehensive connectors for Aisera (in terms of functionality).

Aisera Salesforce connector extracts and/or creates data on a Salesforce instance. The data extracted corresponds to the cases (tickets) on SF service cloud, and Knowledge Articles in Knowledge Base in SF service cloud. Similarly, the data created corresponds to new cases (Tickets) on SF instances.

Salesforce Data Model

The following pull connector functionality is available with Salesforce integration. This includes support for the Salesforce default Case and Knowledge Base objects.

The following Salesforce data is mapped by the integration:

  1. Case Object

    1. Case Entity: Id, OwnerId, CaseNumber, Status, Subject, Priority, Description

    2. CaseComments Entity: Id, CommentBody From CaseComments

    3. Case Entity: Id, OwnerId, CaseNumber, Status, Subject, Priority, Description

    4. CaseComments Entity: Id, CommentBody From CaseComments

  2. Knowledge Base Object

    1. KnowledgeArticleVersion Entity: First select all published knowledge article IDs from the default KnowledgeArticleVersion object

    2. Knowledge_kav Entity: Answer__c, Title, Question__c, Summary, UrlName (for each id in the KnowledgeArticleVersion entities) Note: Knowledge Articles (KA)s need to be enabled and the KA record type needs to be created before the KA data can be pulled out of the Salesforce integration.

  3. User Object

  4. Data retrieval

    1. You can retrieve all of the data by using NextURL to fetch data in back-to-back calls to the Salesforce instance.

Salesforce Pagination Option

The Data Source integration for Salesforce includes an optional pagination size field.

The Pagination Size field stores a numeric value that specifies the number of records returned for a query request. Child objects count toward the number of records for the batch size. For example, in relationship queries, multiple child objects are returned per parent row returned.

The default is 2,000; the minimum is 200, and the maximum is 2,000. There is no guarantee that the requested batch size is the actual batch size.

Salesforce Integration

NOTE: You need to have an account with Aisera Admin permissions to perform the following steps.

The integration sets up the authorization for the Aisera System User account to access the Salesforce data through the chosen authorization method.

Determine Your Authentication for Salesforce

Log in to your Salesforce instance, and set the following parameters for authentication.

Basic Authentication

In this case the endpoint of a Salesforce instance and a username, password, Client Id and Client Secret are provided which correspond to an app’s credentials on Salesforce with appropriate permissions.

The Security Token is optional and can be provided, if needed.

OAuth 2.0 Authentication

In this case Aisera follows the OAuth 2.0 authentication and authorization flow, using the access tokens managed by Salesforce.

Follow the steps below to register your Salesforce App (OAuth App), which will create for you a Client ID (sometimes referred to as App Id) and Client Secret (or App Secret). These two pieces can be used later to call Salesforce API using OAuth.

  1. Login into your account and go to Setup as shown below (click on gear icon at the top right corner):

Salesforce Setup Command
  1. Enter app in the search bar and open the App Manager:

Salesforce Application Manager
  1. Then click New Connected App link to create a new OAuth App:

New Salesforce Connected App
  1. Give your App a Name and:

    1. Enable OAuth Settings

    2. Set callback URL to following two URLs (one on each line) https://login.salesforce.com/services/oauth2/success https:/<tenant>.login.aisera.cloud/?id=aisera.oauth.oauthCommand

    3. Add an OAuth scope you want or simply add Full access.

    4. Add the Perform requests on your behalf at any time (offline_token) scope to get a refresh token so that you don't have to re-authenticate each time requesting an access token:

Enable OAuth Settings in Salesforce
  1. Click Save.

  2. Get the Client Id and Client Secret values for your Salesforce App.

  3. Navigate to the Salesforce App Manager.

  4. Find your recently created App and click View (click on the small arrow to the right).

Retrieving Client ID and Client Secret
  1. Once the App page is loaded:

    1. Copy the Consumer Key and Consumer Secret (click on Reveal to see).

    2. Copy any Call back URL (we will need this for OAuth Connection > Advanced Tab > Call Back URL or Redirect URL property e.g. https://dev1.login.aisera.cloud/?id=aisera.oauth.oauthCommand)

Authorization URL example: https://login.salesforce.com/services/oauth2/authorize

Token Endpoint URL: https://login.salesforce.com/services/oauth2/token

Add your SF Authentication Parameters to the Aisera Integration:

  1. Navigate to Settings > Integration in the Aisera Admin UI.

  2. Click the + New Integration button.

  3. Search for Salesforce, and then choose the Salesforce Integration.

Choose Salesforce Integration
  1. Check Next.

  2. Enter a Name for your integration and add the Endpoint for your Salesforce instance. This is required because the Aisera Gen AI platform will use your Salesforce API to access the fields discussed at the beginning of this document.

  1. Choose the type of authentication your Salesforce implementation requires.

  1. Choose Basic or OAuth and click OK.

  2. Enter the options for the authentication type you've chosen.

  3. Click OK.

Now the Aisera Gen AI platform has the ability to access your Salesforce instance.

Designate Salesforce as a Data Source

The next step is to configure your Salesforce instance as a Data Source for your Aisera platform instance.

  1. Navigate to the Settings > Data Source option in the Aisera Admin UI.

  2. Click the + New Data Source button.

  3. Choose the Name of the Salesforce Integration that you created in the previous section.

Setting Salesforce as a Data Source

Aisera integrates natively with Salesforce via the Salesforce API. The Aisera Salesforce connector uses SOQL queries to pull records from Salesforce (pull-type connector). The integration can pull data from the following objects:

  • Tickets (Cases)

  • Knowledge base

  • Users

Even though the connector can pull all these different types of entities, it can operate with any subset of these entities. For example, in the case that a customer only needs to analyze historical cases, it will only need to pull the Ticket entities and nothing more.

  1. Use the Functions pull-down menu (shown above) to determine the objects that data is pulled from, based on the functions you are performing on those objects.

Permission Requirements on Salesforce

Apps that access your Salesforce data are subject to the same security protections that are used in the Salesforce user interface. A user attempting to access the API must have the permission “API Enabled” selected, which is selected by default. The API respects object-level and field level security configured in the user interface. You can access objects and fields only if the logged-in user's permissions and access settings allow such access.

To pull the data, the Aisera System User must have read-only permission for the following Salesforce objects:

Cases (Tickets)

Knowledge (Knowledge Articles)

Users (Users)

User permissions can be edited in Salesforce Setup > Users.

As mentioned above, the connector operates in Read-only mode in most use cases where the primary objective is analysis either historical or ongoing.

There are certain use cases that the connector needs to be able to create cases or modify attributes. In order to create/update cases, the connector needs write permission for the Cases fields.

Roles and User Accounts

The permissions of the Aisera Salesforce connector are managed inside Salesforce. The connector assumes the role of the user or app configured in Salesforce and used to connect from the Aisera service. That way, the minimum set of privileges can be given to Aisera.

Frequency of Data Ingestion Pulls

The Aisera Salesforce connector supports different ways to pull in the corresponding records from Salesforce as follows:

On Demand

You can specify the time window needed to pull records from Salesforce. This functionality is typically used to pull historical records. The data load that is pulled in can range from 100K to 1M records. The connector can take approximately 6-8 hrs to pull 1M records from Salesforce.

Schedule-based

You can specify the frequency needed to pull data from Salesforce as a schedule. The frequency can be continuous and range from every 5 mins up to every 24hrs. The connector pulls data based on the frequency specified in the connector during the initial setup (can be edited).

Last updated