HDL – Convert Contingent Workers to Workers
There are scenario’s where customers want to convert their non permanent staff to permanent staff in bulk or vice versa. In HCM terminology, this causes changes in system person type of a person. Let us take an example where a customer wants to hire all the contingent workers working in the company as permanent staff.
As mentioned earlier, converting a contingent worker into worker/employee person type will change the system person type of the person. This is a two step process:
- Terminate all the CWK records.
- Rehire them as workers.
Performing these steps manually for 100+ records will be a tough task and is error prone process. So, it is better to use HDL for this.
First, we will terminate CWK records. Below is the sample file for same:
METADATA|WorkRelationship|PeriodOfServiceId|LegalEmployerName|DateStart|PersonId|WorkerType|ActualTerminationDate|ActionCode|TerminateWorkRelationshipFlag
MERGE|WorkRelationship|300012012120031|Test Legal Employer|2023/01/01|30001212121223|C|2024/05/08|TERMINATE_PLACEMENT|Y
Below sample SQL can be used to get the various IDs:
SELECT PERIOD_OF_SERVICE_ID, PERSON_ID,DATE_START, PERIOD_TYPE, LEGAL_ENTITY_ID
FROM PER_PERIODS_OF_SERVICE
Once the termination file is loaded successully, we need to rehire the persons as Worker. Sample file for REHIRE:
METADATA|WorkRelationship|PersonNumber|LegalEmployerName|PrimaryFlag|DateStart|WorkerType
MERGE|WorkRelationship|1234|Test Legal Employer|Y|2024/05/09|E
METADATA|WorkTerms|ActionCode|EffectiveStartDate|EffectiveEndDate|EffectiveSequence|EffectiveLatestChange|AssignmentStatusTypeCode|AssignmentType|BusinessUnitShortCode|PrimaryWorkTermsFlag|LegalEmployerName|PersonNumber|DateStart|WorkerType|AssignmentNumber
MERGE|WorkTerms|REHIRE|2024/05/09|4712/12/31|1|Y|ACTIVE_PROCESS|ET|Test BU|Y|Test Legal Employer|1234|2024/05/09|E|ET1234
METADATA|Assignment|ActionCode|EffectiveStartDate|EffectiveEndDate|EffectiveSequence|EffectiveLatestChange|AssignmentStatusTypeCode|AssignmentType|BusinessUnitShortCode|PrimaryAssignmentFlag|PersonNumber|AssignmentCategory|DateStart|WorkerType|LegalEmployerName|AssignmentNumber|WorkTermsNumber
MERGE|Assignment|REHIRE|2024/05/09|4712/12/31|1|Y|ACTIVE_PROCESS|E|Test BU|Y|1234|FR|2024/05/09|E|Test Legal Employer|E1234|ET1234
Please note for rehire, only Work Relationship, Work Terms and Assignment METADATA are required.