sap.successfactors.ecemployeecentralpayroll
Module sap.successfactors.ecemployeecentralpayroll
API
Definitions
ballerinax/sap.successfactors.ecemployeecentralpayroll 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.ecemployeecentralpayroll package provides APIs to interact with the SAP SuccessFactors Employee Central Employee Central Payroll API.
Key Features
- Access Employee Central Payroll run results and data
- Query payroll processing records and pay slip information
- Retrieve payroll simulation and calculation results
- 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.ecemployeecentralpayroll connector in your Ballerina application, modify the .bal file as follows:
Step 1: Import the module
Import the sap.successfactors.ecemployeecentralpayroll module.
import ballerinax/sap.successfactors.ecemployeecentralpayroll as employeentralpayroll;
Step 2: Instantiate a new connector
Use the hostname and credentials to initiate a client.
configurable string hostname = ?; configurable string username = ?; configurable string password = ?; employeentralpayroll:Client employeentralpayrollClient = check new ( { auth: { username, password } }, hostname );
Step 3: Invoke the connector operation
Now, utilize the available connector operations.
employeentralpayroll:EmployeePayrollRunResultsItemsWrapper result = check employeentralpayrollClient->listEmployeePayrollRunResultsItemss();
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.
Clients
sap.successfactors.ecemployeecentralpayroll: Client
You can use these APIs to access the replicated payroll information of an employee including pay date, currency, and payroll provider.
You can find your company's API server in List of API Servers in SAP SuccessFactors.
Constructor
Gets invoked to initialize the connector.
init (ConnectionConfig config, string hostname, int port)- config ConnectionConfig - The configurations to be used when initializing the
connector
- hostname string -
- port int 443 -
listEmployeePayrollRunResultsItemss
function listEmployeePayrollRunResultsItemss(map<string|string[]> headers, *ListEmployeePayrollRunResultsItemssQueries queries) returns Wrapper|errorGet entities from EmployeePayrollRunResultsItems
Parameters
- queries *ListEmployeePayrollRunResultsItemssQueries - Queries to be sent with the request
createEmployeePayrollRunResultsItems
function createEmployeePayrollRunResultsItems(EmployeePayrollRunResultsItems payload, map<string|string[]> headers) returns CreatedEmployeePayrollRunResultsItems|errorAdd new entity to EmployeePayrollRunResultsItems
Parameters
- payload EmployeePayrollRunResultsItems - New entity
Return Type
- CreatedEmployeePayrollRunResultsItems|error - Created entity
getEmployeePayrollRunResultsItems
function getEmployeePayrollRunResultsItems(string EmployeePayrollRunResults_externalCode, string EmployeePayrollRunResults_mdfSystemEffectiveStartDate, string externalCode, map<string|string[]> headers, *GetEmployeePayrollRunResultsItemsQueries queries) returns EmployeePayrollRunResultsItems|errorGet entity from EmployeePayrollRunResultsItems by key
Parameters
- EmployeePayrollRunResults_externalCode string - key: EmployeePayrollRunResults_externalCode
- EmployeePayrollRunResults_mdfSystemEffectiveStartDate string - key: EmployeePayrollRunResults_mdfSystemEffectiveStartDate
- externalCode string - key: externalCode
- queries *GetEmployeePayrollRunResultsItemsQueries - Queries to be sent with the request
Return Type
- EmployeePayrollRunResultsItems|error - Retrieved entity
updateEmployeePayrollRunResultsItems
function updateEmployeePayrollRunResultsItems(string EmployeePayrollRunResults_externalCode, string EmployeePayrollRunResults_mdfSystemEffectiveStartDate, string externalCode, ModifiedEmployeePayrollRunResultsItems payload, map<string|string[]> headers) returns error?Update entity in EmployeePayrollRunResultsItems
Parameters
- EmployeePayrollRunResults_externalCode string - key: EmployeePayrollRunResults_externalCode
- EmployeePayrollRunResults_mdfSystemEffectiveStartDate string - key: EmployeePayrollRunResults_mdfSystemEffectiveStartDate
- externalCode string - key: externalCode
- payload ModifiedEmployeePayrollRunResultsItems - New property values
Return Type
- error? - Success
deleteEmployeePayrollRunResultsItems
function deleteEmployeePayrollRunResultsItems(string EmployeePayrollRunResults_externalCode, string EmployeePayrollRunResults_mdfSystemEffectiveStartDate, string externalCode, DeleteEmployeePayrollRunResultsItemsHeaders headers) returns error?Delete entity from EmployeePayrollRunResultsItems
Parameters
- EmployeePayrollRunResults_externalCode string - key: EmployeePayrollRunResults_externalCode
- EmployeePayrollRunResults_mdfSystemEffectiveStartDate string - key: EmployeePayrollRunResults_mdfSystemEffectiveStartDate
- externalCode string - key: externalCode
- headers DeleteEmployeePayrollRunResultsItemsHeaders (default {}) - Headers to be sent with the request
Return Type
- error? - Success
listEmployeePayrollRunResultss
function listEmployeePayrollRunResultss(map<string|string[]> headers, *ListEmployeePayrollRunResultssQueries queries) returns Wrapper_1|errorGet entities from EmployeePayrollRunResults
Parameters
- queries *ListEmployeePayrollRunResultssQueries - Queries to be sent with the request
createEmployeePayrollRunResults
function createEmployeePayrollRunResults(EmployeePayrollRunResults payload, map<string|string[]> headers) returns CreatedEmployeePayrollRunResults|errorAdd new entity to EmployeePayrollRunResults
Parameters
- payload EmployeePayrollRunResults - New entity
Return Type
- CreatedEmployeePayrollRunResults|error - Created entity
getEmployeePayrollRunResults
function getEmployeePayrollRunResults(string externalCode, string mdfSystemEffectiveStartDate, map<string|string[]> headers, *GetEmployeePayrollRunResultsQueries queries) returns EmployeePayrollRunResults|errorGet entity from EmployeePayrollRunResults by key
Parameters
- externalCode string - key: externalCode
- mdfSystemEffectiveStartDate string - key: mdfSystemEffectiveStartDate
- queries *GetEmployeePayrollRunResultsQueries - Queries to be sent with the request
Return Type
- EmployeePayrollRunResults|error - Retrieved entity
updateEmployeePayrollRunResults
function updateEmployeePayrollRunResults(string externalCode, string mdfSystemEffectiveStartDate, ModifiedEmployeePayrollRunResults payload, map<string|string[]> headers) returns error?Update entity in EmployeePayrollRunResults
Parameters
- externalCode string - key: externalCode
- mdfSystemEffectiveStartDate string - key: mdfSystemEffectiveStartDate
- payload ModifiedEmployeePayrollRunResults - New property values
Return Type
- error? - Success
deleteEmployeePayrollRunResults
function deleteEmployeePayrollRunResults(string externalCode, string mdfSystemEffectiveStartDate, DeleteEmployeePayrollRunResultsHeaders headers) returns error?Delete entity from EmployeePayrollRunResults
Parameters
- externalCode string - key: externalCode
- mdfSystemEffectiveStartDate string - key: mdfSystemEffectiveStartDate
- headers DeleteEmployeePayrollRunResultsHeaders (default {}) - Headers to be sent with the request
Return Type
- error? - Success
Records
sap.successfactors.ecemployeecentralpayroll: CollectionofEmployeePayrollRunResults
Fields
- results? EmployeePayrollRunResults[] -
sap.successfactors.ecemployeecentralpayroll: CollectionofEmployeePayrollRunResultsItems
Fields
- results? EmployeePayrollRunResultsItems[] -
sap.successfactors.ecemployeecentralpayroll: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth CredentialsConfig|SamlBearerAuthConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
sap.successfactors.ecemployeecentralpayroll: CreatedEmployeePayrollRunResults
Fields
sap.successfactors.ecemployeecentralpayroll: CreatedEmployeePayrollRunResultsItems
Fields
sap.successfactors.ecemployeecentralpayroll: DeleteEmployeePayrollRunResultsHeaders
Represents the Headers record for the operation: deleteEmployeePayrollRunResults
Fields
- If\-Match? string - ETag
sap.successfactors.ecemployeecentralpayroll: DeleteEmployeePayrollRunResultsItemsHeaders
Represents the Headers record for the operation: deleteEmployeePayrollRunResultsItems
Fields
- If\-Match? string - ETag
sap.successfactors.ecemployeecentralpayroll: EmployeePayrollRunResults
Fields
sap.successfactors.ecemployeecentralpayroll: EmployeePayrollRunResultsItems
Fields
- EmployeePayrollRunResults_externalCode? string -
- EmployeePayrollRunResults_mdfSystemEffectiveStartDate? string -
- externalCode? string -
sap.successfactors.ecemployeecentralpayroll: GetEmployeePayrollRunResultsItemsQueries
Represents the Queries record for the operation: getEmployeePayrollRunResultsItems
Fields
- \$select? ("EmployeePayrollRunResults_externalCode"|"EmployeePayrollRunResults_mdfSystemEffectiveStartDate"|"amount"|"createdBy"|"createdDate"|"createdDateTime"|"endDateWhenEarned"|"externalCode"|"externalName"|"groupingReason"|"lastModifiedBy"|"lastModifiedDate"|"lastModifiedDateTime"|"lastModifiedDateWithTZ"|"mdfSystemEffectiveEndDate"|"mdfSystemEffectiveStartDate"|"mdfSystemEntityId"|"mdfSystemObjectType"|"mdfSystemRecordId"|"mdfSystemRecordStatus"|"mdfSystemStatus"|"mdfSystemTransactionSequence"|"mdfSystemVersionId"|"payrollProviderGroupingReason"|"payrollProviderGroupingValue"|"payrollProviderUnitOfMeasurement"|"payrollProviderWageType"|"quantity"|"startDateWhenEarned"|"unitOfMeasurement"|"wageType")[] - Select properties to be returned, see OData Select
sap.successfactors.ecemployeecentralpayroll: GetEmployeePayrollRunResultsQueries
Represents the Queries record for the operation: getEmployeePayrollRunResults
Fields
- \$expand? ("*"|"employeePayrollRunResultsItems")[] - Expand related entities, see OData Expand
- \$select? ("clientId"|"companyId"|"createdBy"|"createdDate"|"createdDateTime"|"currency"|"employmentId"|"endDateWhenPaid"|"externalCode"|"externalName"|"isVoid"|"lastModifiedBy"|"lastModifiedDate"|"lastModifiedDateTime"|"lastModifiedDateWithTZ"|"mdfSystemEffectiveEndDate"|"mdfSystemEffectiveStartDate"|"mdfSystemEntityId"|"mdfSystemObjectType"|"mdfSystemRecordId"|"mdfSystemRecordStatus"|"mdfSystemStatus"|"mdfSystemTransactionSequence"|"mdfSystemVersionId"|"payDate"|"payrollId"|"payrollProviderId"|"payrollProviderPayrollRunType"|"payrollRunType"|"personId"|"sequenceNumber"|"startDateWhenPaid"|"systemId"|"userId")[] - Select properties to be returned, see OData Select
sap.successfactors.ecemployeecentralpayroll: ListEmployeePayrollRunResultsItemssQueries
Represents the Queries record for the operation: listEmployeePayrollRunResultsItemss
Fields
- \$skip? int - Skip the first n items, see OData Paging - Skip
- \$top int(default 20) - Show only the first n items, see OData Paging - Top
- \$filter? string - Filter items by property values, see OData Filtering
- \$search? string - Search items by search phrases, see OData Searching
- \$orderby? ("EmployeePayrollRunResults_externalCode"|"EmployeePayrollRunResults_externalCode desc"|"EmployeePayrollRunResults_mdfSystemEffectiveStartDate"|"EmployeePayrollRunResults_mdfSystemEffectiveStartDate desc"|"amount"|"amount desc"|"createdBy"|"createdBy desc"|"createdDate"|"createdDate desc"|"createdDateTime"|"createdDateTime desc"|"endDateWhenEarned"|"endDateWhenEarned desc"|"externalCode"|"externalCode desc"|"externalName"|"externalName desc"|"groupingReason"|"groupingReason desc"|"lastModifiedBy"|"lastModifiedBy desc"|"lastModifiedDate"|"lastModifiedDate desc"|"lastModifiedDateTime"|"lastModifiedDateTime desc"|"lastModifiedDateWithTZ"|"lastModifiedDateWithTZ desc"|"mdfSystemEffectiveEndDate"|"mdfSystemEffectiveEndDate desc"|"mdfSystemEffectiveStartDate"|"mdfSystemEffectiveStartDate desc"|"mdfSystemEntityId"|"mdfSystemEntityId desc"|"mdfSystemObjectType"|"mdfSystemObjectType desc"|"mdfSystemRecordId"|"mdfSystemRecordId desc"|"mdfSystemRecordStatus"|"mdfSystemRecordStatus desc"|"mdfSystemStatus"|"mdfSystemStatus desc"|"mdfSystemTransactionSequence"|"mdfSystemTransactionSequence desc"|"mdfSystemVersionId"|"mdfSystemVersionId desc"|"payrollProviderGroupingReason"|"payrollProviderGroupingReason desc"|"payrollProviderGroupingValue"|"payrollProviderGroupingValue desc"|"payrollProviderUnitOfMeasurement"|"payrollProviderUnitOfMeasurement desc"|"payrollProviderWageType"|"payrollProviderWageType desc"|"quantity"|"quantity desc"|"startDateWhenEarned"|"startDateWhenEarned desc"|"unitOfMeasurement"|"unitOfMeasurement desc"|"wageType"|"wageType desc")[] - Order items by property values, see OData Sorting
- \$count? boolean - Include count of items, see OData Count
- \$select? ("EmployeePayrollRunResults_externalCode"|"EmployeePayrollRunResults_mdfSystemEffectiveStartDate"|"amount"|"createdBy"|"createdDate"|"createdDateTime"|"endDateWhenEarned"|"externalCode"|"externalName"|"groupingReason"|"lastModifiedBy"|"lastModifiedDate"|"lastModifiedDateTime"|"lastModifiedDateWithTZ"|"mdfSystemEffectiveEndDate"|"mdfSystemEffectiveStartDate"|"mdfSystemEntityId"|"mdfSystemObjectType"|"mdfSystemRecordId"|"mdfSystemRecordStatus"|"mdfSystemStatus"|"mdfSystemTransactionSequence"|"mdfSystemVersionId"|"payrollProviderGroupingReason"|"payrollProviderGroupingValue"|"payrollProviderUnitOfMeasurement"|"payrollProviderWageType"|"quantity"|"startDateWhenEarned"|"unitOfMeasurement"|"wageType")[] - Select properties to be returned, see OData Select
sap.successfactors.ecemployeecentralpayroll: ListEmployeePayrollRunResultssQueries
Represents the Queries record for the operation: listEmployeePayrollRunResultss
Fields
- \$skip? int - Skip the first n items, see OData Paging - Skip
- \$top int(default 20) - Show only the first n items, see OData Paging - Top
- \$filter? string - Filter items by property values, see OData Filtering
- \$search? string - Search items by search phrases, see OData Searching
- \$orderby? ("clientId"|"clientId desc"|"companyId"|"companyId desc"|"createdBy"|"createdBy desc"|"createdDate"|"createdDate desc"|"createdDateTime"|"createdDateTime desc"|"currency"|"currency desc"|"employmentId"|"employmentId desc"|"endDateWhenPaid"|"endDateWhenPaid desc"|"externalCode"|"externalCode desc"|"externalName"|"externalName desc"|"isVoid"|"isVoid desc"|"lastModifiedBy"|"lastModifiedBy desc"|"lastModifiedDate"|"lastModifiedDate desc"|"lastModifiedDateTime"|"lastModifiedDateTime desc"|"lastModifiedDateWithTZ"|"lastModifiedDateWithTZ desc"|"mdfSystemEffectiveEndDate"|"mdfSystemEffectiveEndDate desc"|"mdfSystemEffectiveStartDate"|"mdfSystemEffectiveStartDate desc"|"mdfSystemEntityId"|"mdfSystemEntityId desc"|"mdfSystemObjectType"|"mdfSystemObjectType desc"|"mdfSystemRecordId"|"mdfSystemRecordId desc"|"mdfSystemRecordStatus"|"mdfSystemRecordStatus desc"|"mdfSystemStatus"|"mdfSystemStatus desc"|"mdfSystemTransactionSequence"|"mdfSystemTransactionSequence desc"|"mdfSystemVersionId"|"mdfSystemVersionId desc"|"payDate"|"payDate desc"|"payrollId"|"payrollId desc"|"payrollProviderId"|"payrollProviderId desc"|"payrollProviderPayrollRunType"|"payrollProviderPayrollRunType desc"|"payrollRunType"|"payrollRunType desc"|"personId"|"personId desc"|"sequenceNumber"|"sequenceNumber desc"|"startDateWhenPaid"|"startDateWhenPaid desc"|"systemId"|"systemId desc"|"userId"|"userId desc")[] - Order items by property values, see OData Sorting
- \$expand? ("*"|"employeePayrollRunResultsItems")[] - Expand related entities, see OData Expand
- \$count? boolean - Include count of items, see OData Count
- \$select? ("clientId"|"companyId"|"createdBy"|"createdDate"|"createdDateTime"|"currency"|"employmentId"|"endDateWhenPaid"|"externalCode"|"externalName"|"isVoid"|"lastModifiedBy"|"lastModifiedDate"|"lastModifiedDateTime"|"lastModifiedDateWithTZ"|"mdfSystemEffectiveEndDate"|"mdfSystemEffectiveStartDate"|"mdfSystemEntityId"|"mdfSystemObjectType"|"mdfSystemRecordId"|"mdfSystemRecordStatus"|"mdfSystemStatus"|"mdfSystemTransactionSequence"|"mdfSystemVersionId"|"payDate"|"payrollId"|"payrollProviderId"|"payrollProviderPayrollRunType"|"payrollRunType"|"personId"|"sequenceNumber"|"startDateWhenPaid"|"systemId"|"userId")[] - Select properties to be returned, see OData Select
sap.successfactors.ecemployeecentralpayroll: ModifiedEmployeePayrollRunResults
Fields
sap.successfactors.ecemployeecentralpayroll: ModifiedEmployeePayrollRunResultsItems
Fields
sap.successfactors.ecemployeecentralpayroll: RelatedCollectionSFOData_EmployeePayrollRunResultsItems
Fields
- results? EmployeePayrollRunResultsItems[] -
sap.successfactors.ecemployeecentralpayroll: Wrapper
Fields
sap.successfactors.ecemployeecentralpayroll: Wrapper_1
Fields
Import
import ballerinax/sap.successfactors.ecemployeecentralpayroll;Metadata
Released date: 7 days ago
Version: 1.1.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.13.0
GraalVM compatible: Yes
Pull count
Total: 2
Current verison: 1
Weekly downloads
Keywords
Area/ERP & Business Operations
Business Management/HCM
Cost/Paid
Vendor/SAP
SuccessFactors
Employee Central
Contributors