Hi,
We would like to create a transform based on below infomation and could you provide information on this?
Workday (Emp_status__c) | Termination Date | User status in SailPoint(cloudLifecycleState) | Any cutomization? |
---|---|---|---|
active | Future dated | active | |
active | Today, before 5PM | active | |
active | Today, after 5 PM local time of user | terminated | Transform |
terminated | Past dated | terminated | |
Other states(Prehire/OnLeave) | Status same as workday |
As of now I have written the transform code as below.
{
"name": "Determine Workday LCS",
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"activestate": {
"attributes": {
"firstDate": "now",
"secondDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "HIREDATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "GTE",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"futureHire": {
"attributes": {
"firstDate": {
"attributes": {
"expression": "now+14d/d",
"roundUp": false
},
"type": "dateMath"
},
"secondDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "HIREDATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "GTE",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"preHire": {
"attributes": {
"firstDate": {
"attributes": {
"expression": "now+15d/d",
"roundUp": false
},
"type": "dateMath"
},
"secondDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "HIREDATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "LT",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"onleave": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "ON_LEAVE",
"sourceName": "Workday"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "none"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"inactivestate": {
"attributes": {
"firstDate": "now",
"secondDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "CONTRACT_END_DATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"now"
],
"ignoreErrors": "true"
}
},
"operator": "GT",
"positiveCondition": "yes",
"negativeCondition": "no"
},
"type": "dateCompare"
},
"value": "#if(($inactivestate == 'no') && $activestate == 'yes' && ($onleave == 'none' || $onleave == '0'))active#elseif($activestate == 'no' && $prehire == 'yes' && $onleave != '1')prehire#elseif($onleave == '1')leaveOfAbsence#elseif($inactivestate == 'yes')inactive#elseif(($prehire=='no')&&($activestate=='no'))futureHire{else}UNKNOWN#end"
}
{
"type": "lookup",
"attributes": {
"table": {
"US": "CST",
"ES-MX": "CST",
"EN-GB": "GMT",
"IN": "IST",
},
"input": {
"type": "upper",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"sourceName": "Workday",
"attributeName": "COUNTRY"
}
}
}
}
}
}
}
Thanks
Kalyan