Module sap.successfactors.ecalternativecostdistribution
ballerinax/sap.successfactors.ecalternativecostdistribution Ballerina library
Overview
SAP SuccessFactors Employee Central is a comprehensive human capital management solution that helps organizations manage their workforce effectively. It provides a unified platform for HR processes including employee data management, organizational structures, and employment lifecycle management.
The ballerinax/sap.successfactors.ecalternativecostdistribution package provides APIs that enable seamless integration with the SAP SuccessFactors Alternative Cost Distribution API v1.0. The service allows to manage employee cost distribution across multiple cost centers and organizational units.
Key Features
- Manage alternative cost distribution scenarios for employee expenses
- Configure cost center allocations and distribution percentages
- Query and update cost distribution records
- Support for basic and OAuth 2.0 authentication
Setup guide
-
Sign in to your SAP SuccessFactors instance as an administrator.
-
Navigate to Admin Center > Manage OAuth2 Client Applications and register a new OAuth2 client application for your integration.

-
Note down the API Key (client ID) and configure the appropriate scopes for the Employee Central APIs you intend to use.
-
Locate your Company ID and the API server hostname for your SuccessFactors region. You can find the list of API servers in the SAP SuccessFactors API documentation.
-
Use Basic Authentication (username + password) or OAuth 2.0 SAML Bearer to authenticate with the API.
Quickstart
To use the sap.successfactors.ecalternativecostdistribution connector in your Ballerina application, modify the .bal file as follows:
Step 1: Import the module
Import the sap.successfactors.ecalternativecostdistribution module.
import ballerinax/sap.successfactors.ecalternativecostdistribution as ecaltcost;
Step 2: Instantiate a new connector
Use the hostname and credentials to initiate a client.
configurable string hostname = ?; configurable string username = ?; configurable string password = ?; ecaltcost:Client ecaltcostClient = check new ( { auth: { username, password } }, hostname );
Step 3: Invoke the connector operation
Now, utilize the available connector operations.
ecaltcost:EmpCostDistributionWrapper empCostDistribution = check ecaltcostClient->getEmpCostDistribution();
Step 4: Run the Ballerina application
bal run
Examples
The SAP SuccessFactors Employee Central Ballerina connectors provide practical examples illustrating usage in various scenarios. Explore these examples, covering use cases like syncing employee data and sending notifications.
-
Google Sheets to SuccessFactors - Read employee records from a Google Sheets roster and create Personal Information records in SuccessFactors.
-
SuccessFactors to Slack - Poll SuccessFactors for newly onboarded employees and send welcome notifications to a Slack channel.