Need help with Accounts Import where one account is having multiple emails

draut
New Contributor II
New Contributor II

Hi Team,

We have a case in REST-based response, where one account is having multiple emails and wanted to store those emails in separate account attributes. 

Example :

{
"data": [{
"id": 1,
"emails": [{
"id": 10854,
"email": "abc@xyz.com"
},
{
"id": 10853,
"email": "def@mno.com"
}
],
"name": "John",
"personId": 7641,
"isActive": true
},
{
"id": 2,
"emails": [{
"id": 10856,
"email": "def@xyz.com"
},
{
"id": 10855,
"email": "ghl@mno.com"
}
],
"name": "Dale",
"personId": 2545,
"isActive": true
}]
}

Is there any way to store these two emails in two different custom attributes?

Regards,

Dheeraj

4 REPLIES 4

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @draut 

Yes, it is possible to import the emails into separate custom attributes in Saviynt. When importing, ensure that there are two distinct attributes available to store the emails.
Note:- Email in the application must be in separate attributes like in the below sample there are two separate emails i.e. email1 and email2.then only it would be possible, else it will overwrite.

Sample:

    },
        "listField": "",
        "keyField": "accountID",
        "nextApiKeyField": "accountID",
        "colsToPropsMap": {
          "accountID": "id~#~char",
          "name": "username~#~char",
          "customproperty1": "emailId1~#~char",
          "customproperty2": "emailId2~#~char",
          "customproperty3": "company~#~char",
          "customproperty4": "timezone~#~char",
          "customproperty5": "defaultEndpoint~#~char",
          "customproperty6": "lastLogin~#~char"
        }
      }
    }
  }
}

Thanks.

For Ref :- https://docs.saviyntcloud.com/bundle/REST-v55x/page/Content/Developers-Handbook.htm 

vivekmohanty_pm
Saviynt Employee
Saviynt Employee

@draut You can map the two emails to two different customproperty by using the following mapping - 

....
....
"customproperty6": "#CONST#${response.emails[0].email}~#~char",
"customproperty7": "#CONST#${response.emails[1].email}~#~char",
....
....

Thanks, 

It is working, I am able to store both emails in different attributes.

Regards,

Dheeraj

vivekmohanty_pm
Saviynt Employee
Saviynt Employee

great!