...
Scroll ignore | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Copyright WEBSALE AG 2010
- Confidential-
Transfer to third parties only allowed with written permission of WEBSALE AG.
- Confidential-
Transfer to third parties only allowed with written permission of WEBSALE AG.
General
The following describes how the upload Upload-module works and how an ERP system can fetch the upload Upload-files from the store shop server via SFTP.
Upload process
Upload products
In the storeshop, upload products are marked accordingly. For each upload product, a customer can upload one or more upload Upload-files after the order process.
Upload-ID /
...
Position-ID
As soon as an upload product is placed in the shopping cart, the store shop generates an upload Upload-ID once. This upload Upload-ID always remains the same during a session.
In addition, an item Position-ID is generated for each upload product. If an upload product is subsequently deleted from the shopping cart, the associated item Position-ID is also deleted.
For each upload Upload-ID and position Position-ID, the store shop synchronously creates upload directories with the same name, in which the upload files are stored by the upload Upload-module.
The directory structure is as follows:<upload root directory>
.
Upload-ID (upload Upload-ID of an order)
finished.sync (Finished-file)
upload.log (log Log-file)
fileinfo.dat (info Info-file)
ItemPosition-ID1 (upload Upload-ID of the 1st itemposition)
Upload-file1
Upload-file2
...
Upload-fileN
Position-ID2 (Upload-ID of the 2nd position)
Upload-file1
Upload-file2
...
Upload-fileN
...
Position-IDN (Upload-ID of the N. position)
Upload-file1
Upload-file2
...
Upload-fileN
...
Transfer of the Upload-ID / Position-ID in the order data
The ERP system is informed of the upload Upload-ID and position Position-ID within the purchase order.
Extract from the order data:
Code Block |
---|
<Order> |
...
... |
...
UploadID = 5DA7106A ... |
...
</Order> |
...
<OrderList> <Item> Number = 1234 Name = Product 1 UploadID = A882F49D (Position) ... </Item> <Item> Number = 1111 Name = Product 2 UploadID = A22445566 (Position) ... </Item> <Item> Number = 567890 Name = Product 3 UploadID = A22445566 (Position) ... </Item> <OrderList> |
Based on this information, the ERP system can pick up the upload Upload-files for each order specifically via SFTP.
Administration files
In addition to the upload Upload-files, there are 3 administration files directly below the upload directory. These are:
finished.sync (completion Completion-file)
upload.log (log Log-file)
fileinfo.dat (info Info-file)
...
File "finished.sync"
...
Since the orderer can upload multiple files, he has to inform the upload Upload-module when he has finished uploading all files. For this purpose, the upload Upload-module creates a completion file named "finished.sync" in the upload directory associated with the upload Upload-ID.
A single line with the date and time of completion is written to this file. The format is "YYYY/MM/DD<space>HH:MM"
Example:
2013/03/27 18:57
Please note:
An ERP system is not allowed to collect the upload Upload-files via SFTP until the finished.sync file exists, i.e. the orderer has completed the uploads. For this purpose, the ERP system must implement a polling procedure for the finished.sync file.
File "upload.log"
In addition, a log file named "upload.log" is written to the upload directory associated with the upload Upload-ID and the log data is displayed to the ordering partyorderer. The file is saved in TSV format (tab as field separator) and contains the following fields:
...
The following "types" of actions are currently supported by the internal upload Upload-module:
Type | TechType |
---|---|
File deleted | delete |
Uploads completed | finished |
File uploaded | upload |
File already exists | uploaddupfile |
Unlocked (not used at the moment) | unlocked |
Maximum size per file exceeded | filelimit |
Maximum number of files per order item exceeded | poslimitcount |
Maximum size per order item exceeded | limitmb |
Incomplete data upload | uploaderror |
From the 2nd line on the data follows.
Example:Date Time Type TechType File Upload-ID Position-ID
12/19/2011 09:21 File upload upload front.pdf 0708D800 905B1908
12/19/2011 09:21 File delete delete front.pdf 0708D800 905B1908
19./12
./2011 09:22 File upload upload front1.pdf 0708D800 905B1908
2011/12/19 09:22 File upload upload back1.pdf 0708D800 905B1908
2011/12/19 09:23 Uploads completed finished 0708D800 90
5B1908905B1908
File "fileinfo.dat"
The customer can select the content of the file via a select box for each upload Upload-file.
The file is saved in TSV format (Tab as field separator) and contains the following fields:
...
Column name | Description |
---|---|
File | Name of the upload Upload-file |
ID | Integer Value. Position of the entry in the select box, starting from 0. |
Type | Language dependent entry in the select box. E, e.g. |
PosIDPositionID | Position-ID |
Starting from the 2nd line, the data follows.
Example:
File ID Type PosID
File1.pdf 0 Please select 696EE098
File2.pdf 1 All in one document 696EE098
Example directory after a completed upload:<upload root directory>
0708D800 (Upload-ID)
905B1908 (Item Position-ID)
Front1.pdf (Upload-file)
Back1.pdf (upload Upload-file)
finished.sync (Finishing-file)
upload.log (Log-file)
fileinfo.dat (info Info-file)
Please note:
After the ERP system has fetched the upload Upload-files via SFTP, the complete upload directory must be deleted by the ERP system via SFTP command. In addition, WEBSALE AG will delete all upload directories older than 6 weeks. (Clean up function of directory "corpses")
Include Page | ||||
---|---|---|---|---|
|