- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Community,
I’m trying to figure out the best way to create multiple Requested Items (RITMs) from a single Catalog Item submission.
Use case:
We have one catalog item with several checkboxes. (It Systems, Information Security, Finance)
When the form is submitted, I want a separate RITM created for each selected checkbox.
Each RITM should contain the same variable values, but be assigned to a different group depending on which checkbox was selected.
All RITMs should roll up under the same REQ, and ideally be displayed on their own tabs within the request.
What I’ve tried so far:
Order Guides → but we want this to happen without extra clicks or navigating to multiple screens.
Cart APIs → I’ve tested a few approaches but haven’t been able to get them working for this use case (maybe I’m not setting them up correctly).
Workflow → I have a workflow triggered when the catalog item is submitted that checks each checkbox, but I don’t know how to branch it into separate RITMs.
Custom Action → I tried adding a custom action, but it doesn’t seem to show up as an option when I go to use it.
Has anyone successfully implemented this pattern before? My main focus is to drive this through Flow Designer. We have not implemented multiple RITMs in our environment before.
Any best practices, code samples, or pointers would be hugely appreciated.
Thanks
Philip H
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
I wanted to share the solution I was able to build in Flow Designer without using any custom actions or scripting.
I started with a Service Catalog trigger, then used Get Catalog Variables to retrieve the specific variables I needed.
To associate multiple RITMs with the REQ, I added a Look Up Record on the sc_request table to retrieve the Sys ID of the parent request.
From there, I applied If / Else If conditions based on the catalog variable checkboxes:
If IT Systems is true → update the primary Request Item record.
If Finance is true → create a Request Item record.
If Information Security is true → create a Request Item record.
For the Else If conditions:
If Information Security is true and IT Systems is false → update the primary Request Item.
If Finance is true → create a Request Item record.
For the final Else condition:
If IT Systems is false and Finance is true → update the primary Request Item.
If Information Security is true → create a new Request Item record.
Finally, I used an Update Request Record step.
The tricky part was ensuring that updates to the REQ didn’t wipe out values when non-primary RITMs were being updated (since the primary has the flow context attached to it). My workaround was to use the Look Up Trigger Service Catalog Request Item record to pull values from there.
Attempting to populate the REQ directly from the catalog variables would cause errors, but pulling them from the trigger record worked reliably.
I hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@phugill Order guide gives user the capability to select the variable while submitting the catalog items.
Since all variables should have same variable value, you can easily use cart APIs, what issue are you getting while using CART APIs?
Are you write cart API code in workflow script? Can you share your script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have written blog for this, you can refer that and enhance, it uses Cart API, but you can enhance it to use CartJS
Multiple RITMs in same Request Using CartAPI
CartJS links
Understanding sn_sc.CartJS() in ServiceNow: Its Importance and Use Cases
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