Question
How do I import bar code scan time entry data?
Answer
Background
This article outlines how you can integrate barcode records with Pacific Timesheet using a CSV import file using a simple import template format. This file that can be sent to and uploaded into Pacific Timesheet by using its secure FTP auto-import directory.
You can use a REST method to send records generated by barcode scanners to Pacific Timesheet.
CSV Import Formats
In order to import punch in/out records, record need to use the "*" character in either the start or finish column of the CSV file. For the case of a punch-in record, specify "*" for the Finish column. For a punch-out record, specify "*" for the Start column. When the system receives an out punch record, it will always punch out the current open punch, if any, as there should only be one. When creating and transmitting a punch out record the Project, etc. columns can be left blank as they will be ignored.
Here is an example that has punches for one user on one day - 2 punch-ins, and a punch out at the end of the day:
Employee,Employee.ID,Start,Finish,Project,Project.ID,Task,Task.ID
att1,ATT001,3/19/2018 8:15AM,*,Project 001,P001,Task 001,T001
att1,ATT001,3/19/2018 9:15AM,*,Project 001,P001,Task 001,T001
att1,ATT001,*,3/19/2018 4:00PM,,,,
Note that you can omit the Employee, Project and Task name columns if you are using IDs from the import template. Or, conversely, you can omit the "Object.ID" columns if you are using names. Also, note that you can use an ISO format for the Start and Finish date/time, e.g. "2018-03-19T08:15:00" (seconds are optional, and no timezone is needed as it will the record will always be in timezone of employee).
Import tool checks
The import tool checks previous time entries in the system and Scan ID, a hidden database field value used for tracking unique scans. When there is a non-blank "Scan ID" or "scanid" value in the import file, the import tool will skip looking up any existing entry to update, and will import this and create a new time entry, regardless of the scans other properties.
Comments
0 comments
Please sign in to leave a comment.