Passing Request Comments on Service Desk Integration

We are using the ootb Service Desk Integration capabilities in IdentityNow. The integration is working, but we added a field in order to pass the request comments. If we hard code something in this field, it passes through. Unfortunately, we have been unable to identify the variable it wants in order to pass the request comments. We have tried a lot of different things and nothing seems to be working. Here are some examples, but not all, that have been attempted:

  • $request.comments
  • $request.requesterComments
  • $requesterComments
  • $plan.comments
  • $!plan.comments
  • $!plan.arguments.comments

We’ve also tried putting it in {}. We can confirm that $request.resource does work, so we thought it would be simple enough to grab comments if there are other things from the request that work.

This is the integration I am referring to:
https://documentation.sailpoint.com/connectors/servicenow/sdim/help/integrating_servicenow_sdim/intro.html
We don’t need help on the integration itself. Just what the variable it wants for the Request Comments.

Thank you in advance!

Hi Jill.

Is your request related to this idea? https://ideas.sailpoint.com/ideas/GOV-I-2174

Hi Jill,

I suggest you to test using variable as : $item.arguments.comments and it should work fine.
Here is the snippet for your reference, which displays comment:

#if($request.operation == 'Create') Create Account on application $request.resource #else For $request.id in application $request.resource #end #if ($request.items) $newline #foreach ($item in $request.items) #if ($item.name == '*disabled*' && $item.value == 'true') Requested action from SailPoint : Disable Account $newline #elseif ($item.name == '*disabled*' && $item.value == 'false') Requested action from SailPoint : Enable Account $newline #elseif ($item.name == '*locked*' && $item.value == 'false') Requested action from SailPoint : Unlock Account. $newline #else $!item.Operation $item.name: $item.value #if ($item.arguments.comments), Comment from SailPoint : $item.arguments.comments #end $newline #end #end #else $newline $!request.Operation Account #end

Let me know if this helps.

Thanks much!

It does seem related. I’ve voted for the idea. Thank you!

1 Like

Thank you Pooja for your suggestion. I attempted your solution and it did not return the request comments. I’m wondering if it works for you because you have a before provisioning rule (Customize Ticket Fields)? I’m beginning to think we can’t pass request comments without a before provisioning rule.

Hi Jill,

That’s strange, the one I mentioned works for me.

May I know how you are testing it and which ticket type you are using.
Just to mention, you need to replace the value which I have provided with existing description field value, and the comment passed on access request would be visible as part of description on ServiceNow ticket.

You will not require any additional field to populate comment, if that’s how you want to do it then test using below snippet:

#foreach($req in $plan.requests)#if($req.arguments.comments)Comment from SailPoint is : $req.arguments.comments#end#if($req.items)#foreach($item in $req.items)#if($item.arguments.comments)For $item.name : $item.value$newline Comment from SailPoint is : $item.arguments.comments$newline#end#end#end#end

Just replace your comment field value with one I provided above and it should work.
If you still face any issues then please open support case.

Let me know if this helps.

Thanks much!

The best way to troubleshoot these issues is to print whole object. try printing $item.arguments instead of specifically mentioning comments and then see if comments are part of that map. If they are not part of that map you will not be able to refer those.

problem with arguments is they are not visible in search logs under provisioning plan so it gets somewhat difficult to troubleshoot.

Can you just post the whole $plan object? I modified the ServiceNow REST Endpoint to print the request payload to the log so I can see everything.

I’m currently waiting for a remediation task to be created from a certification, but apparently my tenant is busy doing lots of other important tasks, so I suppose I’ll check back in an hour or so :triumph:

I added this additional line to the scripted REST endpoint to see what’s actually being sent to ServiceNow. It helps see the structure of things being sent

Pooja,

I copied your snippet and put it in my comments field in the Ticket Creation section and it still did not pass the request comments.

Integration Type: ServiceNow SDIM
Ticket Type: Service Request

I’m attaching a picture of the configuration as it was when I just tested your snippet. If I hard code something in the comments field, it passes through to ServiceNow. To validate that it’s working, I submit a new request for an Access Profile, and I add comments before submitting. Then I am logging into ServiceNow, opening the Request, then the Request Item and looking at the variables passed. When I use your snippet, the comments come across as blank. If I hard code something in the configuration for comments, that value passes through in the variables on the ServiceNow side.
ServiceDeskConfig

Hi Chirag,

I tried the below value, and it came across as blank.

#if ($item.arguments) Comment from SailPoint : $item.arguments #end

Hi Mark,

When I attempt to print the $plan or $request, the results just printed these values:

  • openconnector.Plan@465fc39c
  • openconnector.Request@66b54db9

I’m not entirely familiar with Velocity templates…can you tell me how you printed the actual $plan using the Velocity templates?

I had the same issue as you. I’m currently just trying to pass different velocity variables and see how they evaluate. It’s a big guessing game for me since there’s not great documentation on what information is actually available in the provisioning plan object.

1 Like

@jroozeboom I’m not 100% sure if this will help because you’re using this for requests from request center and I’m using this for certifications (we use ServiceNow as the front-end for requests), but for requests that come from request center, the Account Activity that is generated contains the comments and other information you might need. If you include $plan.arguments.identityRequestId in a variable, you can use that to have ServiceNow query the account activity (since the account activity ID = $plan.arguments.identityRequestId) and grab that information

image

image

1 Like

Hi Jill,

Thanks for confirming the Integration Type and Ticket Type information.
I would suggest you to raise support case so that we can assist you further in better way.

Thanks much!

I have put a ticket in with Sailpoint, however, I discovered new information today that might be helpful for others:

After seeing the below in the release notes, I did some additional testing. I have determined that comments are available for Entitlement Requests, but not on Access Profiles or Role requests. If I get any helpful information from my Sailpoint ticket, I will add the information here.

Connectivity - SIM - ServiceNow

The ServiceNow Service Desk Integration Module now populates the Access Request comment on the ServiceNow ticket.

1 Like

@jroozeboom , even we are trying to achieve the same from our end. Please update here if you received a response from SP support team that helped in fetching the comments in SNOW ticket. Thank you!

I tried to dig deeper in this and looks like this is not possible as of now because the comments put in by requestor are put in masterplan and not the provisioning plan passed to integration. That is the reason below code block is not working to get comments which was shared in earlier discussion.

#foreach($req in $plan.requests)#if($req.arguments.comments)Comment from SailPoint is : $req.arguments.comments#end#if($req.items)#foreach($item in $req.items)#if($item.arguments.comments)For $item.name : $item.value$newline Comment from SailPoint is : $item.arguments.comments$newline#end#end#end#end

It was confirmed today that the Service Desk Integration is not getting the comments passed from IDN for access profile and role requests. We captured a bunch of logs, and the provisioning plan in IDN that showed the comments. They will be working with the IDN integration team to understand why those comments aren’t being passed. I will post here when there is a resolution / decision.

Thank you @jroozeboom for the update.

Hi, we have the same issue as Jill. Can you post when there will be a solution to this?