- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2025 12:26 PM
We currently allow users to open incidents by emailing our instance. These incidents are low impact/urgency/priority by default.
We're looking to automatically set the Urgency to High in the event one of our VIP users sends this email. These VIP users exist in an AD security group that syncs with ServiceNow.
We're running Yokohama. Hoping there is something OOB we can rely on. Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2025 03:54 AM
you can check if the user who is responding is member of that group
something like this but please enhance
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
05-29-2025 02:37 PM
@Ankur Bawiskar I've never written back to the email logs before, what's the simplest line of code that I can put inside the if statement in order to accomplish this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 08:32 PM
you can add gs.info() within that IF statement
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
05-30-2025 12:27 PM
I apologize for so many follow ups. I may have to table this one for now as I'm taking up way too much of your time for something that I should be learning in my upcoming training.
This is how I left it, I added a log both inside and outside of the if statement. I wanted to see something get logged regardless of whether the if statement was true or not. Does this log result end up appearing in the same email log in which I get to see things like the following?
05-30-2025 15:21:11 | Information | Processed 'Create Incident', updated incident :INC0107125 |
gs.info("outside if");
if(gs.getUser().isMemberOf('VIP')){
gs.info("inside if");
current.priority = 2; // high
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2025 08:20 PM
it should come in system logs
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 08:51 AM
@Ankur Bawiskar I accepted your original response as a solution, thank you! Here's where I was going wrong: I was attempting to set the priority. HOWEVER, in our system the priority is calculated based off of a formula that looks at both Impact and Urgency. Once I tweaked my statement to set these variables, priority was automatically updated.
Thanks for your patience with me!