Populate more fields like manager,uid in RITM using servicedesk config

Hi Team,

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.

Thank you,
Saikumar

Hi @saikumar39,

By default, Manager and other fields are not part of provisioning plan. There are multiple ways you can achieve that:-

  1. BeforeProvisioningRule :- Write a BeforeProvisioningRule to add arguments with fields such as manager, department, etc

  2. 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?

1 Like

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?

Yes, but not in the exact way you were asking.

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

1 Like

tracking Number will come from SailPoint mapping or we need to set it up from ServiceNow side?

What we observe, We are seeing trackingNumber when we configure RITM.
But When we configure with REQ ,Not able to get tracking Number in servicenow.

REQ does not have variables to populate, the RITM does.

Hi Mark,

Need small info.

We have integrated ServiceDesk with SailPoint and were able to create request with RITM and RITM contains SC task.

We just want to know in what scenarios Multiple SC tasks will be created under RITM.

Thanks,
Saikumar

I know nobody asked, but I figured I could explain a bit more how this works on the ServiceNow side.

This is what an example request body looks like coming into ServiceNow from IdN

{
    "items": [
        {
            "variables": {
                "short_description": "SailPoint Access Request 5810690627ab4e84a82cca74bc9e8e68",
                "assignment_group": "\n\n245ef8541b7dbb009a4f33fccd4bcba7\n",
                "opened_by": "Default_ServiceNow_Account_Sys_ID",
                "req_description": "Service Request created by Service Desk Integration Module (SIM)",
                "description": " For mwilliams6 in application Enertia [source] \n Remove Role: Voyeurs - FBS Security \n ",
                "requested_for": "bc6f056e1bdee700275276e1dd4bcbed",
                "tracking_id": "5810690627ab4e84a82cca74bc9e8e68"
            },
            "sysparm_id": "8053818edbffb300e90690b3db9619c4"
        }
    ]
}

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.

The task takes the assignment_group variable value from the RITM and sets the assignment group on the SCTASK to that Id

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.