Transform for user life cycle state

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"
                    }
                }
            }
        }
    }
}

@kalyannambi2010 Have you tried creating this and previewing with a few example users for each test case?

Hi @ethompson Edward Thompson,

I did not test the code and could you please share the full code for this implementation?

Thanks
Kalyan

@kalyannambi2010 I do not have a solution for this exact requirement. If you could first test what you have, we can troubleshoot which test cases are not passing as you would expect.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.