An Employee which has multiple entries in "One Time Payment", "Spot Bonus" portlet in EC with the same "entry date" and same "Pay component code", only one record is retrieved instead of all the records. The query is returning only one record
Reproducing the Issue
An Employee having same paycomponent and date updated in Successfactors will return
Business Key for EmpPayNonRecurring Odata API will fetch one value as per business key
HRIS Element ID: payComponentNonRecurring
Business Keys:userId+ payComponentCode + payDate
Option 1. Customer should review the requirement as they can consolidate the values / amount of the pay given that these are issued under one paycomponent type and date.
Option 2. Recommend to update the Business Key and Update the query likewise
2.1 Update the data model to implement new business key (This can be requested with the Implementation Partner) with below script.
Under the element <hris-element id="payComponentNonRecurring"> in the pay component non recurring in the succession data model
<hris-field id="sequence-number" visibility="view" allow-import="true">
2.2 Update the query
/odata/v2/EmpPayCompNonRecurring?$select=sequenceNumber,userId,createdBy,createdOn,lastModifiedBy,payComponentCode,payDate,value&$filter=userId eq 'ssingh'
Updated Query is referenced with "userId+sequenceNumber" Business key, updated on above data model.
2.3 Refresh the Metadata Cache
Reference KBA 2171588 - SuccessFactors: OData API Metadata Refresh and Export
NOTE: If you change the datamodel to include sequenceNumber as abusiness key then it gets changed from payComponentCode+payDate+userId to sequenceNumber+userId for entity EmpPayCompNonRecurring.
Business Key Behavior
sequenceNumber can be defined as an additional business key via data model configuration. It enables you to have more than one pay component on the same pay date. Once sequenceNumber is introduced as a business key, it must be maintained. If sequenceNumber is not maintained in integrations that rely on the uniqueness of the pay component, these integrations could break.
- ODATA API
- EmpPayComponentNonRecurring / One Time Payment