- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 11:33 AM
Hello Experts,
I am facing an issue. Although it is working for the OOB inbound actions 'create incident','create incident (forwarded) and Update Incident (BP). I am getting perfectly results as per these actions. Now My scenario is
- I want to update an incident when an email comes as forwarded for any incident emails like example
FW:Incident INC0001234 has been opened on your behalf
what could be the simple way to achieve this i tried creating another 'Update Incident (BP) with action as Forward but it seems created a new incident running this. Not getting why? Any suggestion please do not want to go with scripting unless it is not achievable in inbound actions
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 12:51 PM
Just in case what at last I did to work if that helps anyone
-Created new Update Inbound Action (as Forward), Stop processing -checked.order=10
-script which helped
--------------------------
gs.include('validators');
var str = email.subject.toString();
var regex = new SNC.Regex('/INC\\d{7}/im');
var incnum = regex.match(str);
if(incnum!= null)
{
var target = new GlideRecord('incident');
target.addQuery('number',incnum);
target.query();
if(target.next() && target.getValue('state') != IncidentState.CLOSED)
{
target.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;
target.update();
sys_email.instance = target.sys_id;
sys_email.target_table = target.getTableName();
sys_email.update();
}
}
-------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 01:17 PM
Yes I have kept this new update action order to 50 and the original is 100 OOB. I tried even with out any conditions but it is creating incident eventhough processing update inbound. Why is this so? if this processed update it should not. I see in email logs that update one only got processed. Not getting anywhere
Any guidance what should be next steps
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2020 12:51 PM
Just in case what at last I did to work if that helps anyone
-Created new Update Inbound Action (as Forward), Stop processing -checked.order=10
-script which helped
--------------------------
gs.include('validators');
var str = email.subject.toString();
var regex = new SNC.Regex('/INC\\d{7}/im');
var incnum = regex.match(str);
if(incnum!= null)
{
var target = new GlideRecord('incident');
target.addQuery('number',incnum);
target.query();
if(target.next() && target.getValue('state') != IncidentState.CLOSED)
{
target.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;
target.update();
sys_email.instance = target.sys_id;
sys_email.target_table = target.getTableName();
sys_email.update();
}
}
-------------------------------------