Actions
The ballerinax/sap.successfactors.eccompensationinformation package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages eccompensationinformation objects: OneTimeDeduction, RecurringDeductionItem, EmpCompensation, EmpPayCompRecurring, DeductionScreenId, RecurringDeduction, EmpPayCompNonRecurring, EmpCompensationGroupSumCalculated, over the SAP SuccessFactors OData v2 API. |
Client
You can use APIs to access the compensation information of an employee, including salary, recurring bonuses and non-recurring compensation information. You can use these APIs to create non-recurring deductions in a payment.
Configuration
ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with the SAP SuccessFactors OData endpoint. Passed as the argument to the client initializer.
| Field | Type | Default | Description |
|---|---|---|---|
auth | http:CredentialsConfig | Required | Configurations related to client authentication |
httpVersion | http:HttpVersion | See default | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | See default | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | See default | Configurations related to HTTP/2 protocol |
timeout | decimal | See default | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | See default | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | Optional | Configurations associated with Redirection |
poolConfig | http:PoolConfiguration | Optional | Configurations associated with request pooling |
cache | http:CacheConfig | See default | HTTP caching related configurations |
compression | http:Compression | See default | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | Optional | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | Optional | Configurations associated with retrying |
cookieConfig | http:CookieConfig | Optional | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | See default | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | Optional | SSL/TLS-related options |
proxy | http:ProxyConfig | Optional | Proxy server related options |
socketConfig | http:ClientSocketConfig | See default | Provides settings related to client socket configuration |
validation | boolean | See default | Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default |
laxDataBinding | boolean | See default | Enables relaxed data binding on the client side. When enabled, nil values are treated as optional, and absent fields are handled as nilable types. Enabled by default. |
The client also accepts a hostname string parameter (the SAP SuccessFactors API server host) and an optional port (defaults to 443).
Initializing the client
import ballerinax/sap.successfactors.eccompensationinformation;
configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;
eccompensationinformation:Client client = check new (
{
auth: { username, password }
},
hostname
);
Operations
OneTimeDeduction
listOneTimeDeductions
Queries the OneTimeDeduction collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListOneTimeDeductionsQueries | No | Queries to be sent with the request |
Returns: ListOneTimeDeductionsResponse|error
Sample code:
ListOneTimeDeductionsResponse result = check client->listOneTimeDeductions();
Sample response:
{
"d": {
"results": [
{
"externalCode": "1000"
}
]
}
}
getOneTimeDeduction
Retrieves a single OneTimeDeduction entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | int | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetOneTimeDeductionQueries | No | Queries to be sent with the request |
Returns: OneTimeDeduction_1|error
Sample code:
OneTimeDeduction_1 result = check client->getOneTimeDeduction(externalCode);
Sample response:
{
"d": {
"externalCode": "1000"
}
}
RecurringDeductionItem
listRecurringDeductionItems
Queries the RecurringDeductionItem collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListRecurringDeductionItemsQueries | No | Queries to be sent with the request |
Returns: ListRecurringDeductionItemsResponse|error
Sample code:
ListRecurringDeductionItemsResponse result = check client->listRecurringDeductionItems();
Sample response:
{
"d": {
"results": [
{
"RecurringDeduction_effectiveStartDate": "2026-01-01",
"RecurringDeduction_userSysId": "1000",
"payComponentType": "string"
}
]
}
}
getRecurringDeductionItem
Retrieves a single RecurringDeductionItem entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
RecurringDeduction_effectiveStartDate | string | Yes | key: RecurringDeduction_effectiveStartDate |
RecurringDeduction_userSysId | string | Yes | key: RecurringDeduction_userSysId |
payComponentType | string | Yes | key: payComponentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetRecurringDeductionItemQueries | No | Queries to be sent with the request |
Returns: RecurringDeductionItem_1|error
Sample code:
RecurringDeductionItem_1 result = check client->getRecurringDeductionItem(RecurringDeduction_effectiveStartDate, RecurringDeduction_userSysId, payComponentType);
Sample response:
{
"d": {
"RecurringDeduction_effectiveStartDate": "2026-01-01",
"RecurringDeduction_userSysId": "1000",
"payComponentType": "string"
}
}
EmpCompensation
listEmpCompensationExpandEmpCompensationCalculatedNavs
Queries the EmpCompensation collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmpCompensationExpandEmpCompensationCalculatedNavsQueries | No | Queries to be sent with the request |
Returns: ListEmpCompensationExpandEmpCompensationCalculatedNavsResponse|error
Sample code:
ListEmpCompensationExpandEmpCompensationCalculatedNavsResponse result = check client->listEmpCompensationExpandEmpCompensationCalculatedNavs();
Sample response:
{
"d": {
"results": [
{
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000"
}
]
}
}
getEmpCompensationCalculated
Retrieves a single EmpCompensation entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
seqNumber | int | Yes | key: seqNumber |
startDate | string | Yes | key: startDate |
userId | string | Yes | key: userId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpCompensationCalculatedQueries | No | Queries to be sent with the request |
Returns: EmpCompensationCalculated_1|error
Sample code:
EmpCompensationCalculated_1 result = check client->getEmpCompensationCalculated(seqNumber, startDate, userId);
Sample response:
{
"d": {
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000"
}
}
listEmpCompensations
Queries the EmpCompensation collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmpCompensationsQueries | No | Queries to be sent with the request |
Returns: ListEmpCompensationsResponse|error
Sample code:
ListEmpCompensationsResponse result = check client->listEmpCompensations();
Sample response:
{
"d": {
"results": [
{
"startDate": "2026-01-01",
"userId": "1000",
"empCompensationCalculatedNav": {},
"empCompensationGroupSumCalculatedNav": {},
"empPayCompRecurringNav": {}
}
]
}
}
getEmpCompensation
Retrieves a single EmpCompensation entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
startDate | string | Yes | key: startDate |
userId | string | Yes | key: userId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpCompensationQueries | No | Queries to be sent with the request |
Returns: EmpCompensation_1|error
Sample code:
EmpCompensation_1 result = check client->getEmpCompensation(startDate, userId);
Sample response:
{
"d": {
"startDate": "2026-01-01",
"userId": "1000",
"empCompensationCalculatedNav": {
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000"
},
"empCompensationGroupSumCalculatedNav": {
"results": []
},
"empPayCompRecurringNav": {
"results": []
}
}
}
EmpPayCompRecurring
listEmpPayCompRecurrings
Queries the EmpPayCompRecurring collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmpPayCompRecurringsQueries | No | Queries to be sent with the request |
Returns: ListEmpPayCompRecurringsResponse|error
Sample code:
ListEmpPayCompRecurringsResponse result = check client->listEmpPayCompRecurrings();
Sample response:
{
"d": {
"results": [
{
"payComponent": "string",
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000",
"compensationNav": {}
}
]
}
}
getEmpPayCompRecurring
Retrieves a single EmpPayCompRecurring entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payComponent | string | Yes | key: payComponent |
seqNumber | int | Yes | key: seqNumber |
startDate | string | Yes | key: startDate |
userId | string | Yes | key: userId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpPayCompRecurringQueries | No | Queries to be sent with the request |
Returns: EmpPayCompRecurring_1|error
Sample code:
EmpPayCompRecurring_1 result = check client->getEmpPayCompRecurring(payComponent, seqNumber, startDate, userId);
Sample response:
{
"d": {
"payComponent": "string",
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000",
"compensationNav": {
"startDate": "2026-01-01",
"userId": "1000",
"empCompensationCalculatedNav": {},
"empCompensationGroupSumCalculatedNav": {},
"empPayCompRecurringNav": {}
}
}
}
DeductionScreenId
listDeductionScreenIds
Queries the DeductionScreenId collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListDeductionScreenIdsQueries | No | Queries to be sent with the request |
Returns: ListDeductionScreenIdsResponse|error
Sample code:
ListDeductionScreenIdsResponse result = check client->listDeductionScreenIds();
Sample response:
{
"d": {
"results": [
{
"externalCode": "1000"
}
]
}
}
getDeductionScreenId
Retrieves a single DeductionScreenId entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetDeductionScreenIdQueries | No | Queries to be sent with the request |
Returns: DeductionScreenId_1|error
Sample code:
DeductionScreenId_1 result = check client->getDeductionScreenId(externalCode);
Sample response:
{
"d": {
"externalCode": "1000"
}
}
RecurringDeduction
listRecurringDeductions
Queries the RecurringDeduction collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListRecurringDeductionsQueries | No | Queries to be sent with the request |
Returns: ListRecurringDeductionsResponse|error
Sample code:
ListRecurringDeductionsResponse result = check client->listRecurringDeductions();
Sample response:
{
"d": {
"results": [
{
"effectiveStartDate": "2026-01-01",
"userSysId": "1000",
"recurringItems": {}
}
]
}
}
getRecurringDeduction
Retrieves a single RecurringDeduction entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
effectiveStartDate | string | Yes | key: effectiveStartDate |
userSysId | string | Yes | key: userSysId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetRecurringDeductionQueries | No | Queries to be sent with the request |
Returns: RecurringDeduction_1|error
Sample code:
RecurringDeduction_1 result = check client->getRecurringDeduction(effectiveStartDate, userSysId);
Sample response:
{
"d": {
"effectiveStartDate": "2026-01-01",
"userSysId": "1000",
"recurringItems": {
"results": []
}
}
}
EmpPayCompNonRecurring
listEmpPayCompNonRecurrings
Queries the EmpPayCompNonRecurring collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmpPayCompNonRecurringsQueries | No | Queries to be sent with the request |
Returns: ListEmpPayCompNonRecurringsResponse|error
Sample code:
ListEmpPayCompNonRecurringsResponse result = check client->listEmpPayCompNonRecurrings();
Sample response:
{
"d": {
"results": [
{
"payComponentCode": "1000",
"payDate": "2026-01-01",
"userId": "1000"
}
]
}
}
getEmpPayCompNonRecurring
Retrieves a single EmpPayCompNonRecurring entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payComponentCode | string | Yes | key: payComponentCode |
payDate | string | Yes | key: payDate |
userId | string | Yes | key: userId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpPayCompNonRecurringQueries | No | Queries to be sent with the request |
Returns: EmpPayCompNonRecurring_1|error
Sample code:
EmpPayCompNonRecurring_1 result = check client->getEmpPayCompNonRecurring(payComponentCode, payDate, userId);
Sample response:
{
"d": {
"payComponentCode": "1000",
"payDate": "2026-01-01",
"userId": "1000"
}
}
EmpCompensationGroupSumCalculated
listEmpCompensationGroupSumCalculateds
Queries the EmpCompensationGroupSumCalculated collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmpCompensationGroupSumCalculatedsQueries | No | Queries to be sent with the request |
Returns: ListEmpCompensationGroupSumCalculatedsResponse|error
Sample code:
ListEmpCompensationGroupSumCalculatedsResponse result = check client->listEmpCompensationGroupSumCalculateds();
Sample response:
{
"d": {
"results": [
{
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000"
}
]
}
}
getEmpCompensationGroupSumCalculated
Retrieves a single EmpCompensationGroupSumCalculated entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
seqNumber | int | Yes | key: seqNumber |
startDate | string | Yes | key: startDate |
userId | string | Yes | key: userId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpCompensationGroupSumCalculatedQueries | No | Queries to be sent with the request |
Returns: EmpCompensationGroupSumCalculated_1|error
Sample code:
EmpCompensationGroupSumCalculated_1 result = check client->getEmpCompensationGroupSumCalculated(seqNumber, startDate, userId);
Sample response:
{
"d": {
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000"
}
}