Can we pass display value for reference variable while submitting request via OOB API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 06:15 AM
Hello Team,
I am using the OOB Catalog API and sending the display value for a reference variable. For sys id it's working but not for display value, could you please suggest any solution.
Thanks,
Manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 06:19 AM
nope it won't work as per my understanding
1 way is to don't set that variable using Cart API or CartJS
Then use that display value to query the target table and then get sysId and then update the variable using GlideRecord
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 06:21 AM
another way is to use Scripted REST API and then handle the logic in it to get the sysId based on display value and then use Cart API or CartJS
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 07:24 AM
Thank Ankur for response okay so in this case we have use scripted rest API to handle this there is no way to pass display value in OOB API (Buy Item).