The Enable Account mapping allows you to control whether the user account is enabled or disabled.
This is a bool mapping that must result in either a true or false.
- A true result will set the user account to enabled
- A false result will set the user account to disabled
The Enable Account field mapping can be setup in such a way that when an employee is Terminated in UKG, the matching user account in AD is then be automatically disabled.
This requirement can be achieved by creating an expression for the Enable Account mapping that looks at the employee status in UKG, and if the employee is Active, then set the Enable Account mapping to true, otherwise, set the Enable Account mapping to false, which will result in the user account being disabled in AD.
Employment.EmployeeStatusCode == 'Active'
This expression will only return true, if the employees status code is Active. All other employee statuses will result in a false. If the employee status is Terminated or Leave the expression will return a false and the user record will be disabled.
If you wanted to implement logic to set the account to enabled for all non-terminated employees (Active or Leave), and set the account to disabled for all terminated employees. Then use the expression:
Employment.EmployeeStatus != 'Terminated'
This expression will return true, if the employees status is not Terminated.
All employees with a status of either Active or Leave will result in a true and the account will be enabled.
All employees with an employee status of Terminated will result in a false and the account will be disabled.