Create Req/Ritm through Inbound action email

Russell Park
Mega Guru

I have created a catalog item and attached it to a workflow.  I am trying to create a Req/Ritm by inbound email action.  The inbound rule is creating a ticket but there is no associated Request or Task SLA.  Below is the code.  What am I missing?

createRequest();
function createRequest(){
	var cart = new Cart();   //calling the cart API
	var item = cart.addItem('1053adb6dbf4bb0029f63caf9d961902');   //sys_id Catalog Item
	var rc = cart.placeOrder();   
}

 

find_real_file.png

3 REPLIES 3

Uncle Rob
Kilo Patron

Hey Friend,

Wrote a thread on this a while back.  How to launch Catalog Items from Email

Hope its helpful!

 

<FAST FWD 3 YEARS> I've got a brand new way to do this, but with Flow Designer instead.


Russell Park
Mega Guru

Thanks!  I'm trying it now.  I would love to get away from inbound actions that run based on an incoming email but I'm a fairly newbie and not knowledgeable with APIs or even know where to start.  What I am doing is, sending an alert to SN when a document is added to a SharePoint library.  The higher ups at my company want a Request ticket opened to review the newly added document. Ill keep you posted on how your solution works but if you have any better recommendations I'm all about trying this an easier way!

 

Thanks!

Russell

If you want to invoke a catalog item by email, that IS the easiest way.
The purpose of invoking the Catalog Item is to run workflow and capitalize on the subtasks (sc_tasks), approvals, etc.  By default ServiceNow executes Catalog Items through the cart, so your Inbound Action basically has to simulate a cart transaction.  Once that happens the Catalog Item creates a RITM, which launches the workflow (which may create approvals / subtasks).  The RITM is then wrapped in a Request.