Automatic Termination – Contract End Date

Requirement

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.

Options explored

Off cycle batch event – can’t use when more than one entity are involved.
Integration center – success.

Solution

The solution is developed using Integration center.

1. Create – More Integration type – select the parameters as below

Integration%20Type%20Parameters

Integration Type Parameters

2. Select the Job Information entity and click Next.

Source%20Entity

Source Entity

3. Give you integration a name and descriptionName%20and%20Description

Name and Description

4. Switch to field mapping view

Mapping%20view

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

Destination%20Entity

Destination Entity

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)

Field%20mappings

Field%20mappings

Field mappings

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

Value%20mappings

Value mappings

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.

Filter%20and%20Sort

Filter and Sort

FYI – Below is the status field to check employee status. userNav/Status = t is the filter to fetch all the active employees.

User%20Status%20Field

User Status Field

Conclusion

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.
Thank you.