Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

REST Connector - getting an array object to map to the saviynt attribute

JasmeenB
New Contributor II
New Contributor II

Hi,

We have a requirement to map the identifierID when the Identifier type is "MDR_JDE_EI_ID" or "MDR_SAP_GLOBAL_NBR" else take person number as id.

example: here since the type is "MDR_SAP_GLOBAL_NBR", i need to take 149541 as ID.

{
    "items": [
        {
            "PersonId"xxx,
            "PersonNumber""504648",
                   
            "externalIdentifiers": [
                {
                    
                    "ExternalIdentifierNumber""2408E",
                    "ExternalIdentifierType""MDR_BADGE_NBR",
                                        "AssignmentNumber"null
                },
                {
                    "ExternalIdentifierNumber""149541",
                    "ExternalIdentifierType""MDR_SAP_GLOBAL_NBR",
                   
                },
                
I have tried below. but it is not working.

"customproperty1": "${List responseList = response.items.externalIdentifiers.results; int count = 0; int size = responseList.size(); Iterator iterator = responseList.iterator(); while (iterator.hasNext()){count++; Map dataMap = iterator.next(); if('MDR_JDE_EI_ID'.equals(dataMap.ExternalIdentifierType)){return dataMap.ExternalIdentifierNumber}else if ('MDR_SAP_GLOBAL_NBR'.equals(dataMap.ExternalIdentifierType)) {return dataMap.ExternalIdentifierNumber}else if(count == size){return null}}}~#~char",
 
any pointers will be helpful
3 REPLIES 3

Rishi
Saviynt Employee
Saviynt Employee

@JasmeenB we are reviewing this question and will provide an update soon.

JasmeenB
New Contributor II
New Contributor II

Hi team,

Any pointers are really appreciated .

saikanumuri
Saviynt Employee
Saviynt Employee

Hi Jasmeen,

Can you please help me understand how are you getting the identifier type, if you are currently storing the identifier type in of the attributes or making multiple calls(where call1 is giving you the identifier type which you are referencing in the call2)?