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

SuccessFactor connector - Retrieve email address

ayane_ahmed
New Contributor II
New Contributor II

Hello All,

We need to import into Saviynt the user's email from SuccessFactor using the REST Connector. Some users have 2 email addresses and we need to only import the first one (@no-reply.com and with email type = 1).

The issue we are facing is that the email address imported is changing with every import. On one import, the first email address is imported and on the next import, the second email address is imported.

ayane_ahmed_1-1709741831918.png

We tried to specify the email Type, to only import the email address with email type at 1 but we are imported an empty value.

API call pathempInfo/personNav/emailNav/emailAddress

Mapping: "email":"#CONST#${List responseList = response.empInfo.personNav.emailNav.results; int count = 0; int size = responseList.size(); Iterator iterator = responseList.iterator(); while (iterator.hasNext()){count++; Map dataMap = iterator.next(); if('1'.equals(dataMap.emailType)){return dataMap.emailAddress}else if(count == size){return null}}}~#~char",

Can anyone help ?

Thank you.

Regards,

3 REPLIES 3

AmitM
Valued Contributor
Valued Contributor

Hi @ayane_ahmed , when you use emailType =1 , have you checked in postman that API only gives one email ID or null.

You can also get both email ID in CP using #~listAsString. This will bring both emails comma separated and use in line preprocessor to cut out the one you need in email.

Thanks,

Amit

If this answers your query, Please ACCEPT SOLUTION and give KUDOS.

 

ayane_ahmed
New Contributor II
New Contributor II

Hello @AmitM,

After investigating, our mapping was working but we forgot to import the emailType.

Thank you,

Please share working configs


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