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

Issue in Successfactor API

SaiKiran
New Contributor
New Contributor

Hi Team,

We have a SuccessFactors integration to reconcile the users for provisioning. In which we mapped a customproperty as below.

"customproperty40": "emplStatusNav.picklistLabels.results[0].label~#~char",

We used to have english value in the above field (results[0]) . other results are in different languages upto result[10].

Now SuccessFactors is upgraded and after that english value is being rotated between results[0] to results[10] and it is not fixed. We need to reconcile the english value only. Below is the two sample results from postman 

{
"__metadata": {
"uri": "https://*url*/odata/v2/PicklistLabel(locale='sv_SE',optionId=31139L)",
"type": "SFOData.PicklistLabel"
},
"label": "Aktiv"
},
{
"__metadata": {
"uri": "https://*url*/odata/v2/PicklistLabel(locale='en_US',optionId=31139L)",
"type": "SFOData.PicklistLabel"
},
"label": "Active"
}

Can you please advice.

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

"customproperty40": "emplStatusNav.picklistLabels.results[10].label~#~char",


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

SaiKiran
New Contributor
New Contributor

Hi Rushikesh,

In results[10] also english value wont be there. It is random in between 0 to 10.  

Use if else / ternary operation using #CONST and validate if 0 is null then go 1 till 10


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

Hi Rushikesh,

Thank you for the reply, we have used #CONST and tried importing the data. Job ran for 1 hour and failed with below error

"Error in Users Import - Error while processing data: Data truncation: Data too long for column 'CUSTOMPROPERTY1' at row 1"

Please find the mapping which we updated 

"customproperty1": "#CONST#${List accounttype=response.employeeClassNav.picklistLabels.results; int count=0; int size=accounttype.size(); Iterator iterator=accounttype.iterator(); while(iterator.hasNext()){count++; Map dataMap = iterator.next(); if(dataMap.__metadata.uri.contains('en_US')){return dataMap.label}else if(count==size){return null}}}~#~char",

"customproperty40": "#CONST#${List empStatus=response.emplStatusNav.picklistLabels.results; int count=0; int size=empStatus.size(); Iterator iterator=empStatus.iterator(); while(iterator.hasNext()){count++; Map dataMap = iterator.next(); if(dataMap.__metadata.uri.contains('en_US')){return dataMap.label}else if(count==size){return null}}}~#~char",

Could you please suggest.

Raghu
Honored Contributor
Honored Contributor

@SaiKiran  try use map cp60 check

"customproperty60": "#CONST#${List accounttype=response.employeeClassNav.picklistLabels.results; int count=0; int size=accounttype.size(); Iterator iterator=accounttype.iterator(); while(iterator.hasNext()){count++; Map dataMap = iterator.next(); if(dataMap.__metadata.uri.contains('en_US')){return dataMap.label}else if(count==size){return null}}}~#~char",

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.