Skip to main content

Actions

The ballerinax/sap.successfactors.eccompensationinformation package exposes the following clients:

Available clients:

ClientPurpose
ClientManages 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.

FieldTypeDefaultDescription
authhttp:CredentialsConfigRequiredConfigurations related to client authentication
httpVersionhttp:HttpVersionSee defaultThe HTTP version understood by the client
http1Settingshttp:ClientHttp1SettingsSee defaultConfigurations related to HTTP/1.x protocol
http2Settingshttp:ClientHttp2SettingsSee defaultConfigurations related to HTTP/2 protocol
timeoutdecimalSee defaultThe maximum time to wait (in seconds) for a response before closing the connection
forwardedstringSee defaultThe choice of setting forwarded/x-forwarded header
followRedirectshttp:FollowRedirectsOptionalConfigurations associated with Redirection
poolConfighttp:PoolConfigurationOptionalConfigurations associated with request pooling
cachehttp:CacheConfigSee defaultHTTP caching related configurations
compressionhttp:CompressionSee defaultSpecifies the way of handling compression (accept-encoding) header
circuitBreakerhttp:CircuitBreakerConfigOptionalConfigurations associated with the behaviour of the Circuit Breaker
retryConfighttp:RetryConfigOptionalConfigurations associated with retrying
cookieConfighttp:CookieConfigOptionalConfigurations associated with cookies
responseLimitshttp:ResponseLimitConfigsSee defaultConfigurations associated with inbound response size limits
secureSockethttp:ClientSecureSocketOptionalSSL/TLS-related options
proxyhttp:ProxyConfigOptionalProxy server related options
socketConfighttp:ClientSocketConfigSee defaultProvides settings related to client socket configuration
validationbooleanSee defaultEnables the inbound payload validation functionality which provided by the constraint package. Enabled by default
laxDataBindingbooleanSee defaultEnables 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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListOneTimeDeductionsQueriesNoQueries to be sent with the request

Returns: ListOneTimeDeductionsResponse&#124;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:

NameTypeRequiredDescription
externalCodeintYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetOneTimeDeductionQueriesNoQueries to be sent with the request

Returns: OneTimeDeduction_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListRecurringDeductionItemsQueriesNoQueries to be sent with the request

Returns: ListRecurringDeductionItemsResponse&#124;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:

NameTypeRequiredDescription
RecurringDeduction_effectiveStartDatestringYeskey: RecurringDeduction_effectiveStartDate
RecurringDeduction_userSysIdstringYeskey: RecurringDeduction_userSysId
payComponentTypestringYeskey: payComponentType
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetRecurringDeductionItemQueriesNoQueries to be sent with the request

Returns: RecurringDeductionItem_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmpCompensationExpandEmpCompensationCalculatedNavsQueriesNoQueries to be sent with the request

Returns: ListEmpCompensationExpandEmpCompensationCalculatedNavsResponse&#124;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:

NameTypeRequiredDescription
seqNumberintYeskey: seqNumber
startDatestringYeskey: startDate
userIdstringYeskey: userId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmpCompensationCalculatedQueriesNoQueries to be sent with the request

Returns: EmpCompensationCalculated_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmpCompensationsQueriesNoQueries to be sent with the request

Returns: ListEmpCompensationsResponse&#124;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:

NameTypeRequiredDescription
startDatestringYeskey: startDate
userIdstringYeskey: userId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmpCompensationQueriesNoQueries to be sent with the request

Returns: EmpCompensation_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmpPayCompRecurringsQueriesNoQueries to be sent with the request

Returns: ListEmpPayCompRecurringsResponse&#124;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:

NameTypeRequiredDescription
payComponentstringYeskey: payComponent
seqNumberintYeskey: seqNumber
startDatestringYeskey: startDate
userIdstringYeskey: userId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmpPayCompRecurringQueriesNoQueries to be sent with the request

Returns: EmpPayCompRecurring_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListDeductionScreenIdsQueriesNoQueries to be sent with the request

Returns: ListDeductionScreenIdsResponse&#124;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:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetDeductionScreenIdQueriesNoQueries to be sent with the request

Returns: DeductionScreenId_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListRecurringDeductionsQueriesNoQueries to be sent with the request

Returns: ListRecurringDeductionsResponse&#124;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:

NameTypeRequiredDescription
effectiveStartDatestringYeskey: effectiveStartDate
userSysIdstringYeskey: userSysId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetRecurringDeductionQueriesNoQueries to be sent with the request

Returns: RecurringDeduction_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmpPayCompNonRecurringsQueriesNoQueries to be sent with the request

Returns: ListEmpPayCompNonRecurringsResponse&#124;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:

NameTypeRequiredDescription
payComponentCodestringYeskey: payComponentCode
payDatestringYeskey: payDate
userIdstringYeskey: userId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmpPayCompNonRecurringQueriesNoQueries to be sent with the request

Returns: EmpPayCompNonRecurring_1&#124;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:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmpCompensationGroupSumCalculatedsQueriesNoQueries to be sent with the request

Returns: ListEmpCompensationGroupSumCalculatedsResponse&#124;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:

NameTypeRequiredDescription
seqNumberintYeskey: seqNumber
startDatestringYeskey: startDate
userIdstringYeskey: userId
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmpCompensationGroupSumCalculatedQueriesNoQueries to be sent with the request

Returns: EmpCompensationGroupSumCalculated_1&#124;error

Sample code:

EmpCompensationGroupSumCalculated_1 result = check client->getEmpCompensationGroupSumCalculated(seqNumber, startDate, userId);

Sample response:

{
"d": {
"seqNumber": "string",
"startDate": "2026-01-01",
"userId": "1000"
}
}