How to insert row in Multi Row Variable Set when using SNC.ScriptableOrderGuide through REST API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2023 09:47 PM - edited 01-10-2023 09:50 PM
Hello Everyone -
I am hoping someone here might be able to shed some light on a problem that I am just not able to find a neat solution for.
We currently have a requirement to utilize a Scripted REST API to submit an order using an order guide as part of an integration with a 3rd party application.
For single user requests this was pretty straight forward. We were able to successfully utilize the SNC.ScriptableOrderGuide from the servicenow provided documentation to script out the process and submit the order.
The issue I cannot seem to find a workaround for is in the case when an order is submitted for multiple users.
Normally, if the order were being submitted by an end user via the portal we would simply provide a Multi Row Variable set which would allow them to fill out the needed information (Userid, First Name, Last Name, Email, & Phone) for the various users.
Unfortunatey, I am unable to find a way to add/insert rows and variable values into the variable set either before the order is submitted or after the fact utilizing a scripted REST API.
Tried Populate Variable Set Variables via REST API - Seems to be designed when using the OOTB Submit Order Table API. Does not seem to be usable when submitting an order via a script.
Tried doing it after the fact with".addrow()", referenced in Scripting the Multi-row Variable Set - Again only seems to work when executing the script in a BEFORE Business Rule prior to the request being saved to the database.
Other sources I have checked seem to imply that this is simply not possible and is a known limitation of trying to use an order guide via a REST API.
If anyone has any ideas on how we might be able to meet this need, I would very much appreciate the assistance.
Thanks!