HR import external database site settings
  • 11 Jan 2024
  • 10 minutes to read

HR import external database site settings


Article Summary

Configure the settings for importing from an external database with HR import, including the connection details.

After configuring the settings, 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 on your site.

If your column does not support empty string values and you would like to delete the field's value, you can create a database view of your data and conditionally provide the null or empty string.

SettingDescriptionNotes

Database type

The database type, e.g. MySQL or PostgreSQL.

Options that appear in the Database type dropdown are dependent on which database drivers have been set up in your php.ini file.

Database name

The name of the database to which you are connecting.

-

Database hostname

The database hostname, e.g. 'localhost'.

-

Database user

The user account that has the appropriate database access privileges.

-

Database password

The user account password.

-

Database port

The port ID number of the database

-

Database table

The name of the database table that contains the element data.

-

Fields to import

Decide which fields you would like to import. The fields available in this section vary depending on the element. 

See Fields to import on this page for more information.

Field mappings

Allows you to enter the column title for each field if these vary from the default. The fields available in this section vary depending on the element.

See Field mappings on this page for more information. 

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 external database which corresponds to two different custom fields.

Field mappings

The Field mappings section allows you to enter the column title for each field 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 you are connecting to, or the system exporting the source data files, 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).

Competency

There are a number of mandatory and optional fields for the competency source.

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 parentheses. For example 'Example date time (Analytical)' or 'Example location (Strategic)'.
FieldDescriptionNotes

idnumber

This is the competency item ID number.

Mandatory field.

fullname

The full name of the competency item.

Mandatory field.

timemodified

A Unix timestamp that confirms the last time the competency 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 competency is to be deleted, or the value 0 to create or update the competency.

-

frameworkidnumber

The ID number of the competency framework in which the competency items should sit.

Mandatory field.

aggregationmethod

The aggregation method to be applied to this competency item. 

  • Specify the value 1 for the All option
  • Specify the value 2 for the Any option
  • Specify the value 3 for the Off option

Mandatory field.

shortname

The competency item short name.

Optional field.

description

The competency item description.

Optional field.

parentidnumber

The ID number of the competency item's parent item.

Optional field.

typeidnumber

The ID number of any competency types you may have created. Note that only one type per item may be specified.

Optional field.

Job assignment

If you don't update the 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 mandatory and optional fields for the job assignment source.

FieldDescriptionNotes

idnumber

This is the job assignment's ID number.

Mandatory field.

useridnumber

This 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 full name 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 an appraiser.

Optional field.

Organisation

There are a number of mandatory and optional fields for the organisation source.

FieldDescriptionNotes

idnumber

A unique identifier 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 Configure 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.

typeidnumber

The 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 mandatory and optional fields for the position source.

FieldDescriptionNotes

idnumber

A unique identifier 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 before importing. 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 Configure 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.

typeidnumber

The 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 mandatory and optional fields for the user source. 

Any custom user profile fields created will also be available.
FieldDescriptionNotes

idnumber

A unique identifier 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 an idnumber, it will then make it possible to sync their data by including them in database import. You will also need to tick the HR import checkbox on 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 user's profile once you've enabled/clicked the eye icon for the User import option via Quick-access menu > 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.

password

A new or replacement password.

When users are created using the import process and the password column is not included, 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.

firstnamephonetic

The phonetic spelling of the user's first name.

Optional field.

lastnamephonetic

The phonetic spelling of the user's last name.

Optional field.

middlename

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

Optional field.

alternatename

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 reactivated users.

Use 1 to disable and 0 to leave active. 

Optional field.

city

The city or town of the user being imported.

Optional field.

country

The country of the user being imported.

Optional field.

timezone

The time zone of the user being imported.

Optional field.

lang

The preferred language of the user being imported.

Optional field.

description

The description of the user being imported.

Optional field.

url

The web page address of the user being imported.

Optional field.

institution

The institution of the user being imported.

Optional field.

department

The department of the user being imported.

Optional field.

phone1

The phone number of the user being imported.

Optional field.

phone2

The mobile phone number of the user being imported.

Optional field.

address

The address of the user being imported.

Optional field.

auth

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 field.

suspended

Whether 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.

tenantmember

The ID number of the tenant the user should be a member of.

Optional field.

tenantparticipant

The ID number of the tenant the user should be a participant in.

Optional field.

C001 - Creating usersThe Totara Academy has a whole course dedicated to Creating users in Totara. Here you can learn more on how to add users, manage their data, see best practice, and give it a go yourself.

© Copyright 2024 Totara Learning Solutions. All rights reserved.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.