Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Passing the comments and justifications as an attribute for SNOW tickets

sundas7
Regular Contributor II
Regular Contributor II

Hi Team,

Our customer has a requirement to pass the comments and justifications from requests to pass through to the ServiceNow ticket.Around 2 years ago ,we had already  opened a ticket with Saviynt Support with Saviynt Support and we received a response that this is part of 6.1 roadmap plan.

So our customer would like to know if any enhancements are available around the same.

Do we now have any updates on the same?

We are still in 3.12.14

 

Thanks

Shyam

10 REPLIES 10

Sivagami
Valued Contributor
Valued Contributor

I believe this ideas ticket refers to the same issue you mentioned - https://ideas.saviynt.com/ideas/EIC-I-3376. 

Looks like the idea is accepted.

rushikeshvartak
All-Star
All-Star

Comments 

task.requestKey?.comments?.toString()

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

sundas7
Regular Contributor II
Regular Contributor II

Thank you Rushikesh and Sivagami for your responses.We are currently reviewing the link shared in Ideas portal and probably do a quick testing for passing the comments.

Since our DEV env is currently down, we are waiting to get it tested and will come back to confirm.

Thanks

Shyam

Rachana
New Contributor
New Contributor

Hi Team

We tried using below condition in createaccountJSON of servicenow connector but it did not work.

1. Could you please let us know if we are using the correct condition? 
2. How to find out saviynt attribute (ex: task.requestKey?.comments? ) for the specific field 
\\\\nComments              : ${if(task.requestKey!=null){task.requestKey?.comments?.toString()} else('')}

Darshanjain
Saviynt Employee
Saviynt Employee

Try with the below condition and see if its works

${task.requestKey==null?'':task.requestKey?.comments?.replaceAll('<.*?>','').replaceAll('\\n','').replaceAll('\\r','').replaceAll('[^ -~À-ÿ]+','').replaceAll(new String('XFw='.decodeBase64()),new String('XFxcXA=='.decodeBase64()))}

Hi @Darshanjain 

The above syntax is working fine if there is any comments , If  there is no comments in the request it is giving description as shown below. could you please suggest me the syntax to give null value if there is no comments

yamuna_0-1681342028091.png

 

Rachana
New Contributor
New Contributor

Hi @Darshanjain ,

Thank you for the reply. 

Could you please let us know if there is any possibility (syntax)to pass optional commnets field values from  Saviynt to ServiceNow.

Rachana_1-1677596406641.png

 




 

 

Hi @Rachana , Happy to hear that above solution worked, Please mark it as solution so that it will help others.

Coming to optional comments these are stored in request access table under each row ( based on entitlements raised ), you can try these ${requestAccessAttributes.comments} or ${accessItems.collect{it.comments}}. You need to replace these attributes in place of tas.requestkey.

HI @Darshanjain ,

We tried out following syntaxes to pass optional comments from saviynt to servicenow But it did not work. Could you please correct if we are using incorrect syntax.

\\\\nComments : ${task.requestKey==null?'':accessItems.collect{it.comments}.replaceAll('<.*?>','').replaceAll('\\n','').replaceAll('\\r','').replaceAll('[^ -~À-ÿ]+','').replaceAll(new String('XFw='.decodeBase64()),new String('XFxcXA=='.decodeBase64()))}

\\\\nComments : ${task.requestKey==null?'':requestAccessAttributes.comments.replaceAll('<.*?>','').replaceAll('\\n','').replaceAll('\\r','').replaceAll('[^ -~À-ÿ]+','').replaceAll(new String('XFw='.decodeBase64()),new String('XFxcXA=='.decodeBase64()))}




Hi @Rachana 

Right now this looks like it is not supported due to the fact that it is one to many mapping, Request key entry in request access table is multi compare to request table, right now it is not possible for optional comments to be passed under this.

If you still want it you can raise it in Ideas portal ( https://ideas.saviynt.com/ )

Thanks

Darshan