Reply Email always change the State of Incident to 'In progress'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2023 05:41 AM
Hi All!
I have an issue with Inbound Action which cause that when user reply to the email notification related to resolution, then state of incident is always changed to 'In progress'
I want to change this Inbound action to change the state (reopen the incident) only when in subject there will be words like ,,reopen" etc.
Do you if it is possible?
I've added the condition like below but it does not work:
// If inc-number found and not an auto reply execute below code
if (match != null && !autoReply && subject.indexOf("reopen") < -1 || subject.indexOf("öffnen") < -1 ) {
// gs.log('Number: ' + current.number + ' RegExResult: ' + match[0]);
if (current.number.toLowerCase() == match[0]) {
current.setValue('state', '2'); // "In Progress"
Thanks in advance for help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2023 11:08 AM
Hi there,
When I debug subject.indexOf("reopen"), this gives me a number higher than -1. Same for öffnen. So I guess you should change < -1 into != -1 or > -1?
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field