HR Integrations : Retrieving Multiple Records with Same person_id_external in CompoundEmployee API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2023 05:52 AM
Hello ServiceNow Community,
I'm working with the CompoundEmployee API (HR Integrations : Worker Profiles), and I've encountered a situation where there are two records with the same person_id_external. Currently, my API request only retrieves one of these records. I would like to know what changes I can make in my API request to retrieve both records associated with the same person_id_external. Any guidance or examples would be greatly appreciated.
Thank you!
This is my current API request :
- Labels:
-
Human Resources Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2023 07:26 AM
I see a condition in your input where it checks for effective_end_date. Check whether effective end date is not current date for the duplicate record. If not current then remove the where condition and try
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 10:53 PM
Thank you for your input @palanikumar ! When I remove the where condition , the API doesn't return any records in the response, even for the other records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 04:52 AM
Hi Aniket,
Did you try removing the lines mentioned below:
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2023 12:59 PM
Hello,
Based on my understanding of your question from the information you’ve provided, see my reply below.
It seems like you're trying to retrieve multiple records associated with the same person_id_external using the ServiceNow CompoundEmployee API. You can modify your XML request to include a condition that retrieves records based on the person_id_external. Here's an example of how you can modify your XML request:
In this modified XML request, replace 'your-person-id-external' with the actual person_id_external value you want to query. This request will retrieve records with a matching person_id_external value, allowing you to get multiple records associated with the same person_id_external.
Good Luck!
James @Ecostratus
If I helped you with your question, then please hit the Thumb Icon and mark it as Helpful or Correct.