CSV source file format
Comma-separated values (CSV) files store tabular data in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas (or other characters).
Its possible to save files as CSV using all major spreadsheet applications, and text editors. Care may have to be taken when using double quote characters, refer to your application manual if there is any doubt.
Job assignment
See HR import use with Job assignments to see how to add multiple job assignment fields in the HR import file.
For multiple job assignments, just put two (or more) lines in your CSV per user. The user fields need to be identical in both lines. The job assignment fields contain one job assignment per line. For example:
useridnumber,jobassignmentnumber,positionidnumber,manageridnumber
n123,jobid1,pos1,manager1
n123,jobid2,,manager2
Heading | Format | Notes |
---|---|---|
fullname | Up to 100 characters, space, ampersand, parentheses, forwardslash | Job assignment title. |
useridnumber | 1-100 characters | The user's id number. |
timemodified | Unix timestamp | Last time item detail changed. |
deleted | 0 or 1 | Required when only job assignments to create, update or deleted are provided, otherwise not necessary. 0 => do nothing, 1=> delete. No action assumed if empty. |
idnumber | 1-100 characters | Matches valid job assignment number. Null assumed if not provided. To assign a user a manager, the user must have a job assignment. For example if you want to assign a managerid of 1 to useridnumber of 5, the manager needs to have a job assignment number in the file. |
startdate | CSV import date format | Data in the field needs to match the format defined under Location > Location settings > CSV import date format. |
enddate | CSV import date format | Data in the field needs to match the format defined under Location > Location settings > CSV import date format. |
orgidnumber | 1-100 characters | Matches valid organisation idnumber. Null assumed if not provided. |
posidnumber (optional) | 1-100 characters | Matches valid position idnumber. Null assumed if not provided. |
appraiseridnumber | 1-100 characters | Null or matches valid user idnumber. Null assumed if not provided. |
manageridnumber | 1-100 characters | Null or matches valid user idnumber. Null assumed if not provided. |
managerjobassignmentidnumber | Automatically required if manageridnumber is set to on and updateidnumbers is off (i.e. we're using more than just the first jobs). ID number for the specific job assignment involved in the manager relationship. |
Organisations and positions
Heading | Format | Notes |
---|---|---|
idnumber | 1-100 characters | Unique for each hierarchy item. |
timemodified | Unix timestamp | Last time item detail changed. |
frameworkidnumber | 1-100 characters | idnumber matching an existing hierarchy framework. |
shortname | 1-100 characters | This field can be empty. |
fullname | 1-1000 characters | Position or organisation name. |
parentidnumber | 0-100 characters | Matches the identifier field of another hierarchy item. Empty for top level. |
description | Up to 1000 characters describing the org | This field can be empty. |
typeidnumber | 0-100 characters | Matches the identifier of an existing item type. |
deleted | 0 or 1 | Required when only organisations or positions to create, update or deleted are provided, otherwise not necessary. 0 => do nothing, 1=> delete. No action assumed if empty. |
customfield_[shortname] | Up to 1000 characters | Custom field data. Multiple columns allowed, where the column heading matches the type's custom field shortname. If no match, nothing will be updated. If the custom field type is date format then the data in the field needs to match the format defined under Location > Location settings > CSV import date format. |
Users
When the suspended field has a default value then erasing existing data in the field will mean the default value will be stored in the field.
Heading | Format | Notes |
---|---|---|
idnumber | 1-100 characters | Unique for all users (never changes for a given user) Use the value shown in the Users profile Optional field ID number. Check the *ID number* value exists for existing users If you want to update existing user's profile fields. |
username | 1-100 characters | Unique for all users. |
timemodified | Unix timestamp | Last time the user's details changed. Note if the same value is imported on a subsequent sync then the sync records will not be updated. |
deleted suspended | 0 or 1 0 or 1 | Required when only users to create, update or delete/suspend are provided, otherwise not necessary. 0 => do nothing, 1=> deleted/suspend. No action assumed if empty. However, when an empty suspended field is included in the User source for new records and the Empty strings erase existing data option has been chosen, the added user gets the default value of Active. The erasing of the data doesn't mean there is no value in the field if the field has a default value. |
firstname | 1-100 characters | No leading or trailing space characters. |
lastname | 1-100 characters | No leading or trailing space characters. |
firstnamephonetic (optional) | 1-100 characters | No leading or trailing space characters. |
lastnamephonetic (optional) | 1-100 characters | No leading or trailing space characters. |
middlename (optional) | 1-100 characters | No leading or trailing space characters. |
alternatename (optional) | 1-100 characters | No leading or trailing space characters. |
Valid email address, max 100 chars | Unique for each user. | |
emailstop | 0 or 1 | Disables non-essential system-generated email notifications. Note this does not affect the Welcome email for new or revived users. |
country | 2 character ISO 3116 country code (e.g. NZ => New Zealand) | |
city | 120 characters | |
timezone | 1-100 characters | A location-based timezone identifier e.g. America/New_York, Europe/London, Asia/Singapore etc. See http://us.php.net/manual/en/timezones.php for a list of all location-based timezones. |
lang | 1-30 characters | 2 char ISO 639-1 code. |
description | 1-1000 characters | |
url | 1-200 characters | |
institution | 1-40 characters | |
department | 1-30 characters | |
phone1 | 1-20 characters | |
phone2 | 1-20 characters | |
address | 1-70 characters | |
auth | This is the list of default Authentication types in Totara. Make sure the plugin is enabled before using. If using a custom Authentication plugin then use the name of that plugin for this field. | |
Format: | Authentication type: | |
manual | Manual accounts | |
nologin | No login | |
Email-based self-registration | ||
cas | CAS server (SSO) | |
db | External database | |
fc | FirstClass server | |
gauth | Google Openid Authentication | |
imap | IMAP server | |
ldap | LDAP server | |
mnet | MNet authentication | |
nntp | NNTP server | |
none | No authentication | |
pam | PAM (Pluggable Authentication Modules) | |
pop3 | POP3 server | |
radius | RADIUS server | |
shibboleth | Shibboleth | |
webservice | Web services authentication | |
password (optional) | 1-32 characters | If the password column is included and the CSV file has an empty password field then a welcome email is sent allowing the user to create their own password. Note that this only works when adding new users. If you are adding a large number of new users without passwords please note that this will result in a large number of emails being sent. |
customfield_[shortname] | 1-1000 characters | Custom field data. Multiple columns allowed, where the column heading matches an existing user custom field shortname. If no match, nothing will be updated. If the custom field type is date format then the data in the field needs to match the format defined under Location > Location settings > CSV import date format. |
The Totara Academy has a whole course dedicated to Creating users in Totara Learn. Here you can learn more on how to add users, see best practice, and give it a go yourself.