SAP Knowledge Base Article - Public

3213337 - Upsert to Position is completed with success (200) but parentPosition is empty

Symptom

You have upserted a Position via Postman or any other tool to test Odata API calls.

The return code is 200 and mentions that the position was UPSERTED.

After that you check in Successfactors and notice that parentPosition field (even being part of the payload) is empty.

Environment

  • SAP SuccessFactors HXM Suite
  • SAP SuccessFactors Employee central
  • OData API

Reproducing the Issue

  1. Go to postman or any integration test tool:
  2. Provide your upsert URL (example: https://apisalesdemo2.successfactors.eu/odata/v2/upsert )
  3. Fill the body of your request as per your company requirement and configuration for fields in position object (make sure you are providing higher level position);
  4. Perform your authentication;
  5. Execute the upsert and receive an status 200 success;
  6. Go to your instance in:
    1. Admin center;
    2. Manage positions;
  7. Check your position upserted and observe that Higher Level position is empty;

Cause

parentPosition is a navigation field so it should respect one specific format when doing the upsert.

Resolution

Please review your upsert and make sure this is similar to this format below for the field parentPosition:

"parentPosition"                :{
        "__metadata": {
          "type": "SFOData.Position",
          "uri": "Position(code='[POSITION_CODE]',effectiveStartDate=datetime'[POSITION_EFFECTIVE_DATE]T00:00:00')"
        }
  },

Keywords

upsert parentPosition, Property parentPosition is a navigation property, the given value should be an object, odata upsert , KBA , LOD-SF-INT-API , API & Adhoc API Framework , How To

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM Suite all versions