How to remove records which arent coming in payload? what approach to take?

surya123
Mega Guru

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?

7 REPLIES 7

Sohail Khilji
Kilo Patron
Kilo Patron

explain more..


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

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?

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....

LinkedIn - Lets Connect

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 ?