I want to populate more fields like manager,uid,department …etc in RITM.
And im trying to add more fields in service desk configuration and get the value, However fields are getting created but value is not getting populated.
Trying to get value from plan like below
$!plan.arguments.manager
$!plan.arguments.uid
Please let me know if we have any other way to get values.
By default, Manager and other fields are not part of provisioning plan. There are multiple ways you can achieve that:-
BeforeProvisioningRule :- Write a BeforeProvisioningRule to add arguments with fields such as manager, department, etc
Make use of Create Account Profile:- You don’t have to necessarily extend the schema of the source just add values in Create Account Profile for the Identity Attributes such as Manager, Department, Etc and write the Velocity Templating Code to get the value.
For Example:-
#foreach($req in $plan.requests)
#if($req.items)
#foreach($item in $req.items)
#if($item.name == 'Department')
$item.value
A note that I assume you’re using ServiceNow, which maybe I’m incorrect
@saikumar39 alternatively you could query those attributes from the servicenow workflow and then populate the variables
ETA: Are you not sending the ServiceNow sys_id of the user in the requested_for field? That should have manager and UID information in the ServiceNow sys_user table, does it not?
hey guys, would it be possible to extract the role or access profile name from the provisioning plan by any means and then put inside the RITM ticket fields?
Since the “trackingNumber” is provided, you can look up the account activity from the ServiceNow workflow and extract that information. The trackingNumber maps to the account activity Id
The script that processes the request creates a new cart and adds a new RITM for each item in the request body.
var req={};
for (var i=0; i<requestedItems.length; i++) {
var itemDetails = requestedItems[i];
var itemId = itemDetails.sysparm_id;
// When true, webservice will return RITM number instead of REQ number in the response.
if (itemDetails.variables.track_ritm == "true") {
x_sap_sdim.SailPointForServiceDeskLogger.get().debug("track_ritm is set to true." );
returnRitm = true;
}
cart = new sn_sc.CartJS(cartId);
try {
var item = cart.addToCart(itemDetails);
} catch (err) {
var error_message = err.message;
x_sap_sdim.SailPointForServiceDeskLogger.get().error("Error Occured: " + error_message);
throw "Ensure valid catalog items details provided for catalog item: " + itemId;
}
x_sap_sdim.SailPointForServiceDeskLogger.get().debug("SailPoint Cart Js API - Create Ticket: Added catalog item with sys id ["+ itemId + "] to the cart.\n\nItem Details" + JSON.stringify(itemDetails));
}
// Perform the cart checkout simultaneously.
rc = cart.submitOrder(req);
You’ll notice the tracking_id variable is included in this, meaning the tracking number variable is populated when the request is submitted
The workflow is configured to only create a single SCTASK per RITM (screenshot below). I haven’t seen it in practice, but I would assume it would create a separate RITM for each source action required.