Service Catalog REST API - How to Pass Requested For Field - Ebonding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 12:23 PM
I am attempting to use the Service Catalog - Add to Cart, and Checkout APIs to ebond two instances. Essentially, a user will fill out a Service Catalog Request, it gets submitted into one instance (REQ and RITM) Then if the RITM needs ebonded, an Assignment Group is triggered to initiate the ebond, builds a JSON file and then runs the Add to Cart and Checkout APIs.
This is all working, except I cannot seem to get the Requested For field to populate on the REQ and RITM on the second instance. I've tried with Display Name, sys_id (from the second instance) and nothing works. I must not be building it properly in my JSON. Does anyone have any ideas?
Example JSON:
{"sysparm_quantity": "1","requested_for":"ba571269137ad7c063fe7d176144b0f4","variables":{"requested_for":"ba571269137ad7c063fe7d176144b0f4","u_on_behalf": "No","u_action_requested": "Citrix Application Access - Add","u_description": "TEST","user_name": "TEST_USER","first_name": "TEST","last_name": "TEST","u_site_address": "TEST","u_site_name": "TEST","u_department": "4edd930b13e292009f84b6246144b08c","u_speedchart": "TEST","u_set_id": "TEST"}}
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 12:40 PM
Hi Pat,
The requested_for field is a reference to sys_user table.
First validate the requested_for user details in both the instances are same (Having same sys_id or not), if not it is the reason.
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful if it helps)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 12:43 PM
Correct. I was thinking that when I add the item to the cart, that I could specify the Requested For. I have tried passing in the Display Value and/or the sys_id of the target instance.
I'm thinking that once the REST APIs are run, that I need to collect the Ticket Numbers that it creates, THEN run an Update Table API to fill in the rest. Is this the correct approach or is there an easier way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 01:15 PM
Just to clarify, I was attempting to pass the sys_id of the request for in the Target Instance (hard coded to test).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2018 10:34 PM
Hi Pat,
Approach is valid. Please go ahead and share the result.
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful if it helps)