DataImporter - Import Users

Table of contents

Overview

This article explains how to import users in Octopus. 

References

 

What you need to know:

The reference template files (.xlsx et .xml) to prepare imports are included in the Users.zip file.

Required Fields

  • FirstName - Text (100).
    • Represents the first name of the user.
  • Surname - Text (100).
    • Represents the last name of the user.

Optional Fields

  • EmployeeID – Text (50).
  • WindowsUsername - Text (50).
    • If the Windows username is used as the identification method for the user during import, it must be unique.
    • If the Windows username is used as the authentication mode for the Web Portal, it must be unique.
  • ExternalIdentifier - Text (50).
    • An identifier specific to the user that can be used to uniquely tie with an external system.
    • This field is used by ADSIReader to recognize Active Directory objects.
  • Active - Boolean.
    • Acceptable values are: 1 or 0, True or False, Yes or No.
    • The user will be active by default if this field is not included.
     
    NOTE
    By default, when a user is deactivated, Octopus removes the links between the user and its CIs. It is possible to modify this behaviour and ensure that the status of a user does not affect its links to CIs.

    If needed, communicate with the Octopus Service Desk, to have this option modified.
  • SharedAccount - Boolean.
    • Acceptable values are: 1 or 0, True or False, Yes or No.

    • The account will not be shared by default if this field is not included.

  • Department - Text (100).
    • If the department does not exist, it will be created during import.
  • SubDepartment - Text (100).
    • The system will create the sub-department if it does not exist.
    • When a sub-department is specified, the department will be mandatory.
  • Supervisor
    • Must contain the unique identifier to the user's supervisor as specified in the identification method.
    • The user must exist in Octopus because it will not be imported and will generate an error.
    • It is not required for the line containing the supervisor identifier to appear before the one of the employee.
    • If a user is indicated as his own supervisor, the system will accept the value but will give a warning during import.
  • Title- Text (100).
    • Represents the user's title.
  • Language
    • Accepted values are: English or French.
    • By default, if this field is not filled, it will be configured with the database default language.
  • VIP - Boolean.
    • Accepted values are: 1 or 0, True or False, Yes or No.
    • By default, if this field is not filled, it will not be activated during creation and will stay as is during update.
  • OfficePhone - Text (50).
  • PhoneExtension - Text (50).
  • CellPhone - Text (50).
  • Pager - Text (50).
  • Email - Text (320).
    • The email address must have a valid format, in other words it must contain an @ and a period (.) for .com, .ca, .gouv.qc.ca, etc.
  • Site – Text (200).
    • The system will create the site (or sub-site) during import if it does not exist.
    • It is possible to import many site levels, hence you can have a main site with it's sub-site.
NOTE: to import sub-sites, you need to separate the fields with a pipe "|", with the following format:
Your Site|Sub-site1|Sub-site2 and so on. 

This way all your sites and sub-sites will be imported with the same field in Excel, Access or another ODBC source. The system will create the sites and sub-sites if do not already exist.

Example: Canada|Quebec|Montreal|East Montreal.
  • Local – Text (50).
    • Represents the local number (office) of the user.
  • Note - Text (2000).
    • Import all additional information about the user that cannot be linked to other fields in the file in this field.
    • Data imported to this field replaces previous data at each import. The program does not add the information but replaces it.
  • DelegatesApprovalsTo
    • Must contain the unique identifier to the user's delegate as specified in the identification method.
    • The user must exist in Octopus or it will not be imported and will generate an error.
    • It is not required for the line containing the delegate to appear before the one of the employee.
    • If a user is indicated as his own delegate the system will generate an error and the line will not be imported.
       

Configuration File (XML)

The declaration of the source is done by indicating the User value in the <Content> tag.

NOTE: The XML file used as this example is for an import done from Excel 2007 or 2010. To explain the tags used in all types and to find out more about the types of files, please refer to the XML Configuration File article
<?xml version="1.0" encoding="utf-8" ?>

<Sources>

   <Source Name="ImportatUser">

      <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Import\Users.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>

      <ViewName>[Import User$]</ViewName>

      <Content>user</Content>

      <IdentificationMethod>UserByName</IdentificationMethod>

      <EmptyValueHandling>NoChange</EmptyValueHandling>

   </Source>

</Sources>

Information on Additional Tags

To import planned requests, the XML file can contain 3 additional tags. These tags are not mandatory and if they are not specified, the default values will be used.

User Identification Method

In the XML file to import the users, it is possible to specify how the user, supervisor or the approval delegate will be found.

Accepted values for this tag IdentificationMethod:

  • UserByID (Default value): User's employee number.
  • UserByName: User's first and last name.
  • UserByNameAndPhoneExtension : User's first name, last name and phone extension.
  • UserByWindowsUsername: User's Windows Username.
  • UserByExternalID: User's External Identifier.
What you need to know:
If the creation of users or adding the supervisor and/or the approval delegate is combined in the same import, the same identification method must be used. 

 

 

To use this tag, add the following line to the XML file: 

<IdentificationMethod>VALUE</IdentificationMethod>

Department identification method

In the XML file used to import users, it is possible to specify how the departments and sub-departments of the users will be found.

Accepted values for the DepartmentIdentificationMethod tag are:

  • DepartmentByName (Default value): Uses the department name.
  • DepartmentByNumber: Uses the department number.

 

To use this tag, add the following line to the XML file: 

<DepartmentIdentificationMethod>VALUE</DepartmentIdentificationMethod>

Management of Empty Fields

DataImporter can help clean the data contained in Octopus when empty fields are encountered. If this tag is not present, the NoChange default value will be used. 

If you want to use this tag as part of an import, it is important that your data source only contains columns to act on. DataImporter will systematically try to clean all these columns. You can clean all fields except:

  • Required fields.
  • Fields that have been configured as mandatory in the Octopus database.
  • Fields that accept only specific values, for example, boolean type fields (yes/no).


Permitted values for the EmptyValueHandling tag:

  • Clear: The existing value in Octopus will be cleared and the field will be empty.
  • NoChange (Default Value): Fields that are empty in the data source being imported will be ignored and the existing value in Octopus will be kept.

 

To use this tag, add the following line to the XML file: 

<EmptyValueHandling>VALUE</EmptyValueHandling>
X
Help us improve our articles








Help us improve our articles