Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Alternative fields for mapping in the REST Connector

anandshahgrange
New Contributor III
New Contributor III
Reference: REST Connector - CREATEACCOUNTJSON
 
We have a requirement where business needs Accounts created with Preferred Name when it is available.
If preferred name is not available, then we need to use First Name for provisioning new accounts.
 
I did not find any specific information regarding this in the Docs portal or forums.
 
How do I specify alternative fields for mapping in the REST Connector JSON for CreateAccount?
6 REPLIES 6

Vedanth_BK
Saviynt Employee
Saviynt Employee

Hi @anandshahgrange 

You can make use of the if-else condition to achieve your use case. Attaching a sample snippet below 

{\"field\": \"${(user.preferedFirstName) !=null? '+ user.preferedFirstName +':'+ user.firstname +'}}

Thank you  

Vedanth,

This solution is not working correctly. See the attached image.

 

 

IncorrectFirstName_Saviynt.png

{\"field\":\"${if(user?.preferedFirstName !=null){user?.preferedFirstName}else {user?.firstname}}\"}


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

anandshahgrange
New Contributor III
New Contributor III

Rushikesh,

Have you tested this solution?

This are standard if else condition in REST connector.

https://forums.saviynt.com/t5/identity-governance/if-else-in-rest-connection/m-p/62757#M38813


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

anandshahgrange
New Contributor III
New Contributor III

Ok. I will try it out then.