Import Template
  • 17 Apr 2024
  • 15 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Import Template

  • Dark
    Light
  • PDF

Article Summary

Import Template

In the context of data migration or the appropriation of a new document management system, the creation of structures within the web interface can be a tedious task. In order to overcome this problem, the Constellio team created an import matrix in Excel format (.xls) to greatly speed up the process of entering information related to structures. In this article, we will see and explain the different components of the Excel file, as well as the best method to complete the import matrix. 

Record import is an option that allows you to import the taxonomy of virtual spaces, metadata related to document management tools (classification plan, retention schedule, and administrative units), folders, containers, and documents. 

Careful
Read the following documentation carefully before exploring the Excel template. By following the instructions in this article, you will be able to use the Excel template.
Mandatory Metadata
Required metadata in Excel templates is shown in red. However, they are also listed in the sections below. If metadata is mandatory, there must be a value in order to import it into Constellio. 

1. Principle of the import template

1.1 Components in the Import Matrix

After opening the file in the previous section, you will be able to observe three distinct components: 


Description field
1Metadata labelsThe first line of the Excel file represents the metadata name for each column. These labels are for informational purposes only, they are not considered when importing data.
2Metadata CodeThe second line of the file represents a string of characters (programming strings) associated with the metadata codes for each column.
3Excel TabsThe tabs inside the Excel document represent each structure to be imported into Constellio. The tab names represent the metadata codes of the structures in the Constellio code.
It is important not to change the names of the tabs in the Excel document or the programming strings on line no.2, because there are mechanics to read the contents of the Excel file, as long as you do not alter the programming elements.
The "ID" column is imported into the "Old ID" metadata. To add a new record, the value must be unique for the record type in the collection. Otherwise, the existing value with the ID (of the record type in the collection) will be changed.

1.2 Template Tabs

Each tab in the template represents the types of records that can be imported into Constellio. These tabs represent the metadata schemas of the records to be imported. To learn more about metadata schemas, we recommend reading the article, "Metada schemas." It is important not to change the names of the tabs in the Excel document or the programming stings on line no.2, as there are mechanics for reading the contents of the Excel file, as long as you do not alter the programming elements.

Excel Tab NameRelated Metadata Schema
categoryFile Plan
administrativeUnitAdministrative Units
retentionRuleRetention Schedule
uniformSubdivisionUniform subdivision
folderFolders
containerRecord
Containers
documentDocuments
storageSpaceBoxes

1.3 Import the template into Constellio

After completing the file of your choice, follow these steps. Information about each type of import can be found below.

  1. Once the file has been completed, you need to enter Constellio. Click on "Administration" in the navigation menu;
  2. Click on "Import Records";
  3. Decide whether the import should be done in a strict or permissive manner. The strict way only allows you to import the entire file if everything is compliant. Whereas, permissive import allows as much record to be imported as possible. Erroneous items will not be imported;
  4. Click on browse to choose the file and then on "Start Import." After processing, a message will be displayed indicating that the operation was completed successfully and the folders are created. 
Allow referrals to non-existing users
Allows you to import the template even if the specified users do not exist. 
Update existing records with the same old ID
Allows you to import templates, even if the old ID is already taken. This will delete the record linked to the old idenditant and will be replaced with the new imported one. 

1.4 Example of custom metadata additions

Here are the steps to follow if you want to incorporate a new custom metadata from your Constellio environment into your Excel template. The metadata must be existing in the collection to successfully import the template.

  1. View metadata schemas;
  2. In the type of your choice, consult the metadata;
  3. Write down: the name of the metadata, its code and its type;
  4. In the Excel template, add the metadata label in the first line;
  5. In the second line, enter your code. After the code, you need to designate how to fill in the field. The information to be entered in this step depends on the type of metadata. You can refer to the article "Import template header configurations" for more information. 
  6. Enter the values as expected.

2. Import Hierarchical Structures

Three structures are mandatory to properly operate Constellio's document management module: the classification plan, the retention schedule and the administrative units.

2.1 Classification Plan

To import the classification plan, here is the metadata to be filled in the template.

