How to create order guide item via inbound email When I receive the notification,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 02:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 02:54 AM - edited ‎07-25-2025 02:55 AM
Hi @venkatamahesh ,
you can try like below in your inbound email action script:
var orderGuideAPI = new SNC.ScriptableOrderGuide();
var orderGuide = orderGuideAPI.getOrderBySysID("<Order Guide Sys ID>"); // Replace with the sys_id of your Order Guide
// Set the variables for the Order Guide itself (if applicable)
// orderGuide.variables.<variable_name> = <value>;
// Set the variables for the RITMs that will be generated by the Order Guide
var ritmVariables = [];
ritmVariables.push({name: "<variable_name_for_item1>", value: "<value_for_item1>"});
ritmVariables.push({name: "<variable_name_for_item2>", value: "<value_for_item2>"});
// Add more variable objects for each RITM and its variables as needed
// Create the cart based on the order guide and RITM variables
var orderCart = orderGuideAPI.createCart(orderGuide, "Requested", ritmVariables); // "Requested" is the state
// Submit the order
orderCart.submit();
gs.info("Order Guide submitted. Request created: " + orderCart.getRequest().sys_id);
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 02:55 AM
Hi @venkatamahesh ,
Creating an Order Guide item via inbound email in ServiceNow is not directly supported out of the box like standard catalog items — because Order Guides are more complex (they include multiple items, rules, and variable mappings).
But it can be achieved by designing a custom Inbound Email Action with logic to create request first, then ritms as per items of the order guides.
For variable information also,you can insert into sc_item_option table using GlideRecord. You have to include logic to trigger flows/workflows as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2025 03:19 AM
check how you can do via script
Order a Order Guide using script
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader