Overview
DataBridge already has great support for SuperOffice entities like ‘Company’ and ‘Appointment’, DataBridge imports the data for these entities straight into the SuperOffice database to make the data available to your SuperOffice users.
Importing documents into SuperOffice raises a bigger challenge as a physical document/file is required besides the document details that goes into the database. When we talk about a physical document we mean the actual digital file like a Word or PDF document. A document entity represents document metadata, as shown in the SuperOffice document dialog. Both are required to represent a document inside SuperOffice.
Source
DataBridge supports the import of documents, including physical documents from:
- FTP and SFTP
- Microsoft OneDrive
- Microsoft SharePoint
Besides the physical document file(s), an import file is needed in which there is more information on the document, like the company to which the document will be linked. The source needs to provide both types of files.
In the example below, there is an import file that holds the details for 3 documents that will be imported. On the FTP location that is used in this example, you also see the 3 physical documents on the same FTP location as the import file.
Document size
Note that each document can be a maximum of 10MB. Documents that exceed this amount are not processed.
How to
Step 1 - Configure Profile
In the first step of the wizard, configure the access to the source. This is where you also configure what import file to use. How this is done, depends on the source platform. In the example below, FTP is used.
If you have a profile that imports data from FTP to SuperOffice the required configuration options become visible in the DataBridge wizard.
In the ‘Configure fields’ wizard step, you can map document entity fields just like any other SuperOffice entity. Always consider mapping to a proper ‘Document template’ for proper ordering in SuperOffice.
Configure document import
When document fields are configured you will see a document import section on the ‘Destination settings’ page. Here you can configure which file should be copied from your storage location to SuperOffice in regards to the document entity being processed.
- Field, select the column from your import file that contains the file path or unique value that’s part of the file path. Currently, the file extension must be included with this field when you have mixed file types.
- File path format, leave this field empty if the selected field in the import file already contains the full file path. Or use the following format to create the proper file path: '/documents/[:value:].pdf', '[:value:]' is replaced by the value of the selected field. So when the current processing line has the value ‘20190001A’ in the selected field we try to load the file '/documents/20190001A.pdf' from your storage location.
The file path format is case sensitive! - Document unavailable action, what to do when no document is available on the storage location. The option 'Continue processing the line' allows you to update existing SuperOffice document entities without affecting the file. Marking as failed or skipped will not create or update any document entities in SuperOffice when no file was loaded.
Be careful when using the “Continue processing the line” option! Without a file, it’s impossible to create a new document in SuperOffice, so in that case, the document entity will fail with the message “A document file is required for this operation but not available”; however other entities on the same line will be processed as usual. So only use this option in case you explicitly want to update existing document entities.
Please consider: just like with the other entity types you can configure duplication handling and default list values, when dealing with documents it’s even more important to make sure these settings are correct.
Run and verify
All offered scheduling methods are compatible with document import, so configure the rest of the profile according your requirements and run it. The processing time required per document depends a lot on infrastructure and file size, so it can take longer than expected.
Afterward the job log will show which file was transferred for each line:
File '43.txt' retrieved from FTP, 23 bytes read.
Depending on the document unavailable action skipped or failed messages will be shown:
This line has failed with the message 'File '49.txt' not read from FTP. The file at '/49.txt' could not be found or does not exist.'