Metadata CodeField NameTypeDescription
idIDObligatoryA unique system identifier to identify the new entry in the classification plan structure.
codeCodeObligatoryCode associated with the topic (Coding). 
parentCodeParent CodeCisconstantialAllows you to link one topic to another topic that is hierarchically higher based on the code of the parent field.
titleTitleObligatoryAllows you to enter the name of the topic.
descriptionDescriptionOptionalAllows you to add a description.
keywordsKeywords
(separator=;)
OptionalAllows you to add one of the keywords, if necessary. 
retentionRulesRetention rules (separator=;) CircumstantialAllows you to bind one or more retention rules to a topic based on the retention rule code.
deactivateDisabledOptionalAllows you to deactivate the topic, which allows you to keep what is already associated with it, but blocks the addition of new folders associated with the topic.
Values to be entered:
- "True" if the topic is disabled
-"False" if the heading is not.
AbbreviationAbbreviationOptionalIdentifies an alternative, shorter name for the classification plan topic. 

2.2 Administrative Units

To import the administrative units, here is the metadata to be filled in the template.

Metadata CodeField NameTypeDescription
idIDObligatoryA unique system identifier for identifying the new entry in the structure of administrative units.
codeCodeObligatoryCode associated with the administrative unit (Codification).
parentCodeParent CodeCircumstantialAllows you to link one unit to another one hierarchically higher based on the code in the parent field. 
titleTitleObligatoryAllows you to name the administrative unit.
descriptionDescriptionOptionalAllows you to add a description to the unit, if needed.
decommissioningMonthMonth of dispositionOptionalAllows you to select, for information only, the month of disposition of the administrative unit.
AddressAddressOptionalAllows you to specify the address of the administrative unit.
AbbreviationAbbreviationOptionalIdentify another shorter name for the administrative unit. 
deactivatedDisabledOptionalAllows you to deactivate the unit, which allows you to keep what is already associated with it, but blocks the addition of new folders associated with the unit.
Values to be entered:
- "True" if the unit is disabled
-"False" if the unit is not.

2.3 Retention Schedule

To import the retention schedule, here is the metadata to fill in the template.

Metadata about the retention rule

Example of a value to enter

CodeField NameTypeExampleDescription
idIDObligatory«1»
«2»
Allows you to enter a unique value to identify the record.
titleTitleObligatory"Constitution"Allows you to name the retention rule.
codeRule NumberObligatory«111»
«801»
Allows you to enter the code for the retention rule.
descriptionDescriptionOptional"The retention rule relates to..."Allows you to enter the description of the retention rule.
corpusCorpusOptional"Reports 1802 v.2"Allows you to enter the name and provenance collection number of the retention rules.
corpusRuleNumberRule number (corpus)Optional«120»Allows you to refer to the rule number in the original compendium.
approvedApprovedConditional"True"The retention rule is approved.
"False"The retention rule is not approved.
approvedDate
type=date
pattern=yyyy-MM-dd
Approval Date
(yyyy-MM-DD)
Conditional«2020-10-01»The entered value respects the input mask of the value. 
juridicReferenceJuridic referencesOptional"Civil Code Art.X"Allows you to enter legal references related to the retention rule.
generalHowGeneral commentsOptional"For project contracts, see..."Allows you to enter a general note to the retention rule.
historyHistoryOptional"Formerly Rule X"Allows you to enter a note about the history of the retention rule.
keywords
separator=;
Keywords
(separator=;)
Optional"term1; term2'Allows you to enter keywords, separated by a semicolon. 
essentialDocumentsEssential documents?Optional"True"The retention rule applies to essential documents.
"False"The retention rule does not apply to essential documents.
confidentialDocumentsConfidential documents?Optional"True"The retention rule applies to confidential documents.
"False"The retention rule does not apply to confidential documents.
managerAdministrativeUnitsDepartment responsibleConditional"True"The retention rule is considered to be "Open Holder".
"False"The retention rule sets the holders to the retention rule.
administrativesUnits
separator=;
pattern=code
Departementcode
(separator=;)
Conditional"codeUA1; codeUA2»Allows you to define responsible administrative units for a retention rule.

Metadata for the Retention Period Table

