Human Capital Management Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
sireeshpatil
Advisor
Advisor
365

Introduction:

Few of our customers have a requirement to report on Employee Central - pending workflow data. That is, the workflow is in pending approval status and report needs to generate data changes (current and previous values) which are in the workflow. This information is crucial for decision makers like Managers, HR business partners and Compliance teams.  The users need to know the information in the pending workflows to make better business decisions. 

The HR department and compliance teams have several use-cases for pending data. Few examples are:

Use-Case 1: The HR compliance teams require a report on all pending location change requests (Current location and new location)

Use-Case 2: The HR mobility teams require a report on list of all Global Assignment transfers pending approval (short-term assignment and long-term)

Use-Case 3: The HR compensation teams require a report to track all employees changing their payment cycle (hourly and monthly)

When high volume of workflow changes are pending in the system for approval, a report would be easier to read than opening each workflow request in the UI and viewing the data changes. A report would also help workflow approvers to make better decisions on the pending workflow itself, either to edit the workflow with or without route change, Approve or Decline or initiate follow on processes in the 3rd party system.

Challenge:

The KBA 2274688 lists all the currently available standard reports for workflow. However, reporting on pending workflow data of HRIS Entities (like Job Info, Comp info. etc...) is still a limitation (KBA 2682975)

Solution Approach:

The solution is to use API getWorkflowPendingData. This API can be used to query the changed data in a workflow that is not yet approved or rejected, as well as fully completed. This API supports entities that are in the label: value pair format (oldValue vs newValue). The following list of entities are supported:

  • EmpCompensation
  • EmpEmployment
  • EmpGlobalAssignment
  • EmpJob
  • EmpPensionPayout
  • FOPayComponentGroup
  • PerAddress
  • PerGlobalInfo
  • PerPerson
  • PerPersonal
  • PerPersonRelationship

The getWorkflowPendingData can be used in combination with other workflow related API's/function imports to extract all the required data and build a custom solution. For more detailed information on all the available workflow API's, kindly refer to Successfactors API help documentation. 

Using workflow API's customers can build innovative solutions to meet their business needs. 

Example:  Managers raise location change requests in Successfactors which are getting routed to the compliance team for action. The team reviews these requests and takes the necessary actions as per the regulatory guidelines/company policies.  Based on the report, the approver will either approve/decline the workflow, forward the workflow to onboarding partner in the new location or initiate follow-on processes in the 3rd party system. Let's say there are 300 location change requests pending for approval. In the absence of a report, all the compliance team members have to open individual works and gather the data. This will slow down the process and impact employee experience. 

Step 1. Get all Pending workflow request ID's(wfRequestId) of users on jobinfo.  Use ToDo api to query all the pending workflows. Also, use WfRequest API, EmpWfRequest navigation properties to get all the relevant records. You can limit the selection by identifying specific event reasons and field changes that contribute to a location change. Sample query:

https://<api-server>/odata/v2/TodoEntryV2?$format=json&$filter=categoryIdeq'14'&statuseq'2'

https://<api-server>/odata/v2/WfRequest?$format=JSON&$filter=statuseq'PENDING'

sireesh_2-1749490340619.png

Step 2:  For each wfRequestId, call the getWorkflowPendingData API and it will capture both oldValue (current) and  newValue (proposed).
https://<api-server>/odata/v2/getWorkflowPendingData?wfRequestId=1115152L

sireesh_4-1749490369853.png

Step 3: Retrieve all the records and deliver the output to a SFTP folder or SAP Datasphere to enable creation of reports.

I hope you will find this blog useful. In case of feedback or question, please feel free to use comment section.