Automatic Termination – Contract End Date
The employee should be terminated when the contract end date is expired. Contract end date field is in the job information section of the employee profile.
Off cycle batch event – can’t use when more than one entity are involved.
Integration center – success.
The solution is developed using Integration center.
1. Create – More Integration type – select the parameters as below
2. Select the Job Information entity and click Next.
3. Give you integration a name and description
4. Switch to field mapping view
5. Select the Job Information Entity in the Destination section and click delete.
6. Click Add in the destination section and select empEmploymentTermination object as show below
7. Map the fields from source entity Job Information to Employment Termination entity in the destination section whose values should be dynamically derived.
In my case, below are the field mappings.
User ID – User ID (Job Information)
Person ID External –personIdExternal (userNav/empInfo)
Exit Date – Contract End Date (Job Information)
Last Date of Work – Contract End Date (Job Information)
Last Date of Payment – Contract End Date (Job Information)
8. Hard code the static value fields by switching to detail view and clicking on the More field options as how in screenshots below.
Fields hard coded in my case
Event Reason – TER_IEND (this is the event reason code for termination – end of contract)
Ok To Rehire – True
Local event reason(custom field) – End of Contract
9. Filter and sort
Use advanced filters as per your requirement.
Below you can notice that I have set the filter to consider all records whose contract end date is before today and employee status is active.
FYI – Below is the status field to check employee status. userNav/Status = t is the filter to fetch all the active employees.
This integration program can be scheduled daily to fetch all the employees whose contract end date has expired and upsert the termination details into the employment details entity.
As soon as the employment details entity is updated with termination details, the system automatically creates a record in job information section with the termination event reason designed in this integration field mapping.
Hope this helps.