How to remove records which arent coming in payload? what approach to take?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 12:30 AM - edited 12-18-2024 12:35 AM
Hi All,
I am working on an integration with 3rd party system with servicenow which brings in data and we store it in a custom table in ServiceNow. Its a full payload that we will receive. So, based on that we insert into custom table. IN future, some records in 3rd party system will be deleted or removed, we need to remove it in SN aswell. Whats the best way to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 12:34 AM
explain more..
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 12:37 AM
I am working on an integration with 3rd party system with servicenow which brings in data and we store it in a custom table in ServiceNow. Its a full payload that we will receive. So, based on that we insert into custom table. IN future, some records in 3rd party system will be deleted or removed, we need to remove it in SN aswell. Whats the best way to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 01:00 AM
HI @surya123,
Lets say you have a data [a,b,c,d,e]
Target system has data [a,b,c,d,e]
But the target system decided to delete the data 'a & b' hence they have [c,d,e] , this same data is supposed to be in servicenow too.
You Can can do this with a scripted rest api, were that third-party system would compare the missing data and send that as a payload to servicenow [a,b] and that would get removed from the table.
I hope this helps..
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2024 01:49 AM
They wont be sending deleted records. can we compare on our side with incoming payload. Like a staging table to store the incoming data and then compare with custom table data to compare and remove ?