Has anyone been able to create a catalog request using the REST APIs?

nicholar
Kilo Contributor

Hello All,

I'm looking to create catalog requests via a desktop application that uses ServiceNow's REST APIs. I've been able to successfully do this for incident - the application creates an incident record by calling the Table APIs. This issue I am having with trying to create a catalog request is that it requires the 3 layers (request, requested item, and catalog task). If I just create the appropriate records for each using the table inserts everything works until I try to close a catalog task - the associated request and catalog request remain open...

Is there some way to attach a workflow to a request record created via REST?(i.e. create the requested item and catalog task and manage workflow stages) Like how this is done within a catalog item form created in ServiceNow?

Thank you for the help!

8 REPLIES 8

JJ1
Kilo Guru

We have some scheduled scripts to use the catalog scripts API to automatically create ,requests and associated items,tasks which will have the associated workflow attached just like for requests created manually through portal.



Service Catalog Script API - ServiceNow Wiki


Order a Service Catalog Item from a Script - ServiceNow Wiki


nicholar
Kilo Contributor

Jeevan,



Thank you for the reply.



I'm pretty new to working with ServiceNow and I'm a little confused on to how I would implement this in a product that exists outside of ServiceNow...



Would I be creating a Business Rule or something else in ServiceNow in order to use the catalog script API? Or would this script somehow exist in my external application?



For instance could I do something along the lines of:


  • First, use the REST API to insert a request record
  • Then, trigger a script in ServiceNow to create a requested item and catalog request based on the request record inserted thru REST


Thank you!


Hi Anthony,



I do not think that these API's exist in external applications.The scheduled catalog creation done in my project is using scheduled scripts which runs within service


now.



Depending on your requirements for this Rest integration ,you may have to create multiple tables to write values in to and then trigger the catalog apis based on the value you write to the table.As you have said ,yes you can insert the records to some custom table using REST & then trigger the business rules to call the API's.



Here are some similar topics that I have found


Has any one implemented Service Catalog integration with other tools through Web services ?


Creating a request with REST API


Create a Request Item via script and sort the variables


nicholar
Kilo Contributor

Thank you, I will look into doing something like that.