Compare Subject Line from Inbound Email to Existing INC Short Description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 07:54 AM
Hello,
I'm currently receiving inbound emails as new emails from our outside vendor, even if they are responding to a previous email. For some reason, they have to send a fresh email every time as opposed to replying (they've told us that's the only way they can do it). Therefore, a new incident is created for every single email in the chain. They have a unique ID number (NOT our INC number) that they put in the subject line of each email. So what I would like to do is reference each inbound email's subject line, pull out the unique ID number, and compare it to the short description of existing incidents to see if there is already one created for that unique ID. If there is, I want to add the body of the email to the existing incident as a work note. If there isn't an existing incident, I want to create one as usual. When the email comes in, the subject line is taken directly from the email and entered into the new incident as the "Short Description":
So the format above "[BCM#: xxxxxx]" is what I'm looking to work with. I'm still learning the in's and out's of ServiceNow, and I do have some knowledge of JavaScript. I'm just trying to increase my understanding of how JS is used within ServivceNow. So any help would be greatly appreciated! Also, I've searched the community and seem to find similar things, but not quite the same. I apologize if there is an existing solution that I missed.
-Jeff Swords
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2023 09:55 PM
Hello @Jeff_Swords,
Please refer to the below link:
https://docs.servicenow.com/en-US/bundle/vancouver-platform-administration/page/administer/notificat...
If it is helpful, please mark it as a thumbs-up and accept the correct solution.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 10:15 AM
Thank you for your help Abbas_5! I'm still not sure if I can get a flow to compare what I need compared. I'm going to need to compare a dynamic variable from the inbound email subject line (the 6 digits following the space in "[BCM#: 123456]" for example) to the short descriptions of all active incidents to see if there is a match. Can a flow do that? Will it be handled in a script within the flow? If so, I have a script I was trying to get to work within an inbound email action. So maybe that would work? I can leave it here if need be to see if anyone can help me see what I'm doing wrong. Thanks!