SAP Knowledge Base Article - Public

3665227 - Retrieving the termination date of an employee pending in workflow via OData API

Symptom

How to retrieve the "termination date" of an employee whose termination is still pending from a workflow through OData API?

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors HCM Suite
    • OData API

Resolution

The empWfRequestNav from WfRequest returns the termination date of the employee through the "effectiveDate" field.

Refer below:

{
    "__metadata": {
      "uri": "https://apisalesdemo8.successfactors.com/odata/v2/WfRequest(7536L)",
      "type": "SFOData.WfRequest"
    },
    "wfRequestId": "7536",
    "lastModifiedDateTime": "/Date(1759882538000+0000)/",
    "lastModifiedBy": "sfadmin",
    "module": "HRIS",
    "reminderSentDate": null,
    "totalSteps": 2,
    "createdDateTime": "/Date(1759882538000+0000)/",
    "createdOn": "/Date(1759882538000)/",
    "lastModifiedOn": "/Date(1759882538000)/",
    "parentWfRequestId": null,
    "createdBy": "sfadmin",
    "currentStepNum": 1,
    "status": "PENDING",
    "empWfRequestNav": {
      "__metadata": {
        "uri": "https://apisalesdemo8.successfactors.com/odata/v2/EmpWfRequest(7376L)",
        "type": "SFOData.EmpWfRequest"
      },
      "empWfRequestId": "7376",
      "requestType": "TERMINATE",
      "entityType": null,
      "eventReason": "TERERLRT",
      "subjectId": "Jgoh",
      "actionType": null,
      "wfConfig": "TERM",
      "wfRequestId": "7536",
      "effectiveDate": "/Date(1761609600000)/",
  }
}

Keywords

empWfRequestNav, WfRequest, effectiveDate, termination, date, terminated, pending, workflow, wf, EmpWfRequest , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

Product

SAP SuccessFactors HCM Suite all versions