Totara 12 will no longer be fully supported from October 2023. Urgently consider upgrading to a later version.

Help documentation for up-to-date versions is available here.

The source refers to the data being imported into Totara Learn and should be configured for each enabled element prior to importing any data. A Site Administrator can configure source settings for a specific element.

  1. Go to Site administration > HR Import > Sources.
  2. Select the element name.
  3. Select the source option (either CSV or External database). 
  4. Configure the settings accordingly.
  5. Click Save changes

CSV 

You can configure options related to the incoming source data.

SettingDescriptionNotes
CSV file encoding

This option allows you to select the encoding for the CSV file. The default is 'UTF-8' but this can be changed.  

Source file encoding will be converted to the target database encoding providing the correct encoding for the source has been chosen for this setting.
Delimiter

This field allows you to select the delimiter used in the CSV file. Options include:

  • Comma (,)
  • Semi-colon (;\)
  • Colon (:\)
  • Tab (\t)
  • Pipe (|)
-
Fields to importDecide which fields you would like to import. The fields available in this section varies depending on the element. See Fields to import for more information.
Field mappingsAllows you to enter the column title for each field if these vary from the default. The fields available in this section varies depending on the element.See Field mappings for more information. 

File details in configure CSV source

External database 

Configure the settings for importing from an external database, including entering the external database connection details.

SettingDescriptionNotes
Database type

The database type e.g. MySQL or PostgreSQL.

Options that appear in the Database type dropdown are dependent on what database drivers have been setup in your php.ini file.
Database name

The name of the database you are connecting to.

-
Database hostname The database hostname e.g. 'localhost'-
Database userThe user account that has the appropriate database access privileges.-
Database passwordThe user account password.-
Database portThe port id number of the database-
Database tableThe name of the database table that contains the element data.-
Fields to importDecide which fields you would like to import. The fields available in this section varies depending on the element. See Fields to import for more information.
field mappingsAllows you to enter the column title for each field if these vary from the default. The fields available in this section varies depending on the element.See Field mappings for more information. 

Click the Test database connection button to verify that the details were entered correctly and a connection can be made.

The use of empty strings in your external database will delete the field's value in your site. Null values in your external database will leave the field's current value in your site.

Specific external database source settings.

Select fields to import 

All sources include the Fields to import section. For each element, there are mandatory default fields that need to be included and there are additional optional fields that can be imported. Tick the checkbox next to each field that will be included in the source.

Custom fields in hierarchies can have matching short names if they are defined within different hierarchy types. This means that when you import custom fields for positions, organisations and competencies, you might have a heading in the csv file which corresponds to two different custom fields.

Competency

There are a number of both mandatory and optional fields for the Competency source, these are:


FieldDescriptionNotes
idnumberThis is the competency item id number.

Mandatory field.

fullnameThe full name of the competency item.Mandatory field.
timemodified

A Unix timestamp that confirms the last time a user's details were changed.

Mandatory field.

If you want records to be updated every time an import is performed and not take the Unix timestamp value into account, you can specify a zero (0) value for this field. This will effectively force HR Import to import the data every time and ignore changes in Unix timestamp values.

deleted

This is required if Source contains all records is set to No. In your source, specify the value 1 if a job assignment is to be deleted or the value 0 to create or update the job assignment.

-
frameworkidnumberThe ID number of the competency framework in which the competency items should sitMandatory field.

aggregationmethod

The aggregation method to be applied to this competency item. 

  • Specify the value 1 is the All option is required.
  • Specify the value 2 is the Any option is required.
  • Specify the value 3 is the Off option is required.
Mandatory field.
shortname

The competency item short name.

Optional field.
description

The competency item description.

Optional field.
parentidnumberThe ID number of the competency item's parent item.Optional field.
typeidnumberThe ID number of any competency types you may have created. Note that only one type per item may be specified.Optional field.
Competency type custom fields can also be included in the Competency Source. These are displayed by the custom field name with the competency type in parenthesis.  For example 'Example date time (Analytical)' or 'Example location (Strategic)'.


Competency type custom field

Competency types

Job assignment

