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)
- Navigate to the Integrations section under Settings and search for SAP Successfactors.
- Create a new connection.
- Add basic details such as Connector ID and Name.
- Select the authentication type as OAuth.
- 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/tokento your Base URL (e.g.,https://api68sales.successfactors.com/oauth/token).
- Base URL: The starting point for all API calls, representing the region-specific endpoint for your tenant (e.g.,
- 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. - 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)
- Log in to your SAP SF instance using admin credentials in a separate browser tab.
- Search for 'Manage o Auth2 Client Applications' and click on 'Register Client Application'.
- Provide a unique Application Name and Application URL (the URL does not need to be fetched from a specific place).
- Copy your Company ID from the Leena AI connector creation tab and provide it in the SF application registration form.
- 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. - 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
- Navigate back to the Leena AI connector creation tab.
- Add the copied Client ID/API Key and Company ID to the appropriate fields.
- 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:
| Field | Description | Example |
|---|---|---|
| User Id | The 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:
| Field | Description | Example |
|---|---|---|
| Entity (Mandatory) | Select the entity from which the records should be fetched. | userBadges |
| Filter to apply | Apply a filter on the attributes/properties of the entity. | externalCode eq 'a44061178e0347b4a0e9d41367bea755' |
| Fields to get | Specify specific keys/fields to be fetched (comma-separated), instead of fetching all details. | userId, salaryBudget |
| Records to skip | Skip records from 0 up to the mentioned count; this acts as an offset for pagination. | 200 |
| Records to get | The count of records to be fetched from the offset. | 100 |
| Sort based on | Sort the order of records based on a particular field/attribute. | userId |
| Fields to expand | Specific 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 records | Option 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:
| Field | Description | Example |
|---|---|---|
| User Id | The 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:
| Field | Description | Example |
|---|---|---|
| User Id | The 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 Fields | All 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:
| Field | Description | Example |
|---|---|---|
| User Id | The 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 Fields | All 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:
| Field | Description | Example |
|---|---|---|
| User Id | The 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 Fields | All 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:
| Field | Description | Example |
|---|---|---|
| User Id | The 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 Fields | All the custom fields/attributes associated with the entity. | - |
Updated about 20 hours ago
