Field mappings

The Employee Import allows these fields to be mapped from an external system's data:

  • CALGRP_NAME: Calculation group.
  • PAYGRP_NAME: Payroll group.
  • WBG_ID: Security group.
  • SHFTPAT_NAME: Shift pattern.

For example, an external system might have three fields that describe the pay group to which an employee belongs. In this case, the Employee Import allows you the flexibility to map the combination of the three fields into the PAYGRP_NAME field.

These fields can receive up to 10 factors (10 external field values, separated by the tilde, ~, symbol), which are mapped to a single shift pattern, calculation group, payroll group, or security group field.

The mapping definitions for these fields are specified in the Interface Layout page. See Defining the interface layout.

The Workforce Management application installs with a set of default standard mapping definitions, which are listed in the Mapping Definitions page:

  • Default ShiftPattern Mapping
  • Default PayGroup Mapping
  • Default CalcGroup Mapping
  • Default SecurityGroup Mapping

These mappings do not perform any mappings by default; instead, they use the value in the file. This implies that the file must contain only one factor that maps directly to the application field (shift pattern, calculation group, payroll group, or security group).

If any type of mapping is required for any of the fields, you must create a new mapping definition.

Some scenarios where you are required to create a mapping definition are described below (followed by XML mapping examples).

Example: One-to-one mapping

The external system field does not map directly to the Workforce Management field and a one-to-one mapping is required.

For example, if external shift pattern A is mapped to internal shift pattern ALL DAYS, and external shift pattern B is mapped to internal shift pattern ROTATING NIGHTS, this is the XML mapping:

<mapping>
<!-If factor 1 is A, maps to ALL DAYS -->
   <row-match> 
      <field-match fieldname="1" matchvalue="A"/> 
      <output-row> 
          <output-field name="1" value="ALL DAYS"/> 
      </output-row> 
  </row-match> 

<!-If factor 1 is B, maps to ROTATING NIGHTS -->
   <row-match> 
      <field-match fieldname="1" matchvalue="B"/> 
      <output-row> 
          <output-field name="1" value="ROTATING NIGHTS"/> 
      </output-row> 
  </row-match> 

</mapping>

The mapping definition must have all possible values that are in the CSV external file to be imported. If the Employee Import comes across a new value that does not have a mapping, this occurs:

  • If the field is defined in the HR Refresh Reference Settings page, the appropriate action is implemented (either insert the record as new, or reject the record).
  • If the field is not defined in the HR Refresh Reference Settings page, an error is generated for that record.

Example: Two-to-one mapping

The external system might have many fields (that is, many factors) that map to one Workforce Management field.

For example, if an external system has two factors that describe the Pay Group field, this is the XML mapping:

<mapping>

<!-If field 1 is HOURLY_FULLTIME and field 2 is A , then the record 
maps to P1. 
Note that fieldName corresponds to the index in the factor value. 
So for a value of "HOURLY_FULLTIME~A" in the PAYGRP_NAME field, 
fieldName 1 is HOURLY_FULLTIME and fieldName 2 is A -->
   <row-match> 
      <field-match fieldname="1" matchvalue="HOURLY_FULLTIME"/> 
      <field-match fieldname="2" matchvalue="A"/> 
      <output-row> 
          <output-field name="1" value="P1"/> 
      </output-row> 
  </row-match> 

<!-If field 1 is HOURLY_PARTTIME, then the record maps to P2 -->
   <row-match> 
      <field-match fieldname="1" matchvalue="HOURLY_PARTTIME"/> 
      <output-row> 
          <output-field name="1" value="P2"/> 
      </output-row> 
  </row-match> 

<!--A row-match element without field-match elements matches all rows, 
this is used when there is no match. Do not use this method if there 
are possible records that needs to be rejected -->
	
   <row-match> 
      <output-row> 
          <output-field name="1" copyfield="1"/> 
      </output-row> 
  </row-match>

	</mapping>