Metadata CodeField NameTypeGoverned value to enter
copyType
structure=copyRetentionRules
item=X
Copy Type - Retention rule XObligatory"P"Allows you to create a primary time limit for a retention rule.
"S"Allows you to create a delay that is secondary to a retention rule.
code
structure=copyRetentionRules
item=X
Code - Retention rule XFacultative"C1"
«1»
Allows you to set the delay number.
title
structure=copyRentetionRules
item=X
Title - Retention rule X Obligatory"Preparatory documents"Allows you to name a retention period. 
description
structure=copyRetentionRules
item=X
Description - Retention rule X Optional"File documents here"Allows you to describe the amount of documents affected by the retention period.
mediumTypes
structure=copyRetentionRules
item=X
separator=;
pattern=code
Support Codes - Retention rule X 
(separator=;)
Obligatory"PA"
"PA; DM»
Allows you to set one or more media to a retention period based on the code of the "Media Types" value area.
Basically, Constellio has these codes:
-Paper = PA;
-DM = Magnetic Disc or Digital Document;
-Film - FI.
contentTypesComment
structure=copyRetentionRules
item=X
Supports notes - Retention rule X Optional"R1"
"R2"
Let us mention that a remark is applicable to the medium.
activeRetentionPeriod
structure=copyRetentionRules
item=X
Active - Retention rule X Obligatory«1»
«2»
«75»
Allows you to enter the value of the fixed period
«888»
«999»
Allows you to enter the value of the open period.
activeRetentionComment
structure=copyRetentionRules
item=X
Notes Active - Retention rule XConditional"R1"
"R2"
Let us mention that a remark is applicable to the time to the asset.
semiActiveRetentionPeriod
structure=copyRetentionRules
item=X
Semi-Active - Retention rule X Obligatory"0"
"1"
"2"
Allows you to set a closed delay at the semi-active stage.
semiActiveRetentionComment
structure=copyRetentionRules
item=X
Semi-Active Notes - Retention rule X Optional"R1"
"R2"
Let us mention that a note is applicable to the semi-active delay.

inactiveDisposalType
structure=copyRetentionRules
item=x

