RITM creation by using inbound action

keval3
Tera Contributor

Hi All,

 

I wanted to create RITM tickets by using inbound action 

Item sys id is 

var item = cart.addItem('49dd78a3db427c50eeb8026dd3961902');
 
right now ticket has been created but not going to current catalog item. kindly find below screen snap. which is incorrect way, kindly let me know the current way.
 
keval3_0-1730457173037.png

 

Thanks & Regards
KP 
3 REPLIES 3

OlaN
Giga Sage
Giga Sage

Hi,

I would create a Flow that's triggered by the email, and has an action to submit the correct Catalog item.

Runjay Patel
Giga Sage

Hi @keval3 ,

 

You can use below script to create ritm.

var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
var item = cart.addItem('Put sys_id of your catalog ite.'); 
cart.setVariable(item,'put your variable name ','your varibale value');
cart.setVariable(item,'put your variable name2 ','your varibale value2');
var rc = cart.placeOrder(); 

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Hi Runjay,

I put same code in my inbound but ticket not created by using that code. kindly find below screen snap

keval3_0-1730469418704.png

 

 

Thanks & Regards

KP