Importing attachments to the system
Introduction
The document describes the mechanism for importing attachments into the system. Many objects in the system can have attachments - files of any content. Usually, these are additional elements that allow access to, for example, documentation. They can also be original documents (e.g., orders, invoices, delivery documents). They can also be, for example, technical drawings that supplement work orders with execution documentation. Any of those items can be supplemented with such attachments. They can be added manually but also imported automatically into the system. That makes it possible to attach this mechanism to a process associated with, for example, design offices or ERP systems, which automatically export files and then import them in bulk into the AMAGE system speeding up all operations.
Data preparation
The example will show how to import technical drawings for a work order. Each work order has the ability to store any attachments. This is made available through the desktop application (through the computer) but also through the mobile application (for those orders to which the user is assigned).
As already said attachments can be added:
-
added manually to each order - that can be done in the case of a smaller amount of data. If you need to add hundreds of files (and update it often), this approach is inefficient.
-
import automatically by the importer.
To do this we need to have:
-
list of files you want to import
-
excel in which we say to which order to pin which file. That can be arbitrary, i.e., one file can be attached to multiple orders and multiple files can be attached to one order. We do that either by the name of the order or by its number (or UUID, it’s such a unique identifier).
For example, we have the file 123.pdf
and we have an order with the name /00B-R-EL/LLV-600-16-B-001
to which we want to attach this file.
In order for the importer to import the file to the exact order (or other object) the data that identifies this object in excel must be unique. In this case, there must be an assumption that the order name is unique, i.e., the system will find only one such order with such a name. Using various import parameters, we can ensure that such a unique record is found. |
As we want to import this attachment to this job we make an entry in excel where one column is the name of the job and the other is the name of the file. We proceed like this with each file. In addition, one file can be repeatedly added to multiple objects (here orders)
The system saves files uniquely, i.e., even if one file (as above 123.pdf) is attached to 100,000 files. work orders, it will exist in the system as one physical file that is "attached" to these 100,000 orders. The AMAGE system will not take up more space than necessary. |
Importing
We import this through the standard importers view. We choose to import attachments.
-
We create a zip archive with the mapping file (Excel) and all the necessary files. That is, in the ZIP file we have an excel file, e.g., import.xlsx, and all the files we want to import
It is recommended that the archive should not exceed several hundred megabytes. Such an archive is sent to the server, unpacked, and imported into the system. Larger archives will take longer to upload, so it is better to break larger imports into smaller steps. |
-
run the file importer (attachment) and select the file, upload and import
-
the zip file will be sent to the server, then unpacked and all files will be loaded into the appropriate orders.
-
ready :)
We can do the same with the import of attachments to the other system elements provided in this importer. The importer will verify the existence of the file in the object and will only import new attachments on subsequent imports.
This importer can also be plugged into the automatic integration system, i.e., the process can include the automatic import of attachments to objects in the system. The attachments will be uploaded via an SFTP server and AMAGE will automatically upload/update them in the system. |
The Howto is based on system version 1.17.0.2 (03.2022) and presents features that may not be available in your system. Ask AMAGE about making this functionality available. |
Due to the ongoing development of the system, some screens or configuration files may look slightly different, but will still retain the full functionality described here. This does not affect the essential functions described in this document. |