PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners click HERE | EMEA/APJ Partners click HERE

Best Practices for Handling Cross-Country Moves

Roua
Regular Contributor
Regular Contributor

Hello,
I am currently working on a requirement to handle cross-country moves for employees in our HCM system. Specifically, we need to detect when an employee's country changes and then trigger the joiner process accordingly.

Here’s the scenario and our current setup:

Identification: We use customproperty21 (PerId) to identify if the user exists.
HCM Systems: We have 5 different HCM systems (customproperty4) for different countries. Moving an employee to another country means creating a new employee record, which is more akin to a JOINER PROCESS.
Cross-Country Move Detection:
PerId Check: Saviynt can detect if this person already exists in a different country using users.CUSTOMPROPERTY21.
HCM System Check: If the HCMSystem (users.usersource) changes, it indicates a cross-country move.

Approach:

I initially thought I could handle this process in the MODIFYUSERDATAJSON of the HCM connection with the following queries:

 

"UPDATE NEWUSERDATA NU SET NU.is_cross_country_move = CASE WHEN (SELECT COUNT(1) FROM CURRENTUSERS CU WHERE CU.customproperty21 = NU.customproperty21 AND CU.customproperty4 <> NU.customproperty4) > 0 THEN 'Y' ELSE 'N' END",

"UPDATE NEWUSERDATA NU SET NU.customproperty25 = CASE WHEN NU.is_cross_country_move = 'Y' THEN 'CROSS_COUNTRY_MOVE' ELSE NU.customproperty25 END"

 

However, I am not sure how this would trigger the joiner process or actually make the necessary changes.

Alternative Approach:

Another approach I considered was using workflows. I created a workflow as shown in the screenshot. When I tried to add an Action Event, it required a Java class to be created. Do you think this could be a good method?

Roua_0-1722256938606.png

and for the joiner process i already have user update rule.
Current User Update Rule:

 

a.customproperty5 = 'A' 
AND a.statuskey = 1 
AND (##a.customproperty5 is updated##)
AND (##a.statuskey is updated##)

 

i would add:

 

a.customproperty5 = 'A' 
AND a.statuskey = 1 
AND (##a.customproperty5 is updated##)
AND (##a.statuskey is updated##)
AND a.customproperty25 = 'CROSS_COUNTRY_MOVE'
AND (##a.customproperty25 is updated##)

 


so, Is the proposed rule update correct and efficient for detecting cross-country moves?
Are there any better approaches or best practices to handle this scenario?
Does the Groovy script and workflow setup look correct for triggering the joiner process?
I would greatly appreciate any insights, suggestions, or examples from those who have handled similar requirements.

Thank you!

3 REPLIES 3

rushikeshvartak
All-Star
All-Star
  • You can’t write groovy code in workflow.
  • You need use Action Event block with custom extension class.
  •  

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Roua
Regular Contributor
Regular Contributor

applying the requirement in the MODIFYUSERDATAJSON wouldn't be possible? and also so you think this is the only way to implement it ? 
also can you please explain what do you mean with i can'T use groovy code in workflow, it was specified as groovy .. like one option only (groovy)

 

 

  • Groovy option is used to call internal Saviynt objects calls 
  • below looks typo in preprocessor
  • T NU.is_cross_country_move

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.