Creation of a new user via Successfactors UI automatically generates an employee Id for that user.
But how to achieve the same automatic generation of employee id when creating new users via the API?
You can achieve the same functionality via APIs but you need to execute one additional API call to achieve the same functionality.
The userId is not automatically generated via the 'User API Upsert' operation but you can call another API(generateNextPersonID) as follows-
This will return you the 'PersonId' which is nothing but the automatically generated userId, exactly same as how the 'Add New Employee' feature generates when employee is created via UI.
And this Id can be passed in the subsequent API request for different entities as follows-
User Entity: In the fields username and userID
PerPerson Entity: In the field personIdExternal
Employment Entity: In the fields personIdExternal and userID
Per* Entities: Used in all Per* entities for the field personIdExternal
Emp*Entities: Used in all Emp* entities for the field userId
KBA , LOD-SF-INT-API , SF API & Adhoc API Framework , LOD-SF-INT , SF Integrations - EC Payroll, Boomi/ HCI, API , How To