Punch 01

This format provides the ability to import time clock punch-in records.

Import Directory Formats are typically created by vendor partners. The format provided below is required if you intend to automate a regular feed from an external source.

Punch-In Information Import Sample


<Data>
<Header>
<ImportDirective>PUNCH01</ImportDirective>
<Version>2.9</Version>
<Methods>
<AllOrNone VarType="11">False</AllOrNone>
<PunchMarginFrom VarType="3">-30</PunchMarginFrom>
<PunchMarginThrough VarType="3">30</PunchMarginThrough>
<InstitutionFocus VarType="8"/>
</Methods>
</Header>
<Rows>
<Row>
<PayrollID>2000091</PayrollID>
<PunchDate>2011-01-31</PunchDate>
<PunchTime>07:25:20</PunchTime>
</Row>
<Row>
<PayrollID>2000187</PayrollID>
<PunchDate>2011-01-31</PunchDate>
<PunchTime>07:22:54</PunchTime>
</Row>
<Row Action="Remove" Optional="True">
<PayrollID>2000211</PayrollID>
<PunchDate>2011-01-31</PunchDate>
<PunchTime>07:29:25</PunchTime>
</Row>
</Rows>
</Data>

DATA

Header

ImportDirective

The header field is required. It identifies the import format within the <Data> section. The Ongoing Import will reject an illegal ImportDirective value. Legal values are the names of the variations found in the sample files.

Version

The version field is optional. It is used to ensure that a given import file only works against that specific version of the application. Simply put, if you want the import to fail when a major upgrade occurs, set the version number. If irrelevant because these interfaces are maintained across versions, then omit this section.

Methods

The methods section is optional if the default values below are as desired. If not, include the method that you want to override.

Field Name Format Description
Import Key One of...
  • PayrollID (default)
  • EmployeeID
  • ExternalID
  • RscMasterNoIn
  • RscNoIn
A tag with the same name as this selection must exist as in the supplied XML file for each <Row>. PayrollID is assumed if the method is not supplied.
InsertNew True (default) or False If TRUE, it is okay to insert new records into the application.
    Expected Results: :


Using Action="Insert", AllOrNone="False" and Optional="True"

  • Processing the file for the first time inserts the record(s).
  • Using the same file again re-inserts the record(s).
  • Using the same file a second time BUT with a different file name (and same file content) re-inserts the record(s).


Important: This is by design because Action=Insert and this action will always direct the application to import and insert the data.


Removing Action="Insert" and Optional="True" from <row> tag and keeping “AllOrNone="False"


Processing the same file will not insert any duplicate record; these records are skipped. This behavior is irrespective of the file name, i.e. when Action=Insert is not specified, the application checks for existence of record and inserts only when it doesn't exist.


This behavior is irrespective of the file name, i.e. when Action=Insert is not specified, the application checks for the existence of that record and inserts it only if it doesn't exist. If a file has a mix of duplicate records and new records, then the duplicate ones are skipped and the new records are inserted.

Additional Examples:
  • If Action="Insert", AllOrNone="False" and Optional="False" -> duplicate records are inserted because Action=Insert"
  • If AllOrNone="False" and Optional="False" (Action="Insert" removed from <row> tag) -> duplicate records are skipped
UpdateExisting True (default) or False If TRUE, it is okay to update existing records within the application.
AllorNone True (default) or False If TRUE, any failure to insert/update a record within the application will rollback all changes made prior to the failure and exit the program. If FALSE, insert or update failures will be logged but successful inserts or updates will be saved.
PunchMarginFrom number (default = -30) Punch information contained within the file will be accepted as long as the date/time specified is not more than X minutes (i.e. this method's value) prior to the target person's shift start for the target date.
PunchMarginThrough number (default = 30) Punch information contained within the file will be accepted as long as the date/time specified is not more than X minutes (i.e. this method's value) after the target person's shift start for the target date.
InstitutionFocus An Institution's Abbreviation max 10 characters An Institution focused database allows the selection of a time zone for each Institution. The database stores all information in a single time zone called system time. This option allows you to import times using an institution's time zone, identified here by entering the institutions abbreviation, rather than having to import using the system time.

Rows

The following is the list of fields that are included for each <Row> in the <Rows> section.

Lay term Format DB Column Name Field Name
Employee identifier max 30 characters, or numbers (RscMasterNoIn & RscNoIn) One of these and based on ImportKey method selection:
  • RscMaster_PayrollID_Ch (default)
  • RscMaster_EmployeeID_Ch
  • RscMaster_ExternalID_Ch
  • RscMaster_No_In
  • Rsc_No_In
One of these and based on ImportKey method selection:
  • PayrollID (default)
  • EmployeeID
  • ExternalID
  • RscMasterNoIn
  • RscNoIn
Punch-In date mm/dd/yyyy Punch_Timestamp (calculated using PunchDate and PunchTime) PunchDate
Punch-In time hh:mm:ss Punch_Timestamp (calculated using PunchDate and PunchTime) PunchTime

Row Attributes

The following optional attributes can be supplied with the <Row> tag to override the default behavior of the import process. For example, you can ensure that only an update is performed on a given row and that a failure will not stop the process by starting the row section with <Row Action=”Update” Optional=”True”>.

Name Format Description
Action One of...
  • Insert
  • Remove
The default behavior seeks to update and insert if an existing record is not found. This attribute allows you to specify how this individual row is treated.
Optional True or False (default) If TRUE, then match failures will be overlooked. For example, a record designated with <Row Auction=”Update” Optional=”True”> indicates that you want to update if a match is found but that you don’t want to fail if a match is not found.