Best Approach to Submit a Complex Service Catalog Request via REST API from a Third-Party Applicatio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi,
I have a requirement to integrate a third-party application with ServiceNow to submit a service catalog request through an API.
We already have an existing catalog item in ServiceNow with more than 50 variables. Several variables have validations and dependencies on other variables. The catalog item also contains reference variables, choice variables, and fields whose values are populated dynamically based on the selections made in other variables.
For example:
Some variables are reference fields that need to be validated against existing ServiceNow records.
Certain variables depend on the values selected in other variables.
Some fields should be populated dynamically based on previous selections.
Mandatory fields and business validations must be handled before submitting the request.
The requirement is that when a user submits the form from the third-party application, the corresponding catalog request should be created in ServiceNow with all the required variable values populated correctly.
I would appreciate your guidance on the following questions:
Is it recommended to use the ServiceNow Service Catalog API, or should I develop a custom Scripted REST API for this requirement?
How can I handle variable dependencies, reference-field validation, mandatory fields, and other catalog item validations when submitting the request through an API?
If I use a Scripted REST API, what is the recommended approach to validate the incoming payload and submit the catalog item while ensuring that existing catalog item logic is respected?
Is there a recommended way to handle a large number of variables without writing separate validation logic for every variable?
Any guidance, best practices, or examples would be greatly appreciated.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
This will nearly be impossible (depending on the 3rd party application of course). If they can give you any choice, you need to figure it out on your side and that will be hard. The API will not respect the form logic, because that's probably set through the UI. Or it will be left empty.
I think your questions will only be answered when we know more about what exactly that app is doing.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
