SAP SuccessFactors

Overview

The SAP SuccessFactors connector enables your AI Colleagues to integrate with your organization's SAP SuccessFactors platform, facilitating automated HR data management, employee workflows, leave management, and approval processes.

SAP SuccessFactors is SAP's cloud-based human capital management (HCM) software that provides core HR functions including employee central, recruiting, onboarding, performance management, learning, compensation, succession planning, and workforce analytics. The SAP SuccessFactors connector allows Leena AI to automate HR workflows, manage employee data, handle time-off requests, and interact with SuccessFactors entities seamlessly.

API Details

Leena AI integrates with SAP SuccessFactors via OData v2 REST APIs.

Documentation link: https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/03e1fc3791684367a6a76a614a2916de.html

Setup

The SAP SuccessFactors connector uses OAuth 2.0 authentication with the SAML 2.0 Bearer Assertion grant type.


Prerequisites

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

  • Administrator access to your SAP SuccessFactors instance
  • Access to SAP SuccessFactors Admin Center with API Center permissions
  • Permission to manage OAuth2 Client Applications in SuccessFactors
  • Access to your Leena AI workspace with connector management permissions
  • A dedicated API user account in SuccessFactors with required permissions

Get credentials

Here is how to create OAuth credentials in SAP SuccessFactors:

  1. Log in to SAP SuccessFactors Admin Center (Ensure you're signed in as an admin).
  2. Navigate to API Center:
    1. Go to Admin Center
    2. Search for "Manage OAuth2 Client Applications" in Action Search
    3. Or navigate to API Center > OAuth Configuration for OData
  3. Create API User (if not already created):
    1. Create a dedicated OData API user (e.g., SF_ODATA_API) in SuccessFactors
    2. Assign required permissions for API access
  4. Register OAuth Client Application:
    1. Click "Register Client Application"
    2. Enter the following details:
      1. Application Name: Enter a unique name for your OAuth client (e.g., LeenaAI_Integration)
      2. Description: (Optional) Enter a description for the application
      3. Application URL: Enter your Leena AI domain URL
      4. Bind to Users: (Optional) Enable to restrict access to specific users
  5. Generate X.509 Certificate:
    1. Click "Generate X.509 Certificate"
    2. Enter the Common Name (CN) - typically the API username
    3. Click "Generate"
    4. Download the certificate file and save securely
    5. Note: The private key is available between -----BEGIN ENCRYPTED PRIVATE KEY----- and -----END ENCRYPTED PRIVATE KEY----- in the certificate file
  6. Complete Registration:
    1. Click "Register" to complete the registration
    2. An API Key will be generated and displayed
    3. Save the API Key (this is your Client ID)
  7. Note Your Credentials:
    1. API Key (Client ID): Generated after registration
    2. Company ID: Found in your SuccessFactors URL or under Show Version Information
    3. API Server URL: Your SuccessFactors API endpoint (e.g., https://api44.sapsf.com)
    4. Private Key: From the downloaded certificate file

Add connection

Here is how to add a connection on Leena AI:

  1. Log in to your Leena AI workspace
  2. Navigate to Settings > Integrations
  3. Search for "SAP SuccessFactors" and select it from the list to add its new connector
  4. Start configuring the connector
    1. Base URL: Your SAP SuccessFactors API server URL (e.g., https://api44.sapsf.com)
    2. Authentication Type: Select the authentication method (OAuth or Employee OAuth)
    3. Client ID: The API Key generated during OAuth client registration
    4. Company ID: Your SAP SuccessFactors Company ID
    5. Token URL: The OAuth token endpoint URL for your SuccessFactors instance
    6. Technical User ID: (Optional) The technical user ID for API access
    7. Certificate: Upload the X.509 certificate generated in SuccessFactors
  5. Save and Verify Connection
    1. Click Save to store the connector configuration
    2. The system will validate the connection using the provided credentials
    3. Upon successful validation, the connector will be activated

Actions

The following actions are supported for the SAP SuccessFactors connector:

Get Record

Retrieves one or more records from any SAP SuccessFactors entity. The Agent can leverage this action to query employee data, organizational information, or any other SuccessFactors entity with support for filtering, sorting, and pagination.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
EntityThe SuccessFactors entity to query (e.g., User, EmpJob, PerPersonal)

Optional

NameDescription
FilterOData filter expression to narrow down results
SelectComma-separated list of fields to return
ExpandNavigation properties to expand in the response
Order ByField(s) to sort results by
TopMaximum number of records to return
SkipNumber of records to skip for pagination

Here is a sample JSON input:

{
  "Entity": "User",
  "Filter": "status eq 'active'",
  "Select": "userId,firstName,lastName,email,department",
  "Top": 100,
  "OrderBy": "lastName asc"
}

Response

The action returns records from the specified entity, each containing:

  • Entity-specific fields as selected
  • Navigation properties if expanded
  • Metadata including total count (if requested)

Insert Record

Creates a new record in a specified SAP SuccessFactors entity. The Agent can leverage this action to create new employee records, organizational units, or other HR data entries.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
EntityThe SuccessFactors entity where the record will be created
Form Based InputToggle to switch between form-based input and JSON input mode

Optional

NameDescription
JSON InputRaw JSON payload for the record (when Form Based Input is disabled)
(Dynamic)Entity-specific fields generated dynamically based on selected entity

Here is a sample JSON input:

{
  "Entity": "User",
  "formBasedInput": false,
  "jsonInput": {
    "userId": "EMP001234",
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "department": "Engineering",
    "hireDate": "/Date(1704067200000)/"
  }
}

Response

Upon successful creation, the action returns:

  • Created record details
  • Entity key/ID of the new record
  • Timestamp of creation

Upsert Record

Performs an update or insert operation on a SAP SuccessFactors entity. If the record exists, it will be updated; if not, a new record will be created. This action is ideal for data synchronization workflows.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
EntityThe SuccessFactors entity for the upsert operation
Form Based InputToggle to switch between form-based input and JSON input mode

Optional

NameDescription
JSON InputRaw JSON payload for the record (when Form Based Input is disabled)
Purge TypeUpdate behavior: incremental, full, or record
(Dynamic)Entity-specific fields generated dynamically based on selected entity

Here is a sample JSON input:

{
  "Entity": "EmpJob",
  "formBasedInput": false,
  "purgeType": "incremental",
  "jsonInput": {
    "userId": "EMP001234",
    "startDate": "/Date(1704067200000)/",
    "jobCode": "DEV001",
    "department": "Engineering",
    "location": "NYC"
  }
}

Response

Upon successful upsert, the action returns:

  • Operation type (insert or update)
  • Record details
  • Modification timestamp

Merge Record (Incremental Update)

Applies incremental updates to an existing record in SAP SuccessFactors. This action modifies only the specified fields while leaving other fields unchanged, similar to a PATCH operation.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
EntityThe SuccessFactors entity containing the record to update
Form Based InputToggle to switch between form-based input and JSON input mode

Optional

NameDescription
JSON InputRaw JSON payload with fields to update (when Form Based Input is disabled)
(Dynamic)Entity-specific fields generated dynamically based on selected entity

Here is a sample JSON input:

{
  "Entity": "User",
  "formBasedInput": false,
  "jsonInput": {
    "userId": "EMP001234",
    "email": "[email protected]",
    "phone": "+1-555-123-4567"
  }
}

Response

Upon successful merge, the action returns:

  • Updated record details
  • Fields that were modified
  • Modification timestamp

Replace Record

Completely replaces an existing record in SAP SuccessFactors with new data. This action overwrites all fields of the record with the provided values.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
EntityThe SuccessFactors entity containing the record to replace
Form Based InputToggle to switch between form-based input and JSON input mode

Optional

NameDescription
JSON InputComplete JSON payload for the replacement (when Form Based Input disabled)
(Dynamic)Entity-specific fields generated dynamically based on selected entity

Here is a sample JSON input:

{
  "Entity": "User",
  "formBasedInput": false,
  "jsonInput": {
    "userId": "EMP001234",
    "firstName": "John",
    "lastName": "Smith",
    "email": "[email protected]",
    "department": "Product",
    "status": "active"
  }
}

Response

Upon successful replacement, the action returns:

  • Replaced record details
  • Confirmation of full replacement
  • Modification timestamp

Delete Record

Permanently removes a record from a SAP SuccessFactors entity. The Agent can leverage this action to remove employee records, organizational data, or other HR entries that are no longer needed.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
EntityThe SuccessFactors entity containing the record to delete
KeyThe unique identifier/key of the record to be deleted

Here is a sample JSON input:

{
  "Entity": "User",
  "Key": "userId='EMP001234'"
}

Response

Upon successful deletion, the action returns:

  • Confirmation of successful deletion
  • Deletion timestamp

Function Execute

Executes predefined business logic functions available within SAP SuccessFactors, such as workflow actions or custom processes. This action provides access to OData function imports.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
FunctionThe SuccessFactors function to execute
Form Based InputToggle to switch between form-based input and JSON input mode

Optional

NameDescription
JSON InputRaw JSON payload with function parameters (when Form Based Input disabled)
(Dynamic)Function-specific parameters generated dynamically

Here is a sample JSON input:

{
  "Function": "approveWfRequest",
  "formBasedInput": false,
  "jsonInput": {
    "wfRequestId": "12345L",
    "comment": "Approved as per policy"
  }
}

Response

The action returns the function execution result, which varies based on the specific function called.

Get Time Off Balance

Retrieves an employee's leave accruals and time-off balances from SAP SuccessFactors. This action allows employees and managers to check available leave balances across different time-off categories.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Employee IDThe unique identifier of the employee

Optional

NameDescription
As Of DateThe date for which to retrieve balances (defaults to current date)

Here is a sample JSON input:

{
  "Employee ID": "EMP001234",
  "As Of Date": "2025-08-27"
}

Response

The action returns time-off balance information including:

  • Time-off type (e.g., Annual Leave, Sick Leave)
  • Available balance
  • Accrued balance
  • Taken balance
  • Planned balance
  • Bookable date range

Workflow Request Actions

Provides the ability to approve, reject, withdraw, send back, or comment on SAP SuccessFactors workflow requests. The Agent can leverage this action to automate HR approval workflows and manage pending requests.


Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Workflow Request IDThe unique identifier of the workflow request
ActionThe action to perform on the workflow request

Optional

NameDescription
CommentA comment to add with the action (required for 'comment' action)

The Action field accepts the following values:

ValueDescriptionComment Requirement
approveApproves the workflow requestOptional
rejectRejects the workflow requestOptional
withdrawWithdraws the workflow requestOptional
sendbackSends the workflow request back to the prior stepOptional
commentAdds a comment to the workflow requestRequired

Here is a sample JSON input:

// Approve Workflow Request

{
  "Workflow Request ID": "12345",
  "Action": "approve",
  "Comment": "Approved - meets all requirements"
}

// Reject Workflow Request

{
  "Workflow Request ID": "12345",
  "Action": "reject",
  "Comment": "Rejected - missing documentation"
}

// Send Back Workflow Request

{
  "Workflow Request ID": "12345",
  "Action": "sendback",
  "Comment": "Please provide additional information"
}

// Add Comment to Workflow Request

{
  "Workflow Request ID": "12345",
  "Action": "comment",
  "Comment": "Reviewed and forwarded to HR team"
}

Response

Upon successful action, the response includes:

  • Confirmation of the action performed
  • Updated workflow status
  • Timestamp of the action
  • Notification status (if applicable)