SAP Knowledge Base Article - Public

2187178 - Behavior of Upsert Operation via SFAPI entity USER for multiple records in one SOAP request

Symptom

SFAPI entity: USER

Operation: Upsert

  • You are sending multiple users data via single SOAP_request
  • What happens if there is any Global logic violation or business logic violation for some of the user records?

Global Logic: Field length validation, data type validation, date type validation etc

Business Logic: Picklist value validation, data validation etc

Example:

  • If one SOAP_request contains upsert request for two users and out of them for one records there is a Global Logic violation or Business Logic violation.
  • However, there is no issue with the other record and all the information is correct for this record.

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

Reproducing the Issue

Below is the example:

There are 2 users with external ID 196 and 198.

1. Business logic violation

For User 196, I send "Status" field value as "activee" (which is incorrect as system accepts value either as "Active" or "Inactive"). For user 198, I send "Status" field value as "Active". Both record was present in same SOAP_request.

Upsert request for user 196 failed with below error but data for 198, data got updated successfully.

In the audit log, you would see status as "Success":
Success Audit log.JPG

SOAP Request:

Success_SOAP_Request.JPG

SOAP Response:

 Success_SOAP_Response.JPG

 

 


2. Global Logic Violation

Field length that has been set for field "Status" is 17 (It can be seen in SFAPI Data Dictionary). I send value for "Status" field as "aaaaaaaaaaaaaaaaaaa" which is of 19 characters long for user 196. For user 198, I send value for "Status" field as "Active".


"Upsert" API request failed and it rolled back the entire transaction. Though there was no issue with data for user 198.
This entire request failed due to violation of Global logic field length validation.

In audit log, you would see status as "Failed".

Failed Audit Log.JPG

SOAP Request:

 Failed_SOAP_Request.JPG

SOAP Response:

Failed_SOAP_Response.JPG

Cause

  1. For multiple upsert user request through one SOAP_request, entire transaction will be rolled back if there is a violation of Global check which includes the field length, required, date type, data type checks. If you failed in these check, the whole transaction will be rolled back.
  2. For multiple upsert user request through one SOAP_request, if there is a violation of Business logic check, e.g. activee is not the correct value that has ben defined for the "status" field, those checks will only impact the current record, other records will still be upserted.

Resolution

  • Global logic violation should be avoided.
  • Make sure you do configuration in 3rd party system according to configuration that has been done in the SuccessFactors BizX system.
  • You should take USER entity definition in SFAPI data dictionary (under admin tool -> Integration tools in SuccessFactors system) as a standard and do the configuration accordingly in 3rd party system to avoid global logic violation.

Keywords

SF SuccessFactors SFAPI API upsert USER multiple records one single SOAP request invalid request message invalid_request_message string length exceed invalid_field_value field value error , KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core all versions