How to compare comments from external system to ServiceNow recent comment and if same skip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2025 02:13 AM
Hi All,
I need some help regarding the comments update from external system to ServiceNow.
We are trying to integrate ServiceNow with Trustwave system and we are able to get the incidents from their system but whenever the script runs the same comments are getting updated again and again.
I tried to build the logic to compare both the recent comments from TrustWave and ServiceNow but it still updates. Attached the script below
Can anyone please help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2025 03:04 AM
what's the trigger for your business rule or script?
are you pulling the comments from external system ?
what's the business requirement here?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2025 04:22 AM
Hi Ankur,
I am using schedule job to trigger the integration and it runs every 1 hr.
Yes, I am pulling all the incident details from the external system and creating it in ServiceNow.
Requirement is to create the incident in ServiceNow when a ticket created in external system. For that "u_fusion_case_id" is the unique key here.
If any incident has the "u_fusion_case_id" then it will update that incident and if not, it will create the new one in ServiceNow.
Here, whenever the business rule runs, the comments are getting updated again and again even when there is no new update in the comment.
As attached, you could see every update has the same comment and client doesn't need it. They need the comment to be updated only when there is a new update.
Thanks & Regards,
Vinod Kumar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2025 04:37 AM
so you have a job to insert/update the incident based on "u_fusion_case_id"
Now next what's your Business rule doing?
what's the trigger for it?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2025 06:38 AM
Hi @Ankur Bawiskar ,
Sorry, I might have miss guided you. There is no business rule, it's just the scheduled job which will insert or update the records from external system to SNOW.
Regards,
Vinod Kumar.