Generate a change request through Inbound email action

abhishekmittal
Tera Contributor

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

12 REPLIES 12

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


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


Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.

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


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.

Harsh Vardhan
Giga Patron

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.


  1. Navigate to System Policy > Inbound Actions.
  2. Click New.
  3. 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