If you don't update the CSV with a different timemodified value (e.g. you leave the last entry unchanged) within the job assignment source and a user's job assignment is edited manually, their job assignment will not be overwritten on any following HR Import run.  This behaviour differs from the other import sources.

There are a number of both mandatory and optional fields for the Job assignment source, these are:

FieldDescriptionNotes
idnumberThis is the job assignment's id number.

Mandatory field.

useridnumberThis is the id number for the user.Mandatory field.
timemodified

A Unix timestamp that confirms the last time a user's details were changed.

Mandatory field.

If you want records to be updated every time an import is performed and not take the Unix timestamp value into account, you can specify a zero (0) value for this field. This will effectively force HR Import to import the data every time and ignore changes in Unix timestamp values.

deleted

This is required if Source contains all records is set to No. In your source, specify the value 1 if a job assignment is to be deleted or the value 0 to create or update the job assignment.

-
fullname

The fullname of the job assignment.

-

startdate

The date the job assignment starts. Optional field.
enddate

The date the job assignment ends.

Optional field.

orgidnumber

The organisation id number.Optional field.

posidnumber

This position id number.Optional field.
manageridnumber

The id number for the user that will be assigned as manager.

When making a user a manager of another user, the manager user is assigned Staff Manager role permissions and will have the capability to manage their team members.
managerjobassignmentidnumber

The id number for the specific job assignment involved in the manager relationship.

