Salesforce

Overview

Salesforce is a cloud-based software that helps businesses connect with customers through a variety of products and services. Leena AI integrates with Salesforce.com using the Salesforce REST API.

Products and services include:

  • Customer 360: A suite of products that unifies sales, service, marketing, commerce, and IT teams with a single view of customer information.
  • CRM apps: Apps for sales, service, marketing, commerce, and more.
  • AI and data: Trusted AI and data on one integrated platform.
  • Tableau CRM: A data visualisation and business intelligence platform that is tightly integrated with Salesforce's products.

API Details

Leena AI integrates with Salesforce.com using the Salesforce REST API.
Authorization for a client application to access REST API resources is implemented using a connected app and an OAuth 2.0 authorization flow.

Setup

Prerequisites

Before setting up the Salesforce connector, you must configure a Connected App in your Salesforce instance. A connected app requests access to REST API resources on behalf of the client application.

Get Credentials

Leena AI supports the following authentication types for the Salesforce Cloud Connector:

  • OAuth 2 Client Credentials
  • OAuth 2 JWT

Steps to set up Connected App (OAuth 2.0 Authentication)

  1. Login to your Salesforce instance (e.g., https://leenai.my.salesforce.com).
  2. Navigate to Setup, then Apps, and click on the "New Connected App" button.
  3. Fill out the required details. Under API, enable the configuration "Enable OAuth Settings".
  4. For testing purposes, the "full" scope should be added.
  5. Save the details. A separate page will render with App details.
  6. Fetch and save the Consumer Key and Consumer Secret.
  7. Navigate again to Setup > Apps > Connected Apps > Manage Connected Apps.
  8. Click on the created app name, and click on the 'Edit Policies' button.
  9. Under the Client Credentials Flow, choose a user in the 'Run as' section. The token will be generated for this user.

Add Connection

Step 1: Create a connector in Leena AI

  1. While creating a connector, select one of the two authentication types:
    • OAuth 2 Client Credentials: Provide the Consumer Secret and Consumer Key (generated above).
    • OAuth 2 JWT: Provide the generated Consumer Key and Private key (generated above).

Step 2: Configure Connection Parameters

The connection requires the following parameters:

ParameterDescriptionExample
Auth TypeThe chosen authentication method (e.g., OAuth 2.0).OAuth 2.0
DomainYour Salesforce domain (e.g., https://leenai.my.salesforce.com).[NO EXAMPLE PROVIDED - Content is blank]
API VersionThe version of the Salesforce API to use.v61.0
Consumer KeyThe unique identifier for your connected app.[NO EXAMPLE PROVIDED - Content is blank]
Consumer SecretThe secret key for your connected app.[NO EXAMPLE PROVIDED - Content is blank]

Step 3: Submit and Save

  1. Click Submit to finalise the connection setup.

Actions

The Leena AI Salesforce connector supports the following actions:

Create a record

This action is used to create a Salesforce record under any object.

Input Parameters

Field NameDescriptionExample
Impersonate UserSelect the user on whose behalf the action should be taken. The impersonated user would become the action taker.[email protected]
Object Name (Mandatory)Select the object under which a new record needs to be created.Account
Object specific FieldsAll the properties/fields specific to the selected object.[NO EXAMPLE PROVIDED - Content is blank]

Update a record by ID

This action is used to update a record under a specific Object. The user can update a record using its unique ID.

Input Parameters

Field NameDescriptionExample
Impersonate UserSelect the user on whose behalf the action should be taken. The impersonated user would become the action taker.[email protected]
Object Name (Mandatory)Select the object under which a record needs to be updated.Account
Record ID (Mandatory)The unique ID of the record for an object, which needs to be updated.L1001
Object specific FieldsAll the properties/fields specific to the selected record.[NO EXAMPLE PROVIDED - Content is blank]

Delete a record by ID

This action is used to delete a record under a specific Object (for example, Deals). The user can delete a record by using its unique Record ID.

Input Parameters

Field NameDescriptionExample
Impersonate UserSelect the user on whose behalf the action should be taken. The impersonated user would become the action taker.[email protected]
Object Name (Mandatory)Select the object under which the record needs to be deleted/trashed.Account
Record ID (Mandatory)The unique ID of the record for an object that needs to be deleted.L1001

Get a record by ID

This action is used to get the details of a record under a specific Object (for example, Deals). The user can get the details of a record using its unique Record ID.

Input Parameters

Field NameDescriptionExample
Impersonate UserSelect the user on whose behalf the action should be taken. The impersonated user would become the action executioner.[email protected]
Object Name (Mandatory)Select the object under which the record needs to be fetched.Account
Record ID (Mandatory)The unique ID of the record for an object, which needs to be fetched.L1001

Get all the records

To be added