Rule-based generation of UserID / Username for Hires and Rehires
Creating new employment in case of rehiring is typically best practice in multi-national installation which run EC Payroll. As a consequence, it is imperative to support the number creation per rule (PersonID/UserID/Username) in those cases.
Use Case: Customers often use rules to create the UserIDs/Usernames of newly hired or re-hired employees. Such a rule typically creates numbers of different number ranges dependent on Legal entity/Country.
Current Gap: This process will not work when an employee is rehired (using the new employment option). With the PersonID unchanged the mechanism of generation UserID/username (which works via the PersonID) is not being triggered.
Solution: he rule to generate the IDs will be consumed not by the standard events (onChange, onSave) but directly by an appropriate method entered in a designated place of the Recruit/Rehire Configuration.
We often use rules to create the UserIDs/Usernames of newly hired or rehired employees. Such a rule typically creates a number of different number ranges dependent on Legal entity/Country. This process will not work when an employee is rehired (using the new employment option). With the PersonID unchanged, the mechanism of generating on UserID/username (which works via the PersonID) is not being triggered.
The rule to generate the IDs will be consumed not by the standard events (onChange, onSave), but directly by an appropriate method entered in a designated place in the Hire/Rehire Configuration object. There is also a new template option in the Manage Business Rules UI to create a rule to generate the Employment ID. This addresses the previous gaps with standard events where the sequence for employee IDs was skipped.
The Employee ID will only be generated when saving the new hire.
How to Configure:
- For Business Rules that will be used to generate an Employee ID via MDF Sequence, you will need to choose the following option when creating the rule in Configure Business Rules:
Note: It is important to use this Scenario in order for the rule to show up as one of the options in the Hire/Rehire Configuration object. This Scenario automatically defaults the necessary paramaters that such rule will need.
- After the rule is configured, go to Manage Data > Select Hire/Rehire Configuration > MatchUserConfiguration, and add the rule created in the previous step:
Few points to NOTE:
- If we do not enable the rule in Hire/Rehire Config object, not fill out the Person ID External and Username fields manually in the UI, from where will the system get the ID?
Answer: If no rule is setting the value and if no specific value is manually added in the field, then the system will get the Username, UserID, and personIdExternal from the “Next Person Id Assigned” in Company System and Logo Settings page (for New Hire). For Rehire with New Employment, the same thing is applicable except for Person ID which should remain unchanged.
If userAccountInfo user-name if filled out during Hire, the userID value will be the same with user-name.
- The user-name field in userAccountInfo is enabled for us. By default, it is a mandatory field in the Add New Hire wizard. What happens to the username value once the Hire is saved?
Answer: The system will always respect the value maintained in the user-name field. The Person ID and User ID values will come from the next sequence in the business rule. In case the field is not enabled in your instance (meaning you are not filling this value manually in the UI), then User ID and Username will come from the Hire/Rehire Config Rule.
- Can we just update our existing rule and assign it to the Hire/Rehire Configuration object?
Answer: No. You will be unable to update the existing rule and add the needed parameters. A new rule has to be defined from scratch.
- If we manually fill out the Person ID External field in Add New Hire, will the UserID come from the Hire/Rehire Configuration rule?
Answer: No. The Person ID and User ID will be the same and in this case, the value will come from whatever value you specified in the person-id-external field.
On the other hand, in the case of Rehire with New Employment, there is already an existing Person ID for the employee, so the new User ID for the new employment will come from the next sequence in the rule.
Thanks for reading the blog.
Do share the feedback.
Does this rule based control also happened in pre-day one access? we know their has an temp ID for pre-day 1 access, Can we create user ID before day 1?
I have followed the steps but Person ID number are being generated from database sequence.
Am I doing something wrong ?
Any helps will be much appreciated
Home > Admin Center > Company System and Logo Settings
Check for the below
Enabling the option Database Sequence, will change the process how Employee IDs will be generated, instead of creating the IDs based on a config table they will be generated based on a Database sequence. We recommend using this option in case you receive application errors caused by duplicate Employee IDs. Such errors are at risk to occur in the in the following cases:
- When hires are processed by concurrent API calls.
- When at peak times high volume of hires are processed by multiple users in parallel.
Limitations: In specific cases like cancelled or aborted hire processes gaps in the row of consumed IDs will be inevitable (e.g. Employee’s 1020 – 1040 exist 1041 and 1042 are skipped and it continues with 1043 – 1085 etc…)
“Maximum Number already used as Employeed Id for existing employees” The field in this page, contains the last number already used for the employees in the system. To start the next Employee ID from this number, please enter this number in “Next Person Id Assigned”.
Hi Parul Luthra,
Is there any technical need or advantage of creating different number ranges for UserId's depending on Legal Entity/Country?
Many thanks and regards,