Submitting Order Guide through Scripted REST API

RAMANA MURTHY G
Mega Sage
Mega Sage

Hello Mates!

 

I want to submit an order guide through the Scripted REST API. I have 10 Catalog Items in the Order Guide, whereas 6 to 8 catalog items are triggered based on the Rule base. Here, my question is I wanted to submit this order guide using Scripted REST API, which means API must trigger catalog items also (multiple RITMs under one REQ and Order Guide field on RITM form must be filled with my order guide name before it got created, because we have flow dependency on that field). 

 

Can anyone please suggest to me the best approach to trigger the order guide with API?

 

Thank you very much

Please mark my answer helpful  & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer
3 REPLIES 3

Anil Lande
Kilo Patron

Hi,

Please check below links:

https://developer.servicenow.com/dev.do#!/reference/api/utah/server/sn_sc-namespace/OrderGuideScoped...

https://www.servicenow.com/community/developer-forum/submit-order-guide-via-script/m-p/1383780

 

or you can use CartJS Api to submit multiple items.

https://developer.servicenow.com/dev.do#!/reference/api/utah/server/sn_sc-namespace/c_CartJSScoped

 you have to use if-else login in script to determine which item should be included/excluded and set variables for each item by preparing JSON and add items to Cart.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hello @Anil Lande ,

Thank you for your response, I tried these methods before, But I didn't get the output as expected. If u have any demo code can you please send me if possible

 

Thank you very much

Please mark my answer helpful  & correct if it helps you
Thank you

G Ramana Murthy
ServiceNow Developer

Can you please share what you have done and what is the scenario you are trying to achieve?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande