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

Account Entitlement Import REST

rituparna_pwc
Regular Contributor
Regular Contributor

we are trying to Import accounts using REST Connector. We are able to import accounts and entitlements from the response but unable to map accounts and entitlements. 

The designationcode key pair contains the entitlement value in Array .

Currently getting null pointer exception is accountentitlement mapping while running access import.

The CP 31 is stored as  

{"DesignationCodes":{"entIds":["YREBPIXXXXXXXSG:LEASING_MGR","YREBPIXXXXXXXSG:LEASE_MGMT"],"keyField":"entitlementID"}}

 how to map account with entitlement?

User API Response

{
    "Users": [
        {
            "EmployeeID""tchee",
            "EmployeeName""Tee Chee",
            "EmailAddress""TChee@test.com",
            "DesignationCodes": [Ent3,Ent4]
        },
        {
            "EmployeeID""thanks",
            "EmployeeName""Tom Hanks,
            "EmailAddress""tom.hanks@test.com",
            "DesignationCodes": [Ent1,Ent2]
        },
 
The entitlement import URL returns response as 
 
{
    "Designations": [
        {
            "DesignationCode""SaviyntTesting",
            "DesignationName""Dummy One for Saviynt testing",
            "DesignationDescription"""
        },
        {
            "DesignationCode""10032036",
            "DesignationName"" Test Approver Level 1",
            "DesignationDescription"" Test Approver Level 1 "
        }]

AccountImportJSON

{
"accountParams": {
"connection": "userAuth",
"includeExistingInActiveAccounts": true,
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://xxxx/webapistg/api/Saviynt/GetUserList",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "EmployeeID~#~char",
"name": "EmployeeID~#~char",
"status": "StatusCode~#~char",
"lastlogondate": "LastLoginTime~#~char",
"customproperty2": "DepartmentName~#~char",
"customproperty1": "EmployeeName~#~char",
"customproperty4": "EmailAddress~#~char",
"customproperty5": "MobileNumber~#~char",
"customproperty6": "DesignationCodes~#~char",
"customproperty7": "StatusCode~#~char",
"customproperty8": "Country~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}

}
},
"acctEntMappings": {
"Designations": {
"listPath": "Designations",
"idPath": "",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Designations": {
"entTypeOrder": 0,
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://xxxx/webapistg/api/Saviynt/GetDesignationList",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Designations",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "DesignationCode~#~char",
"entitlement_value": "DesignationCode~#~char",
"displayname": "DesignationCode~#~char",
"description": "DesignationName~#~char"
},
"disableDeletedEntitlements": true

}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
1 REPLY 1

rituparna_pwc
Regular Contributor
Regular Contributor

This JSON worked

 

{
"accountParams": {
"connection": "userAuth",
"includeExistingInActiveAccounts": true,
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "xxxxx/webapistg/api/Saviynt/GetUserList",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "EmployeeID~#~char",
"name": "EmployeeID~#~char",
"status": "StatusCode~#~char",
"lastlogondate": "LastLoginTime~#~char",
"customproperty2": "DepartmentName~#~char",
"customproperty1": "EmployeeName~#~char",
"customproperty4": "EmailAddress~#~char",
"customproperty5": "MobileNumber~#~char",
"customproperty6": "DesignationCodes~#~char",
"customproperty7": "StatusCode~#~char",
"customproperty8": "Country~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}

}
},
"acctEntMappings": {
"Designations": {
"listPath": "DesignationCodes",
"idPath": "",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Designations": {
"entTypeOrder": 0,
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://xxxxx/webapistg/api/Saviynt/GetDesignationList",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "Designations",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "DesignationCode~#~char",
"entitlement_value": "DesignationCode~#~char",
"displayname": "DesignationCode~#~char",
"description": "DesignationName~#~char"
},
"disableDeletedEntitlements": true

}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}