This field is mandatory if manageridnumber is set to on and updateidnumbers is off (i.e. you're using more than just the first jobs).
appraiseridnumber

The id number for the user that will be assigned as appraiser.

Optional field.

Circular management job assignment loops

This occurs when a manager reports to themselves, this can occur when users are imported that have a manager assigned to them that they are the manager of further down the management hierarchy.

For example:  User A has User B as their manager, User B has User C as their manager, User C has User A as their manager.  It is also possible with multiple job assignments to have a loop as follows. If you have two users A and B each with two job assignments 1 and 2, then you are allowed to have A1 > B1 > A2 > B2, but you couldn't then add > A1 at the end. This can lead to unexpected behaviour for management approvals and management reporting so needs to be prevented.

If a circular management is found when importing a manager with HR Import then none of the users forming the circular reference will have their manager assigned, with a notice explaining why.

To import the users identified as having a circular reference the records of the import file will need to be adjusted so the circular reference no longer exists. In the example above User C will need to have their manager changed from User A.

Organisation

There are a number of both mandatory and optional fields for the Organisation source, these are:

FieldDescriptionNotes
idnumber

A unique identifier that must be specified for each record being imported.

Mandatory field.

fullname

The full name of the organisation item being imported e.g. 'Head Office'.

Mandatory field.

frameworkidnumber

The ID number of the framework the organisation items are being imported to.

Mandatory field.

You need to create your organisation framework and specify an ID number prior to import. If not, HR import will not know where to import the organisation data to and this will result in an error during import.

timemodified

A Unix timestamp that confirms the last time a user's details were changed.


Mandatory field.

If you want records to be updated every time an import is performed and not take the Unix timestamp value into account, you can specify a zero (0) value for this field. This will effectively force HR import to import the data every time and ignore changes in Unix timestamp values.

deleted

If Source contains all records is set to No, the deleted flag must be provided. In your source, specify the value 1 if a user is to be deleted or the value 0 to create or update the user. 

-
shortname

The position short name.

Optional field. Must have Display hierarchy shortnames enabled in Advanced features
description

The position description.

Optional field.
parentidnumber

The ID number of the position's parent item. This is useful if you want to create sub-items, or children, of a position.

Optional field.
typeidnumberThe ID number of any position types you may have created. Note that only one type per item may be specified.Optional field.

Position

There are a number of both mandatory and optional fields for the Position source, these are:

FieldDescriptionNotes
idnumber

A unique identifier that must be specified for each record being imported.

Mandatory field.

fullname

The full name of the position item being imported e.g. 'CEO'.

Mandatory field.

frameworkidnumber

The ID number of the framework the position items are being imported to.

Mandatory field.

You need to create your position framework and specify an ID number prior to import. If not, HR import will not know where to import the position data to and this will result in an error during import.

timemodified

A Unix timestamp that confirms the last time a user's details were changed.


Mandatory field.

If you want records to be updated every time an import is performed and not take the Unix timestamp value into account, you can specify a zero (0) value for this field. This will effectively force HR import to import the data every time and ignore changes in Unix timestamp values.

deleted

If Source contains all records is set to No, the deleted flag must be provided. In your source, specify the value 1 if a position is to be deleted or the value 0 to create or update the position. 

-

shortname

The position short name.

Optional field. Must have Display hierarchy shortnames enabled in Advanced features

description

The position description.

Optional field.
parentidnumber

The ID number of the position's parent item. This is useful if you want to create sub-items, or children, of a position.

Optional field.
typeidnumberThe ID number of any position types you may have created. Note that only one type per item may be specified.Optional field.

User

There are a number of both mandatory and optional fields for the User source, these are:

FieldDescriptionNotes
idnumber

A unique identifier that must be specified for each record being imported. It will not be possible to import data for users who have been added manually and have not been assigned an idnumber.

By assigning these manually added users with a idnumber it will then make it possible to sync their data by including them in the CSV sync file. You will also need to tick the HR import checkbox within a user's profile to allow them to be updated in the sync/import process.

Mandatory field.

This checkbox will only become visible in a users profile once you've enabled/clicked the eye-icon for the User import option in HR import > Elements> Manage Elements.

timemodified

A Unix timestamp that confirms the last time a user's details were changed.


Mandatory field.

If you want records to be updated every time an import is performed and not take the Unix timestamp value into account, you can specify a zero (0) value for this field. This will effectively force HR import to import the data every time and ignore changes in Unix timestamp values.

username

The username of the user being imported.

Mandatory field.
deleted

If Source contains all records is set to No, the deleted flag must be provided. In your source, specify the value 1 if a user is to be deleted or the value 0 to create or update the user. 

-
firstname

The first name of the user being imported.

Mandatory field.
lastname

The last name of the user being imported.

Mandatory field.
email

The email address of the user being imported.

Mandatory field.
passwordA new or replacement password.
When users are created using the CSV import process and the password column is not included (or the password column is included and fields are left empty), a random password will be generated and will be sent to users in a welcome email. The user will then be required to change this password the first time they log in.

The phonetic spelling of the user's first name.Optional field.

The phonetic spelling of the user's last name.Optional field.

The middle name(s) of the user being imported.Optional field.

An alternate name of the user being imported.Optional field.
emailstop

Disables non-essential system-generated email notifications. Note this does not affect the Welcome email for new or revived users.

Use 1 to disable and 0 to leave active. 

Optional field.
cityThe city or town of the user being imported.Optional field.

The country of the user being imported.Optional field.

e

The timezone of the user being imported.Optional field.
langThe preferred language of the user being imported.Optional field.
descriptionThe description of the user being imported.Optional field.

The web page address of the user being imported.Optional field.

The institution of the user being imported.Optional field.

The department of the user being imported.Optional field.

The phone number of the user being imported.Optional field.
phone2The mobile phone number of the user being imported.Optional field.
addressThe address of the user being imported.Optional field.

The authentication method of the user being imported.Optional field.
If you have set up a different authentication system such as LDAP this will be different and you'll need to include the auth column in the csv.
suspendedWhether the user's account should be suspended.  In your source, specify the value 1 if a user's account should be suspended or the value 0 to leave the user's account active.Optional field.
Any custom user profile fields created will also be available.

Field mappings 

The Field mappings section allows you to enter the column title for each field if you want to match the names of the columns that are being imported to the HR Import field names from your HR system.

Field mapping is useful if the system is exporting the source data files or being connected to directly does not match the HR Import field.  Adding in mapping will let HR Import know what to look for in terms of fields and column names.

Competency field mappings for competency type custom fields display as 'type shortname and competency type ID number'.  For example checkbox2(002) or datetime1(001) .
On this page

Related pages

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.

Provide feedback about this page using the link in the bottom right of this page. 

Still have questions? Why not post them in the forums of the Totara Community?