SAP Knowledge Base Article - Public

2974994 - No key value is shown in an Upsert error message - Integration Center

Symptom

You have created an inbound integration using Integration Center and the Upsert performed by the integration fails with an error. You noticed that the error message doesn't indicate which exact record caused the error, as it can be seen in this example below:

User: UPSERT failed for the row with key: . Reason: The user is an inactive user, only the active user can be updated. Please activate this user first. The row will not be processed for subsequent entities

The "row with key: " statement presents a blank value.

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

    • Integration Center

Resolution

Integration Center will indicate which record caused the issue in the error message only if the OData API entity being Upserted is able to return the record key in the Upsert response. Some OData entities, when Upserted, will not return the business key of the Upserted record, like User entity for example. Some other entities does return the business keys of the Upserted records, like EmpJob or Position.

Integration Center will always present the same error message that the API has returned when the Upsert was performed. If we Upsert the User entity using Postman and it returns the error below, we'll be able to see the API response:

<m:properties>
   <d:key m:null="true"></d:key>
   <d:status>ERROR</d:status>
   <d:editStatus m:null="true"></d:editStatus>
   <d:message>The user is an inactive user, only the active user can be updated. Please activate this user first with the index 0</d:message>
   <d:index m:type="Edm.Int32">0</d:index>
   <d:httpCode m:type="Edm.Int32">500</d:httpCode>
   <d:inlineResults m:type="Bag(SFOData.UpsertResult)"></d:inlineResults>
</m:properties>

It doesn't mention any key, so Integration Center won't be able to mention it either.

However if we make an Upsert on Position, for example, and it return this error below:

<m:properties>
   <d:key>Position/code=TEST_POSITION,Position/effectiveStartDate=2020-06-01T00:00:00.000-04:00</d:key>
   <d:status>ERROR</d:status>
   <d:editStatus m:null="true"></d:editStatus>
   <d:message>Invalid ENUM value: 'test'. with the index 0</d:message>
   <d:index m:type="Edm.Int32">0</d:index>
   <d:httpCode m:type="Edm.Int32">500</d:httpCode>
   <d:inlineResults m:type="Bag(SFOData.UpsertResult)"></d:inlineResults>
</m:properties>

We'll be able to see that a key is returned by the API, so Integration Center will mention it on its error message too.

Please be aware that in the event of a failure, the key for background entities will not be returned, and the successful event response will have the key.

See Also

Integration Center guide

3378843 - OData API: No business key returned when upserting record to custom MDF - SAP for Me

Keywords

ic, integration center, error handling, errors, key, record, index, value, upsert, fail, failing, not showing, successfactors, success factors, sf, odata, api, response, payload, background, null, Business key, ODATA, API, MDF, Success Factors, provisioning, Upsert, business key  , KBA , LOD-SF-INT-INC , Integration Center , Problem

Product

SAP SuccessFactors HCM Core all versions