Click HERE to see how Saviynt Intelligence is transforming the industry. |
03/06/2024 08:18 AM
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.
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 path: empInfo/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,
03/06/2024 08:46 AM
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.
03/15/2024 05:02 AM
Hello @Amit_Malik,
After investigating, our mapping was working but we forgot to import the emailType.
Thank you,
03/17/2024 06:46 PM
Please share working configs