- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2024 06:31 AM
Hi , I am trying to create a service catalog request in ServiceNow using a json file. I can create a request in service catalog by using the json file created by the ServiceNow by using the network tab in chrome. But i got a json file which is created in diffrent API, that json file contain different attributes with different and new field. So if i have to create a service Catalog by using json file how can i do it ? Do I have to create a variable set for the service catalog request form?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2024 08:56 PM
@NeethuB You would need to write a script include (a server side script) to process the response received from the third party API. You can use JSON.parse() method to convert JSON string to an object in Javascript and use dot walking to access different properties/attributes. For more information on JSON parsing please refer to https://www.servicenow.com/community/developer-blog/json-parsing/ba-p/2279166
After JSON parsing, you can create the request via script with the help of CartJS API. please refer to https://www.servicenow.com/community/itsm-articles/creating-a-service-request-using-service-catalog-... to know how you can create request via script.
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2024 08:56 PM
@NeethuB You would need to write a script include (a server side script) to process the response received from the third party API. You can use JSON.parse() method to convert JSON string to an object in Javascript and use dot walking to access different properties/attributes. For more information on JSON parsing please refer to https://www.servicenow.com/community/developer-blog/json-parsing/ba-p/2279166
After JSON parsing, you can create the request via script with the help of CartJS API. please refer to https://www.servicenow.com/community/itsm-articles/creating-a-service-request-using-service-catalog-... to know how you can create request via script.
Hope this helps.