Auto-Import Directory
The auto-import directory provides another way for you to import data into Pacific Timesheet. When CSV files are dropped into the auto-import directory they will be automatically imported into the system. The format of the import files is exactly the same as when you import through the web browser. For information about the CSV import file format see the Importing/Exporting topic.
To set up a directory for auto-importing you need to configure the following properties:
Property |
Description |
||||||||||||||||||||
Enabled |
Check this option to enable auto-importing. |
||||||||||||||||||||
Import From |
You have the option of importing from a directory on the computer running the Pacific Timesheet service (self-hosted only), or importing from an FTP (File Transfer Protocol) server. If you choose "FTP Server" the following properties must be configured by clicking the settings button that appears to the right of the menu:
|
||||||||||||||||||||
Directory |
The directory on the computer or FTP server from where the export files will be imported. If the "Import From" property is set to "Directory" then this is the file path to the directory where the import files will be replaced, e.g. "/tmp", "c:\imports" or "\\morpheus\\c\imports". The path must be valid for the server that Pacific Timesheet is installed on. If the "Import From" property is set to "FTP" then this is the directory on the FTP server from where you want to read the import files, e.g. "/" or "/tmp". FTP server paths start with a forward slash, and backslashes are not valid. |
||||||||||||||||||||
When Finished |
This option determines what to do to the file when finished, so that it will not be reprocessed. The following options are available:
|
File Naming
Import files need to be named in a specific way in order for the system to know how to process it:
1. The file name must end is ".csv"
2. The file name must start with the type of objects being imported, then a hyphen, then the key field, and finally a hyphen:
objects-keyfield-*.csv
The first part, 'objects', is the type of objects being imported, such as employees or tasks. The next part, 'keyfield', is the object property to use to avoid creating duplicates, for instance name or id. The '*' is a wild-card indicating that any valid file name text can appear after the hyphen. For example, to import employees using the login name as the key field the following file name would be appropriate:
employees-login-myemployees.csv
The following tables lists the objects that can be imported, along with their supported key fields.
General Imports:
Object |
Key Fields |
Notes |
employees |
login, id, email |
If you renamed employees using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "resources-name-.csv", "resources-name-xyz.csv", etc. |
employeebalances |
(none) |
No key field needed. If you renamed employees using the terminology feature then replace 'employee' with your singular terminology, making sure to remove spaces, if any, in the name. For example: "resourcebalances-.csv", "resourcebalances-xyz.csv", etc. |
groups |
name, id |
|
timesheets |
(none) |
No key field is needed in the file name, but if the import file specifies the ID column then that will be used to match to a possible previously existing entry. File name examples: "timesheets-.csv", "timesheets-xyz.csv", etc. |
billrates |
(none) |
No key field needed. For example: "billrates-.csv", "billrates-xyz.csv", etc. |
payrates |
(none) |
No key field needed. For example: "payrates-.csv", "payrates-xyz.csv", etc. |
Work Breakdown Structure (WBS) Imports:
Object |
Key Fields |
Notes |
customers |
name, id |
If you renamed customers using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "clients-name-.csv", "clients-name-xyz.csv", etc. |
projectgroups |
name, id |
If you renamed project groups using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "portfolios-name-.csv", "portfolios-name-xyz.csv", etc. |
projects |
name, id |
If you renamed projects using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "jobs-name-.csv", "jobs-name-xyz.csv", etc. |
taskgroups |
name, id |
If you renamed task groups using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "phases-name-.csv", "phases-name-xyz.csv", etc. |
tasks |
name, id |
If you renamed tasks using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "activities-name-.csv", "activities-name-xyz.csv", etc. |
Asset Imports:
Object |
Key Fields |
Notes |
assets |
name, id |
If you renamed assets using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "jobmaterials-name-.csv", "jobmaterials-name-xyz.csv", etc. |
assetclasses |
name, id |
If you renamed assets using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "jobmaterialclasses-name-.csv", "jobmaterialclasses-name-xyz.csv", etc. |
assetentries |
(none) |
No key field is needed in the file name, but if the import file specifies the ID column then that will be used to match to a possible previously existing entry. If you renamed assets using the terminology feature then use your plural terminology, making sure to remove spaces, if any, in the name. For example: "jobmaterialentries-.csv", "jobmaterialentries-xyz.csv", etc. |
Note that these file naming conventions are case-insensitive. |
Logging and Error Handling
An import log file will be generated in the auto-import directory, with details about what was imported, and any errors that might have occurred. Up to 7 days of log files will be generated - older ones will be deleted automatically.
If any errors occur during the import, the import file will be renamed by appending ".err" to the file.