Service Catalog Variables via 3rd Party Application REST API

Jonah Piascik
Tera Expert

Looking for some design advice for using a 3rd-party REST API to derive service catalog variable choices.  Requestor will enter request via ServiceNow Service Portal, but variable choice values will be sourced by 3rd party application.  We are currently updating sys_choice entries now as that data changes in the 3rd party application.  Wonder if others were able to accomplish this level of integration and how.  I was just reading up on remote tables, which looks like it may be a viable option here?

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

Remote tables does not store data like actual tables.

If you query remote table, you will be seeing new data every-time as per your remote table definitions.

Servicenow has REST API which can be consumed by 3rd party applications.This way your choice list values will be dynamic. But, remember that you may have different data types of variables apart from choice list.

All service catalog variable definitions are stored in item_option_new table.

You should configure scripted REST API since you will have handle all variable data types and ask 3rd party to call this REST API.

 

REgards,

Sachin

 

Thanks @sachin.namjoshi - I think you are correct in that this would not necessarily be a good use-case for a remote table.  We do want to reuse these choices for a handful of catalog items though, so they need to be shared.  I wonder if maybe using a variable in a variable set and then setting the options in item_option_new table would meet that need.  Maybe that would be a cleaner approace?  I don't think the 3rd party application has any hooks/entry points where we could trigger a call outbound into ServiceNow as events occur (these lists change), so I think my best approach maybe to have a scheduled integration in ServiceNow that makes the calls into the 3rd party REST API to pull the data and process on a regular interval.

If you want to share variables across catalog items, then you should think of configuring variable sets.

But, still variables inside variable sets will be maintained in item_option_new table.

Instead of scheduled job to push variable definitions, i will suggest you to make it more dynamic and configure flow using flow designer based on event( new variable creation, existing variable updates) and push outbound call using REST API from servicenow to 3rd party.

 

Regards,

Sachin

Thanks @Sachin - I'm not sure what event would be triggered on the ServiceNow side for this to fire off of when the updates are being made on the 3rd Party Application.  That's why we'd likely be doing a scheduled job on a regular interval.  I guess we could put in another service catalog item or a UI action somewhere that we could manually trigger when the admin on the other application makes updates, but that seems like more manual effort and prone to missing an update.