Inactive- Retention rule XObligatory"D"
"C"
Allows you to set the method of disposal at the inactive stage.
inactiveDisposalType
structure=copyRetentionRules
item=X
Notes Inactive - Retention rule X Conditional"R1"
"R2"
Let it be mentioned that a note is applicable to the inactive period for the first retention period.
copyRulesComment
separator=;
Notes on retention ruleConditional"R1: Keep official documents."Allows you to enter the code of a note as well as the application note.
Types of support
If you need to register a media support that Constellio does not have by default, follow the instructions in the Value Domains page.
Notes
In addition to the primary time limit, all retention rules must also have a secondary time limit (copyType = S, item = 2 for all metadata involved.

2.4 Uniform subdivisions

To import the uniform subdivisions, here is the metadata to be filled in the template. Uniform subdivisions must be entered in the "uniformSubdivision" tab. 

Metadata CodeField NameTypeDescription
idIDObligatoryA unique identifier that must be given to each of the uniform subdivisions. Uniqueness is valid only for subdivisions. When importing other items, such as the retention schedule, items can have the same identifiers as subdivisions.
You can enter a sequential here or copy the code you will give to each of the elements; however, it is important to take into account the uniqueness of the identifier and not to write special characters on it.
codeCodeObligatoryThe code of the uniform subdivision.
titleTitleObligatoryThe title of the uniform subdivision.
descriptionDescriptionOptionalA description of the uniform subdivision.
CommentsCommentsOptionalComments on uniform Subdivision.
retentionRule
separator=;
pattern=code
Retention Rule CodesConditionalThe code of the retention rule(s) related to that subdivision. If there are multiple partner rules, they must be separated by a semicolon.

3. Import virtual spaces

The import of the taxonomy present in virtual spaces is done in Import Records. 

The Excel file (ImportTaxoEspVirtEspVirt.xls) allows you to create the taxonomy inside one or more virtual space. 

Important
It is important not to change the first two rows of the Excel table.
  1. Create the taxonomy in the Excel file with the following columns: 
Metadata CodeField NameTypeDescription
IDIDObligatoryA unique identifier that must be given to each of the elements.
CodeCodeObligatoryThe code of the taxonomy of virtual space.
parentStorageSpace
pattern=code
Parent CodeConditionalAllows hierarchical structuring of taxonomy elements.
TitleTitleObligatoryThe title of the virtual space taxonomy.
descriptionDescriptionOptionalDescription of the taxonomy. 
capacityCapacity (cm)OptionalThe capacity of the space in cm.
decommissioningTypeType of disposalOptionalThe type of disposal related to the location.
containerType
pattern=code
Container type(s)OptionalThe type of container that the location can hold.
  1. To determine in which virtual space the taxonomy should be created, name the sheet with the code of the space prefixed with the term taxo and having the sequence Type as its sequence .
    Example: In this example, the name of the sheet is: taxo362Type.
    Step to get the code for a virtual space that has already been created
    1. Access Constellio's "Administration";
    2. Click on "Virtual Spaces";
    3. Click on "Display" the virtual space you want to retrieve the code;
    4. In the address bar of the browser, retrieve the last digits of the address.
  2. Once the file has been completed, it must be uploaded to Constellio to create taxonomies in virtual spaces. To do this, access the Constellio Administration;
  3. Click on "Import Records";
  4. Decide whether the import should be done in a strict or permissive manner. The strict way only allows you to import the entire file if everything is compliant. Whereas permissive import allows you to import as many records (therefore, users) as possible. Erroneous items will not be imported;
  5. Click on browse to choose the file and then on "Start Import." After processing, a message will be displayed indicating that the operation has completed successfully and the taxonomies of the virtual spaces are created.

4. Import Folders

To import your folders, here is the metadata to fill in the template. The Excel file will allow you to import folders into Constellio, but not electronic documents. 

Here is the Excel template for importing folders: 

Electronic documents
If you want to import electronic documents, you can use the import client.
It is important not to change the first two rows of the Excel table or the title of the tab.

For fields that refer to another record (parent folder, category, administrative unit), the link is done by the default ID, but it is also possible to specify the metadata you want to use, pattern=[metadata] in the header.

For example, to use the metadata code to the parent folder field (parentFolder), the header would be set as follows: 

  • parentFolder
  • pattern=code
To create a folder of a different type than the default, please use the "schema" metadata and not "type". When the value is not specified, the "default" schema is used. The value must be the schema code (e.g., USRemployeeRecords).
Metadata CodeField Name
TypeDescription
idIDObligatoryTextIdentifier to be given to the file. It can be sequential.
parentFolderParent CodeConditionalText (Reference)The identifier of the parent folder. Must refer to a folder that already exists in the system or to a new folder that is imported into the same file.
titleTitleObligatoryTextTitle of the folder.
administrativeUnitEnteredAdministrative UnitObligatoryText (Reference)The code of the administrative unit to which the file is associated.
Must refer to an administrative unit that already exists in the system or to a new administrative unit that is imported into the same file.
categoryEnteredFile plan categoryObligatoryText (Reference)The section of the classification plan to which the file is to be attached. Must refer to a field that already exists in the system or to a new field that the in imports into the same file.
retentionRuleEnteredRetention rule codeConditionalText (Reference)The number of the retention rule to which the folder is associated.
The record retention rule. Must refer to a retention rule that is related to the field entered.
keywordsKeywords (separator=;)OptionalText (List)Enter keywords related to this classification plan topic separated by semicolons.
mediumTypesSupportsObligatoryEnumeration (List)Indicate the support of the file. The codes for the "Media Type" value area must be entered. By default, Constellio has the following types:
-PA (Paper);
-DM (Magnetic Disc);
-FI (Film).
openingDateOpening dateObligatoryDateDate the file was opened.
Format: yyyy-mm-dd
enteredClosingDateClosing dateOptionalDateDate the file was closed.
Format: yyyy-mm-dd
actualTransfertDateTransfer Date (yyyy-MM-dd)OptionalDateDate the folder was transferred to semi-active.
Format : yyyy-MM-dd
actualDestructionDateDate of DestructionOptionalDateDate the record was destroyed, if applicable. Format: yyyy-mm-dd
actualDepositDateDate of DepositOptionalDateDate the file was placed on file, if applicable.
Format: yyyy-mm-dd
copyStatusEnteredItem Status SeizedObligatory
BooleanCorresponds to item status.
P = Primary
S = Secondary
type
pattern=code
TypeOptionalReferenceCorresponds to the type of folders. You must enter the code of the specific folder schema to which you want to link this folder.
securityClearanceLevelsSecurity clearanceOptionalReferenceThe security classification to be applied to the file. Must include the security classification wording to be applied.
descriptionDescriptionOptionalTextDescription related to the folder.
containerContainerOptionalReferenceContainer linked to the folder. Must include the number of the means of containment.
linearSizeLinear size (cm)OptionalNumberCorresponds to the linear measurement of the backrest in cm.
abbreviationAbbreviationOptionalCharacter StringAbbreviation of the folder name.


5. Import containers

To import your contents, here is the metadata to fill in the template. The information on the containers to be imported must be entered in a spreadsheet with the title "containerRecord". 

Here is the Excel template for importing containers: 

Metadata CodeField Name
TypeDescription
idIDObligatoryTextThe identifier to be given to the container. It can be sequential.
typeType of ContainerObligatoryReferenceThe code of the license plate type, as defined in the value field.
identifierContainer No.ObligatoryCharacter StringTitle of the container.
decommissioningTypeDisposition typeObligatoryReferenceThe type of decommissioning. Possible values are:
T = Transfer to assets
C = Retention
D = Destruction
storageSpaceStorage spaceOptionalReferenceThe code of the location, as defined in the value field.
fullFull?OptionalBooleanWhether the container is full or not.
Accepted values:
TRUE = Full
FALSE = Not Full
descriptionDescriptionOptionalCharacter StringDescription of the container.
positionPositionOptionalCharacter StringPosition in the location.
CapacityCapacity (cm)OptionalNumberContainer capacity (in cm).
administrativeUnitsAdministrative UnitsObligatoryReferenceThe code of the administrative unit(s) to which the file is associated.
createdByCreated byObligatoryReference The username of the person who created the license plate.
modifiedByModified byOptionalCharacter StringThe username of the last person who modified the container.
realTransferDateTransfer DateOptionalDateDate the folder was transferred to semi-active.
Format: yyyy-mm-dd
completionDateCompletion DateOptionalDateCompletion Date
Format: yyyy-mm-dd
realDepositDateDeposit DateOptionalDateDate of deposit of the container.
Format = yyyy-mm-dd
borrowedBorrowed?OptionalBooleanWhether the container has been printed or not.
Accepted values:
TRUE = Borrowed
FALSE = Not borrowed
borrowerBorrowerOptionalCharacter StringThe username of the person who borrowed the property.
borrowDateDate of BorrowingOptionalDateThe date the container was borrowed.
realReturnDateReturn DateOptionalDateDate of return of the container.
Format: yyyy-mm-dd

6. Import documents

To import the card of your documents, here is the metadata to fill in the template. 

Careful
It is not possible to import the contents of a document (files) with a template. To import documents in bulk with content, it is recommended that you use the Import client
Sync Automatically
As of version 9.2.12, it is possible to automatically synchronize file names with document titles when updating documents by template. To do this, add the following line to the header (row 2) of the "Title" column.
useTitleAsFilename=true

Here is the Excel template for importing document cards:

System CodeField Name
Type
idIDObligatoryCharacter StringDocument ID. By default, this value is recorded in the "LegacyIdentifier" metadata and a new system id will be generated.
To use the system identifier when updating existing documents instead, add the line "importAsLegacyId=false" to the header .
type
pattern=code
TypeOptionalReference

Corresponds to the value domain of the folder type. It is possible that other metadata will become mandatory, depending on the configuration of the chosen type.
If left blank, the default folder type will be used.
folderFolderObligatoryReferenceThe identifier of the folder in which the document is located.
titleTitleObligatoryCharacter StringCorresponds to the title of the document card. When updating an existing document, it is possible to synchronize the title of the contained file with the title of the card by adding the line "useTitleAsFilename=true" to the header. 
keywords
separator=;
KeywordOptionalCharacter String (Multivalue)Corresponds to the keywords used for the search. Use the ";" character to separate the different entries.
descriptionDescriptionOptionalTextDescription related to the document.
authorAuthorOptionalCharacter StringCorresponds to the author of the document. Doesn't need to be a registered user in the system.
CompanyOrganizationOptionalCharacter StringCorresponds to the organization.
subjectSubjectOptionalCharacter StringCorresponds to the subject of the document.
modifiedBy
pattern=username
Modified byOptionalReferenceCorresponds to the last user who modified the document card. If not specified, the user performing the import will be used by default.
createdBy
pattern=username
Created byObligatoryReferenceCorresponds to the user who created the document card. If not specified, the user performing the import will be used by default.

7. Import Value Domains

To import items from a value domain, here is the metadata to fill in the template.

  1. You must have created your value domain in Constellio;
  2. Put the code of the value domain in the template tab;
    Value Domain Code
    To get the code of the value domain, look at your domain and take the information from the URL. 
  3. Fill in the information to create the value domain;
  4. Import into Constellio. 
Metadata codeField NameTypeDescription
idIDObligatoryIdentifier of the value.
titleTitleObligatoryCorresponds to the title of the value. 
codeCodeObligatoryCorresponds
AbbreviationAbbreviationOptionalCorresponds to the abbreviation of the value domain.
descriptionDescriptionOptionalMatches the description related to the value domain.

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.