- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2024 10:01 PM
Hi Team,
Can some help me with below requirement step by step.
I need to submit a catalog item once i receive an email and auto assigned to group service desk level 1 as a default group.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 09:45 PM
Hi @RunsumS ,
You can do like below.
- Create one Inbound action and give your identifier to execute the same once receive email to cerate RITM.
- Write below script to create RITM and assign to your service desk group.
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
var item = cart.addItem('sys_id of your catalog item');
cart.setVariable(item,'put your variable name ','your variable value');
cart.setVariable(item,'put your variable name2 ','your variable value2');
//For example to get the group you can use: email.body.u_group_name where u_group_name is keyword which hold the group in email body.
var group = email.body.u_group_name;
var request= cart.placeOrder();
var grRITM = new GlideRecord("sc_req_item");
if(grRITM.get("request", rc.sys_id+"")) {
grRITM.assignment_group=group ;
grRITM.update();
}
You can also refer this link, it has all the details about Cart API: https://servicenowwithrunjay.com/create-ritm-using-cart-api-in-servicenow/
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 09:45 PM
Hi @RunsumS ,
You can do like below.
- Create one Inbound action and give your identifier to execute the same once receive email to cerate RITM.
- Write below script to create RITM and assign to your service desk group.
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
var item = cart.addItem('sys_id of your catalog item');
cart.setVariable(item,'put your variable name ','your variable value');
cart.setVariable(item,'put your variable name2 ','your variable value2');
//For example to get the group you can use: email.body.u_group_name where u_group_name is keyword which hold the group in email body.
var group = email.body.u_group_name;
var request= cart.placeOrder();
var grRITM = new GlideRecord("sc_req_item");
if(grRITM.get("request", rc.sys_id+"")) {
grRITM.assignment_group=group ;
grRITM.update();
}
You can also refer this link, it has all the details about Cart API: https://servicenowwithrunjay.com/create-ritm-using-cart-api-in-servicenow/
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 10:07 PM