Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/17/2024 08:49 AM - last edited on 06/17/2024 10:11 AM by Dave
I have removed the extra data from the API respone.
06/17/2024 10:21 AM
Hi @Vipul , do you want to store the primary account value or can you elaborate more on the use of primary contract?
06/18/2024 06:18 AM
Hi,
With every contract, we will get certain other details as well, such as department, company ID,start date, etc. So once we have identified which contract is primary, we will use the associated details to update the user attribute in Saviynt.
The below API response has 3 contracts, and every contract has other values associated with them:
1st contract (userId=25300587)
2nd contract (userId=25300589)
3rd contract (userId=25300593)
{
"d": {
"results": [
{
"__metadata": {
"uri": "....",
"type": "SFOData.EmpEmployment"
},
"personIdExternal": "25300587",
"userId": "25300587",
"endDate": null,
"lastDateWorked": null,
"startDate": "/Date(1716249600000)/",
"jobInfoNav": {
"results": [
{
"__metadata": {
"uri": "....",
"type": "SFOData.EmpJob"
},
"seqNumber": "1",
"userId": "25300587",
"startDate": "/Date(1716249600000)/",
"businessUnit": "GHCD01",
"company": "GB101",
"managerId": "15000147",
"departmentNav": {
"__metadata": {
"uri": "....",
"type": "SFOData.FODepartment"
},
"externalCode": "GB638",
"name": "Advisory & Restructuring"
}
}
]
}
},
{
"__metadata": {
"uri": "....",
"type": "SFOData.EmpEmployment"
},
"personIdExternal": "25300587",
"userId": "25300589",
"endDate": null,
"lastDateWorked": null,
"startDate": "/Date(1716249600000)/",
"jobInfoNav": {
"results": [
{
"__metadata": {
"uri": "....",
"type": "SFOData.EmpJob"
},
"seqNumber": "1",
"userId": "25300589",
"startDate": "/Date(1716249600000)/",
"businessUnit": "GHCF01",
"company": "GB109",
"managerId": "15003416",
"departmentNav": {
"__metadata": {
"uri": "...",
"type": "SFOData.FODepartment"
},
"externalCode": "GB666",
"name": "Restructuring"
}
}
]
}
},
{
"__metadata": {
"uri": "...",
"type": "SFOData.EmpEmployment"
},
"personIdExternal": "25300587",
"userId": "25300593",
"endDate": null,
"lastDateWorked": null,
"startDate": "/Date(1716249600000)/",
"jobInfoNav": {
"results": [
{
"__metadata": {
"uri": "...",
"type": "SFOData.EmpJob"
},
"seqNumber": "1",
"userId": "25300593",
"startDate": "/Date(1716249600000)/",
"businessUnit": "GHCD21",
"company": "GB102",
"managerId": "15004552",
"departmentNav": {
"__metadata": {
"uri": "....",
"type": "SFOData.FODepartment"
},
"externalCode": "GB938",
"name": "Advisory"
}
}
]
}
}
]
}
}
06/18/2024 06:20 AM
You need to have some flag to identify primary
06/18/2024 07:56 AM
We have a table (SecondaryAssignment), which gives us all the secondary contracts of the users.
So to determine the primary contract, we can subtract the contracts that we get from the SecondaryAssignment table from all the contracts that we get from the SF1 API call. But I am not sure how to do it in JSON or if there is any other way of doing it.
Right now, there is no other way of determining the primary contracts apart from referring to the secondary assignment table.
06/18/2024 11:11 AM
You may try using custom extension and implement this logic
06/19/2024 03:27 AM
Is there any other way of implementing it without using a custom extension?
Anyone who has integrated the success factor with Saviynt must have faced a similar issue.