SAP SuccessFactors

Overview

The SAP SuccessFactors connector enables your Leena AI Agents to integrate with the SAP SuccessFactors cloud-based Human Capital Management (HCM) software suite. This integration helps businesses improve employee experience, make better people decisions, and connect HR across the organisation.

API Details

The Leena AI platform integrates with SAP SuccessFactors using its extensive oData APIs.

Setup

Prerequisites

Before setting up the SAP SuccessFactors connector, ensure you have:

  • Administrator credentials for your SAP SuccessFactors instance.
  • Access to the Leena AI workspace with connector management permissions.

Get Credentials

The SAP SuccessFactors connector uses OAuth 2.0 authentication. Generating the required credentials involves steps in both the Leena AI platform and the SAP SuccessFactors instance.

Steps in Leena AI (Initial Setup)

  1. Navigate to the Integrations section under Settings and search for SAP Successfactors.
  2. Create a new connection.
  3. Add basic details such as Connector ID and Name.
  4. Select the authentication type as OAuth.
  5. Configure the following URLs:
    • Base URL: The starting point for all API calls, representing the region-specific endpoint for your tenant (e.g., https://api68sales.successfactors.com).
    • Token URL: The endpoint for requesting OAuth tokens. Append /oauth/token to your Base URL (e.g., https://api68sales.successfactors.com/oauth/token).
  6. Add the Technical User Id (e.g., sfadmin), which must be an admin in your SF tenant. This user is the fallback for performing actions if no specific user is defined.
  7. Generate a certificate and copy its content for later use in SAP SF. Do not save the connector yet.

Steps in SAP SuccessFactors (Registering Client Application)

  1. Log in to your SAP SF instance using admin credentials in a separate browser tab.
  2. Search for 'Manage o Auth2 Client Applications' and click on 'Register Client Application'.
  3. Provide a unique Application Name and Application URL (the URL does not need to be fetched from a specific place).
  4. Copy your Company ID from the Leena AI connector creation tab and provide it in the SF application registration form.
  5. Under X.509 Certificate, add the certificate you copied in Leena AI (Step 7 above), making sure to remove the ----BEGIN CERTIFICATE---- and ----END CERTIFICATE---- text before saving.
  6. Once saved, click the 'View' action next to the created application and copy the API Key. This API Key is your Client ID for the Leena AI connector.

Add Connection

  1. Navigate back to the Leena AI connector creation tab.
  2. Add the copied Client ID/API Key and Company ID to the appropriate fields.
  3. Save the connector details.

Actions

The following actions are supported for the SAP SuccessFactors connector:

Delete Record

This action allows you to delete an existing record for a specific Entity, identified by a unique identifier.

Input Parameters

The following table shows the input fields for the Delete Record action:

FieldDescriptionExample
User IdThe user ID associated with the action (the action executioner). If not mentioned, the technical user ID (admin) becomes the executioner.sfadmin
Entity (Mandatory)Select the entity under which the record needs to be deleted.userBadges
Record Id (Mandatory)The unique ID for the record. This can be a single unique ID or a combination of 2 unique attributes.PickListV2_id='Delivery Type', externalCode='1'

Get Records

This action allows you to fetch records for an entity, with options to apply a filter or fetch a limited set of records for pagination.

Input Parameters

The following table shows the input fields for the Get Records action:

FieldDescriptionExample
Entity (Mandatory)Select the entity from which the records should be fetched.userBadges
Filter to applyApply a filter on the attributes/properties of the entity.externalCode eq 'a44061178e0347b4a0e9d41367bea755'
Fields to getSpecify specific keys/fields to be fetched (comma-separated), instead of fetching all details.userId, salaryBudget
Records to skipSkip records from 0 up to the mentioned count; this acts as an offset for pagination.200
Records to getThe count of records to be fetched from the offset.100
Sort based onSort the order of records based on a particular field/attribute.userId
Fields to expandSpecific fields that are objects can be expanded in the record to share all sub-attributes/properties.'second Manager' field should additionally give 'userId', 'emailId' for the Second Manager for a user, in case of 'users' entity.
Get total recordsOption to fetch the total count of records, useful for pagination.

Execute Function

This action allows you to execute already created custom functions within SAP SuccessFactors (SF).

Input Parameters

The following table shows the input fields for the Execute Function action:

FieldDescriptionExample
User IdThe user ID associated with the action. The selected user becomes the action executioner, or the technical user ID (admin) is used as a fallback.sfadmin
Function Name (Mandatory)This field lists all the custom functions created within the SF instance.rejectForm

Insert Record

This action only successfully inserts a new record within an entity if no duplicate unique ID exists for the record.

Input Parameters

The following table shows the input fields for the Insert Record action:

FieldDescriptionExample
User IdThe user ID associated with the action. The selected user becomes the action executioner, or the technical user ID (admin) is used as a fallback.sfadmin
Entity (Mandatory)Select the entity under which the record needs to be inserted.User
Record Id (Mandatory)The unique ID for the record. This ID should be unique and must not exist already.user Id = sfadmin
Form based Input?Renders the complete form to capture input for fields. If disabled, input must be given in JSON schema.-
Custom FieldsAll the custom fields/attributes associated with the entity.-

Replace Record

This operation updates an existing record with the field values specified and resets all other fields to their default value.

Input Parameters

The following table shows the input fields for the Replace Record action:

FieldDescriptionExample
User IdThe user ID associated with the action. The selected user becomes the action executioner, or the technical user ID (admin) is used as a fallback.sfadmin
Entity (Mandatory)Select the entity under which the record needs to be replaced.User
Record Id (Mandatory)The unique ID for the record. A unique ID can also be a combination of 2 unique attributes.-
Form based Input?Renders the complete form to capture input for fields. If disabled, input must be given in JSON schema.-
Custom FieldsAll the custom fields/attributes associated with the entity.-

Upsert Record

This action allows you to update an existing record within an entity (if the unique ID already exists), or create a new record if no existing record is found.

Input Parameters

The following table shows the input fields for the Upsert action:

FieldDescriptionExample
User IdThe user ID associated with the action. The selected user becomes the action executioner, or the technical user ID (admin) is used as a fallback.sfadmin
Entity (Mandatory)Select the entity under which the record needs to be updated or created.User
Record Id (Mandatory)The unique ID for the record. A unique ID can also be a combination of 2 unique attributes.user Id = sfadmin
Form based Input?Renders the complete form to capture input for fields. If disabled, input must be given in JSON schema.-
Custom FieldsAll the custom fields/attributes associated with the entity.-

Merge Record (Incremental Update)

This operation performs an incremental update, meaning it updates only the properties provided in the request and leaves the data not mentioned in the request body in its current state. It does not reset other fields to their default value, unlike the Replace operation.

Input Parameters

The following table shows the input fields for the Merge Record (Incremental Update) action:

FieldDescriptionExample
User IdThe user ID associated with the action. The selected user becomes the action executioner, or the technical user ID (admin) is used as a fallback.sfadmin
Entity (Mandatory)Select the entity under which the record needs to be updated.User
Record Id (Mandatory)The unique ID for the record. A unique ID can also be a combination of 2 unique attributes.-
Form based Input?Renders the complete form to capture input for fields. If disabled, input must be given in JSON schema.-
Custom FieldsAll the custom fields/attributes associated with the entity.-