Generate a change request through Inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2017 09:13 PM
Hi,
We have an inbound email action which creates incident but whenever we have "xyz" in the subject line, we need to generate a change request instead of incident.
How can we achieve this please help me to find the solution?
Regards,
Abhishek
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2017 09:28 PM
Thanks Karthik,
But my question is that when we have inbound action on incident table and we want to create change request with same inbound action.
Does it possible to create other table record instead of record on which inbound action is created?
Regards,
Abhishek

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2017 09:49 PM
Hello Abhishek,
Sorry i understand that when you reply to incident mail need to create a change request.
Refer the below link will be helpful to you.
Inbound email action example: requesting a change
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2017 10:26 PM
Hi Abhishek,
I'm sorry i do not carefully read your question before.
Is there any reason why would you not create two different inbound email actions set to the different tables, where the one that points to the change request table has the condition of subject = xyz?
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2019 03:58 AM
Hey karthik. I m sorry for posting this here, i was unable t o tag you... could you please help me in my query? It is here. Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2017 09:26 PM
Hi Abhishek,
Overview
By default, Inbound Email Actions allow users to create or update incidents on from an email. The inbound email action parses the email and uses a script to set certain incident values. Use the following sample inbound email action to create a change request from an email.
- Navigate to System Policy > Inbound Actions.
- Click New.
- Enter these values on the form:
- Name: Request Change.
- Type: New
- Active: True
- Target Table: Change Request [change_request]
- Condition:
email.subject.indexOf("xyz") == 0
- Script:Insert the following script:
//Note: current.caller_id and current.opened_by are already set to the first UserID that matches the From: email address
current.comments = email.body_text;
current.short_description = email.subject;
current.notify = 2;
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.body.priority != undefined)
current.priority = email.body.priority;
if (email.body.category != undefined)
current.category = email.body.category;
current.insert();
Please refer the link below.
http://wiki.servicenow.com/index.php?title=Defining_an_Inbound_Email_Action_for_Changes#gsc.tab=0