Notify on rejected records during import set run

Student5
Kilo Guru

Hi

I am running a scheduled job that runs a transform map. The transform map does its job to insert/update/reject the records. How would I consolidate and send a list of rejected records (with a reason, if possible) through an email notification? 

Let's say there were 50 records, out of which 30 were inserted/updated and 20 were rejected. I need to send these 20 records to the customer via email notification. 

Thank you!

 

 

3 REPLIES 3

rammohanraomadd
Kilo Guru

Hi Vipin,

 

Create a BR on the import set table and get all the skipped/ignored/error records and pass them to an event parameter. Create an event and notification and share it with the user.

 

Regards,

Ram M

Student5
Kilo Guru

Sorry, I forgot to mention. Basically, I want the user to click the link in the notification and download the CSV. Sending an email notification is not a problem. The issue here is I want them to see only the rejected records. 

 

I am thinking to create two fields, date and rejection reason at the source table. As my transform map is running, I will update the date and rejection (I will run this rule only on rejections). Once the transform map is complete I will create an event and send the link of the source table with query parameters (date and rejection reason is not blank). 

I was thinking, There should be an easy way out without creating the business rule or the fields. So that is why thought to put this in the community to check.

Laveena-Agarwal
Kilo Sage

Hi @Student5 

You can write a OnComplete Transform script,  see this post:

Solved: Issue capturing import set errors to email to a us... - ServiceNow Community

Please accept the solution to close this thread.

 

Thanks,

Laveena