Hi All,
I need to send the identity status through description on ServiceDesk Integration. I have tried the below VTL but it throws an error like “Whitespace is missing”.
#if($request.operation == 'Create') Create Account on application $request.resource #elseif($request.operation == 'Delete') For $request.id in application $request.resource : Requested action from SailPoint : Delete Account #if ($request.arguments.comments), Comments : $request.arguments.comments #end #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 #if ($request.arguments.comments), Comments : $request.arguments.comments #end $newline #elseif ($item.name == '*disabled*' && $item.value == 'false') Requested action from SailPoint : Enable Account #if ($request.arguments.comments), Comments : $request.arguments.comments #end $newline #elseif ($item.name == '*locked*' && $item.value == 'false') Requested action from SailPoint : Unlock Account #if ($request.arguments.comments), Comments : $request.arguments.comments #end $newline #else $!item.Operation $item.name: $item.value #if ($item.arguments.comments), Comment from SailPoint : $item.arguments.comments #end $newline #elseif (!$plan.request.item.name.toString().contains('status')) Identity Status: #set(status=item.value)#end $newline #end #end
Any help will be appreciated.
Thanks
Shanthakumar
Hi Shantha,
Are you adding Identity Status in provisioning plan through before provisioning rule?
Thanks.
Hi @Santhakumar,
I’m not sure whether we can make use of $plan.request in the description VTL code snippet.
I have tried the below code snippet, when there a create request.
a. Avoid sending “[source]” suffix in the description after the source name using if($request.resource == 'App1 [source]') App1
b. send “ModelAfter” information instead of “Comment from SailPoint” in the description.
Check if this works?
- Try to see if the below syntax helps?
- Try to send only $request attribute to the RITM ticket description to identify what all attributes the SailPoint is sending to ServiceNow and from that you can able to identify whether you can achieve sending Identity status or not?
#if($request.operation == 'Create') Create Account on application #if($request.resource == 'App1 [source]') App1; #elseif ($request.resource == 'App2 [source]') App2; #else $request.resource; #end #elseif($request.operation == 'Delete') For $request.id in application $request.resource : Requested action from SailPoint : Delete Account #if ($request.arguments.comments), Comments : $request.arguments.comments #end #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 #if ($request.arguments.comments), Comments : $request.arguments.comments #end $newline #elseif ($item.name == '*disabled*' && $item.value == 'false') Requested action from SailPoint : Enable Account #if ($request.arguments.comments), Comments : $request.arguments.comments #end $newline #elseif ($item.name == '*locked*' && $item.value == 'false') Requested action from SailPoint : Unlock Account #if ($request.arguments.comments), Comments : $request.arguments.comments #end $newline #else $!item.Operation $item.name: $item.value #if ($item.arguments.comments),#if($request.operation == 'Create' && $request.resource == 'App1 [source]' || $request.resource == 'App2 [source]') ModelAfter: $item.arguments.comments #else Comment from SailPoint : $item.arguments.comments #end #end $newline #end #end #end
Thanks!