Symptom
When performing hire/rehire for new user using OData API, the Business rules of Type Hire/Rehire are not triggered, but the business rule works fine when hire/rehire is done via UI.
Business rule is also not logged in rule trace. Therefore, as business rule is not triggered, the actions to performed after business rule are not performed.
Environment
- SAP SuccessFactors HXM Suite
- OData API
Reproducing the Issue
1. In SF EC, Business rules of type Hire/Rehire with "Employee information model" as base object are being configured to be triggered once the User is hired/rehired via API/UI.
2. Trigger the API call, along with the required payload to hire a user.
3. The API call is successful, but the business rule configured, is not triggered via API nor the business rule is logged in the rule trace.
4. The business rule works correctly when Employee is hired via UI.
Cause
This is the expected behavior.
Resolution
This is working as expected. When adding records from APIs, we call individual API for each element (e.g. jobinfo) to load the data for user. And these individual APIs do not trigger rules with "Employee information model" as base object. It is by design.
Following help guide confirms that rules with Employee Information (Model) as base object are triggered only in "Add new employee" UI.
Standard and Model Base Objects for Employee Central | SAP Help Portal
See Also
Keywords
OData API, Business rule, Hire, Rehire, Employee Information Model, Base object, API, Rule trace, New, EmpEmployment Entity, EmpEmployment Business Rule, EmpEmployment upsert, API Upsert Business Rule Tigger Issue , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT-ODATA , OData API Framework , Problem
SAP Knowledge Base Article - Public