SAP Knowledge Base Article - Public

2365401 - How to mass delete external candidates

Symptom

  • You wish to mass delete candidates. The tool Admin Centre > Delete Candidate allows you to delete only one candidate at a time.
  • "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 Recruiting Management

Resolution

SuccessFactors does not have a dedicated tool to achieve this.

However there is an alternative method using oDATA integration.

NOTE: The method explained below requires familiarity with oData integration, therefore we suggest contacting your Implementation Partner. 

Prerequisites
The instance needs to use DPCS 2.0 privacy setting.

Example: how to delete one candidate using oDATA

  1. The test candidate has a Candidate ID "1706".
  2. The agreeToPrivacyStatement value in the Candidate Profileis 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.
  3. Send the following oData request: POST  ../odata/v2/Candidate

{

"__metadata":{

        "type":"SFOData.Candidate",

        "uri":"Candidate(1706)

        "

         },

"agreeToPrivacyStatement":"false"

}

We'll get this response as confirmation:

{

  "d": [

    {

      "key": null,

      "status": "OK",

      "editStatus": "UPDATED",

      "message": "Candidate has been updated successfully",

      "index": 0,

      "httpCode": 204,

      "inlineResults": null

    }

  ]

}

The Candidate’s anonymization flag is now marked as declined and the profile will be anonymized after the anonymization scheduled job has completed.

EXAMPLE: how to delete multiple candidates

We need just upsert several candidates in one single request.
Below the same code is repeated three times for CandidateId1, CandidateId2, CandidateId3:

{

"__metadata":{

        "type":"SFOData.Candidate",

        "uri":"Candidate(CandidateId1)

        "

         },

"agreeToPrivacyStatement":"false"

}

{

"__metadata":{

        "type":"SFOData.Candidate",

        "uri":"Candidate(CandidateId2)

        "

         },

"agreeToPrivacyStatement":"false"

}

{

"__metadata":{

        "type":"SFOData.Candidate",

        "uri":"Candidate(CandidateId3)

        "

         },

"agreeToPrivacyStatement":"false"

}

We can build the oData request for a list of Candidate IDs, it just requires you to copy and paste the piece of code as shown above and change the candidate ID each time.

This operation can be done using test editor tools, an easy solution will be to automate the creation of the text concatenating three pieces of text using Microsoft Excel as below:

temp.png

Important Note:

It is not possible to send requests to delete multiple candidates in one single UPSERT. If multiple requests are sent, only the first will be processed

Keywords

delete candidates, oDATA, DPCS 2.0, mass delete candidates , KBA , LOD-SF-RCM-API , Webservices & APIs , How To

Product

SAP SuccessFactors Recruiting all versions