SAP Knowledge Base Article - Public

3345636 - OData API: PerPersonRelationship firstName & lastName are not upsertable

Symptom

You are upserting data to the PerPersonRelationship entity / object and receive the below error:

  • Properties firstName, lastName are not upsertable. Please check the property setting in Admin Center > OData API Data Dictionary or the entity metadata.

 

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 HXM Suite
    • Employee Central OData API

   

Reproducing the Issue

  1. Send POST request like below:
      
    POSThttps://apiX.successfactors.com/odata/v2/upsert?
     {
            "personIdExternal": "employee123",
            "relatedPersonIdExternal": "dependent_d123",
            "startDate": "/Date(1670457600000)/",
            "relationshipType": "11603",
            "firstName": "dependent_firstName",
            "lastName": "dependent_lastName",
            "__metadata": {
              "type": "SFOData.PerPersonRelationship",
              "uri": "PerPersonRelationship"
        }
     }


  2. Receive the below error in the API response: 
        
    "Properties firstName, lastName are not upsertable. Please check the property setting in Admin Center > OData API Data Dictionary or the entity metadata."
   

Cause

The firstName & lastName values of the dependent are stored in the PerPersonal (Personal Information) entity, as they are considered personal information

  

Resolution

The firstName & lastName values will be retrieved from PerPersonal (Personal Information) based on the relatedPersonIdExternal value provided in the request payload

These values do not need to be included in the upsert request to PerPersonRelationship:

  • POSThttps://apiX.successfactors.com/odata/v2/upsert?
     {
            "personIdExternal": "employee123",
            "relatedPersonIdExternal": "dependent_d123",
            "startDate": "/Date(1670457600000)/",
            "relationshipType": "11603",
            "__metadata": {
              "type": "SFOData.PerPersonRelationship",
              "uri": "PerPersonRelationship"
        }
     }
             

When the PerPersonRelationship record is read back after creation, you will see the firstName & lastName populated with the same values as stored in the PerPersonal entity / object

  

Keywords

KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

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