Resignations

Handling resignations in Zenegy can be complicated as the resignation logic has to follow the core systems resignation logic, which is a process with multiple steps.

Required query parameters for resignations.

  • companyUid - Uid of a platform.
  • employeeUid - Uid of an employee.

Zenegy's core resignation logic

When using Zenegy for resignations, multiple actions have to be taken before the resignation is completed:

  1. Add Resignation Data: Resignation data is added to the employee profile.
  2. Run Payroll for Resignation Date: Before the employee is resigned a payroll has to be executed on the last day of work.
  3. Deactivation: After payroll has been executed for the last day of work, the employee will automatically be deactivated and resigned.
  4. Reactivation & GVS Assignment : When an employee needs to get a new Global Value Set, it should be reactivated and assigned the new set during reactivation.

Services integrating with Zenegy should determine their approach to this logic.


Resignations via the API

This is how the resignations flow should be handled via the API.

1. Adding Resignation Data

Resignation data can be added to an employee via the endpoint for resign employee.

Resign employee request example:

[  
    {  
        "dateOfResignation": "2023-08-31T00:00:000Z",  
        "reason": 0,  
        "resignedBy": 0,  
        "note": "Employee resigned",  
        "lastWorkDay": "2023-08-31T00:00:000Z"  
    }  
]

Using this example request for an employee will result in the deactivation of the profile once a payroll run for 31/08-2023 is completed.

2. Execute Payroll

After resignation data has been added, a payroll run should be executed. Payroll runs should be executed in compliance with to the customers payroll flow, and should not be executed on random dates to handle resignations

Integrations that handles payroll runs via the API should refer to this guide about payroll..

3. Deactivation

Once a payroll run for the last work day has been executed, the resignation process is complete, and the employee profile is deactivated. The status of a resignation can be checked via the endpoint for get employee resignations.
When an employee's resignation has been processed the isProcessed value will be true.

4. Reactivation

When using the API to manage employees and global values and sets, that has to change the set on a profile, will have to reactivate the employee profile via the endpoint for reactivate employee.

When reactivating the employee a globalValueSetUid can be defined on the globalValueSet property, this will assign a new global value set to the employee, during reactivation.