Add documents using manage imports
There are a number of methods to add documents to FileHold. Users of document scanning applications will typically capture information from these documents during scanning. This information can be transferred to FileHold metadata fields using the Manage Imports tool, also known as the FileScan Bridge.
By default, Manage Imports works with Smartsoft Capture for scanning and indexing files before adding them to FileHold. It can also work with many other applications from Abbyy, Kofax, Kodak, etc. The FileHold professional services team is available to assist with configuring Manage Imports to work with your scanning solution. If you require assistance, contact [email protected].
The Manage Import tool can be used with data sources other than scanning applications such as FileHold Outlook Watched folders with the "Export XML files in Document Import compatible format". In fact, any application that can generate the necessary XML file can feed documents to Manage Imports. See our blog for an example of mass barcode scanning files with Powershell and the open-source scanning application, ZBar.
Configuring Manage Imports for importing scanned and similar documents
Documents can be imported into the document management system along with their metadata when using an XML file with the correct structure. This method of setting up the Manage Imports tool is for use with XML files that contain only metadata field names and values. Prior to importing the documents using the Manage Imports tool, the schemas and metadata fields must exist in the document management system in order to capture the correct schemas and metadata fields.
You must have a role of library administrator or higher in order to add or change an import profile.
Create an import profile
-
In FDA, go to Tools > Manage Imports and click Add.
-
If the document import format has been set to “Both” in the user preferences, set the import format to Dynamic import / Classic FileHold XML. Otherwise, ensure the import format is set to Dynamic import / Classic FileHold XML in the user preferences.
-
In the General tab, enter an Import Name and Description.
-
In the Select Folder containing Import File field, click Browse to locate the folder with the XML. If there is more than one XML file in the folder, they should all have the same type of contents.
-
Click Retrieve XML Fields. You should receive a message saying that XML fields were successfully retrieved.
-
To share the import with other users on the local machine, select the Share this import with other users check box. This will allow any imported documents to appear in the other users’ Inbox as well as your Inbox for filing. See Shared Imports for more information.
-
In the Job Automation Settings area, select the following check boxes if applicable:
-
Watch for new files to be imported and automatically tag and bring them into the Inbox – This setting is typically used for scanning documents and does not pertain to migrating documents from another system. Ignore this setting.
-
Delete input files after they have been successfully added to the FileHold Library - The files where the documents were imported from will be deleted automatically. This keeps the import folder clean and reduces storage space needed.
-
Move input files to the selected folder - After files have been imported into FileHold, they can be moved from the file location from which they were imported from to another location on the local computer or network. If a file with the same name exists in the destination folder, a unique number will be appended to the file name.
This option cannot be used in conjunction with the "Delete input files after they have been successfully added to the FileHold Library" check box.
-
In the Field Mapping tab, select the schema to map the imported XML fields to from the Select Destination Document Type drop-down list.
-
Once a schema is selected, each of the metadata fields in the schema will be shown on the right of the dialog in the Destination Metadata Field column. Map (select) the corresponding fields in the Source Field column. You will be able to select any metadata fields from the XML file that were defined with the <Name> tag. You will also be able to select any database fields that were defined in the next dialog tab. See step 9 for details.
-
In the Database Lookup tab, you can map metadata fields directly to an SQL database or set a configured schema lookup to execute. This allows you to use a metadata field mapped from the XML file as an index into a database table or view. Read more information on how to setup the SQL database lookup or a schema lookup.
A schema defined database lookup will generally be easier to use with Manage Imports and avoids extra permission requirements on your database for the direct SQL method.
-
In the Auto-filing tab, you can select the location for the imported documents. Select from the following options:
- Auto-filing off - Documents will be sent to the Inbox for processing.
- Automatically send files to a single folder in FileHold - You can set the destination folder for all the documents in the import to a single folder location. Click Browse to select the folder in the Library.
- Automatically send files to the auto-filing location defined in the document schema - Auto-filing rules are applied that are set in the schema.
- Automatically send files to the auto-filing location according to the rules below:
- Use an auto-filing template - Select the template name from the list.
- Use a custom auto-filing script - Select the auto-filing script from the list.
-
In the Job Automation Settings area, select the Automatically "Send Files" to the FileHold Library with an Inbox Status of "Ready to Send" to bypass the Inbox and go directly to the folder location set above. This way you do not have to go to the Inbox to process the documents unless there is an error sending; the documents will be sent automatically to the set folder location.
-
Click OK to save the Import settings.
If you have set the profile to watch a folder, this will begin immediately after you save the profile and continue while a user is logged in.
The manage imports XML file format
This article assumes the reader is familiar XML files.
Use the following XML structure to create a XML file that corresponds to the documents that will be imported using the Managed Imports tool.
- The Batch element contains all of the documents along with their associated metadata fields that will be imported into FileHold. This is the root element for the document. It contains at least one Page element.
- Page contains all of the information related to a single document. It contains at least one Field element.
- A Field element contains information about a reserved field or a metadata field. It contains exactly one Name element and exactly one Value element.
- The Name element has the value of a case sensitive reserve field name or metadata field name. When the dynamic import option is not selected, the metadata field name does not need to match the name used in the FileHold metadata definition as field mapping will create the link between the value in the XML file and the actual metadata field definition.
- Value is used to contain the actual data.
There are a few reserved names used by Manage Imports for the Name element. All other Name elements are available for mapping to metadata fields.
- File Name - The name of the file in the local file system. Relative or absolute paths can be used. The file name is the only mandatory content inside the Page element. The path must be in the same folder tree and at the same level or lower than the XML import script.
- LibraryPath - The complete path in the library where the document will be filed in the format cabinet_name/drawer_name/foldergroup_name/folder_name. The folder group name can be empty. Used with dynamic import.
- DocumentSchema - The document type (schema) that the document will be filed under. Used with dynamic import.
For example, the location of the document in the file system would be expressed in the following way.
<Field>
<Name>File Name</Name>
<Value>C:\Users\Username\MyDocuments\FileHold\Document.docx</Value>
</Field>
All other fields and values can be mapped to metadata fields defined in FileHold. For example:
<Field>
<Name>Invoice Number</Name>
<Value>123456</Value>
</Field>
Save the XML file with any file name. Use the Manage Imports tool process below to import the documents into FileHold.
Sample XML code containing metadata field values:
<?xml version="1.0" encoding="UTF-8"?>
<Batch>
<Page>
<Field>
<Name>File Name</Name>
<Value>C:\Mortgages\Output\mortgage29-091210123555.pdf</Value>
</Field>
<Field>
<Name>Client Name</Name>
<Value>John Doe</Value>
</Field>
<Field>
<Name>Closing Date DD-MM-YYYY</Name>
<Value>28-02-2013</Value>
</Field>
<Field>
<Name>Amount</Name>
<Value>250000</Value>
</Field>
<Field>
<Name>DocumentSchema</Name>
<Value>Mortgage Application</Value>
</Field>
</Page>
<Page>
<Field>
<Name>File Name</Name>
<Value>C:\Mortgages\Output\mortgage29-091210123555.pdf</Value>
</Field>
<Field>
<Name>Client Name</Name>
<Value>Marvin Martian</Value>
</Field>
<Field>
<Name>Closing Date DD-MM-YYYY</Name>
<Value>28-09-2012</Value>
</Field>
<Field>
<Name>Amount</Name>
<Value>250000</Value>
</Field>
<Field>
<Name>DocumentSchema</Name>
<Value>Mortgage Application</Value>
</Field>
</Page>
</Batch>
Special considerations for importing metadata
- When you retrieve XML fields, only the first <Page> section in the XML file is inspected. XML files that have more than one metadata structure should only be used when importing documents previously exported from FileHold.
- If the target metadata field is a dropdown or drilldown, the value in the XML file must exactly match one of the values in the dropdown or drill down. Multiple values for a dropdown can be separated by a semicolon.
- The complete path for a drilldown metadata field must be supplied. The separator between each level must be the forward slash "/" regardless of the separator character that is defined in the field setup.
- Check box fields must have a value of True for checked or False for not checked.
- Field validation failures such as out-of-range values, missing required fields, etc. will be imported, but only as far as the inbox. The information will need to be corrected before the document can be sent to the repository. There will be an on-screen warning of an error condition. The warning dialog can be suppressed.
- If a database lookup produces no results, the effect will be the same as if the looked up metadata had been blank.
- The XML file can only contain valid XML. If a metadata value to be imported contains a value that is reserved in XML, it must be escaped. For instance, the ampersand (&) character is reserved in XML. If the metadata value is "Paul & Mary", it must be included in the XML file as "Paul & Mary". As with normal metadata field input, the character sequences <a - <z, <!, and <? are not allowed. The same is true for the import. If these character sequences exist in your source data, they must be modified in some way before importing them. For example, "<a" could be expressed as "< a". In the XML file it will be written as "< a".