How do I delete a candidate using ODATA API?
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
SAP SuccessFactors Recruiting Management
In order to delete an external candidate from Recruiting Module, we have two options:
The first one is an admin tool that is described on this article: 2670133 - Delete Candidate Feature - Recruiting Management. The second option is through an upsert operation using Odata API. This article will describe this process.
In order to delete a candidate using Odata API, the Data Privacy Consent Statement needs to be enabled and the RCM Entity Anonymization Job needs to be running.
- The instance needs to use DPCS 2.0 privacy setting. (Provisioning > Edit Candidate Privacy Options > Enable external data privacy agreement set up, and requires acceptance on external candidate registration (requires Version 11 UI framework (ULTRA));
- RCM Entity Anonymization Job running on daily basis;
Note: These Prerequisites are necessary because the upsert we will conduct will not delete the candidate profile. It will just mark the candidate to be deleted by the Anonymization Job.
How to Execute the Operation:
Here are the steps that need to be followed to mark the candidate do be deleted.
- Identify the candidate you want to delete. Let's use as an example the Candidate ID "1706";
- Send the following oData request:
You will get this response as confirmation:
"message": "Candidate has been updated successfully",
Note: The agreeToPrivacyStatement value in the Candidate Profile is upsertable, so a candidate can be set to: agreeToPrivacyStatement: false, this has the same effect as deleting a candidate through Admin Centre: Admin Centre > Delete Candidate;
The Candidate’s anonymization flag is now marked as declined and the profile will be anonymized after the anonymization scheduled job has completed.
How to delete multiple candidates?
Due to a product limitation, this is currently not possible. Even if you create a payload that contains multiple candidates, only the first candidate in the list will be actually updated.
An enhancement is already planned for this topic, your CSM will be able to follow this internal reference: RCM-67283.
At the moment the only alternative to mass update them will be to find a method to repeat several individual Upserts.
2670133 - Delete Candidate Feature - Recruiting Management
delete candidates, oDATA, DPCS 2.0, delete candidates, how to delete multiple candidates, mass candidate deletion, deleting many candidates , KBA , LOD-SF-RCM-API , Webservices & APIs , LOD-SF-RCM , Recruiting Management , How To