On this page
PalmOrder Server connects the accounting system to mobile devices. The accounting system works with files in outbox and inbox; the server handles device connections and data transfers.
Data for devices
The integrator places exchange.xml and other mobile application configuration files in outbox.
For the standard configuration, you can use the prepared standard exchange.xml. Download it and place it in outbox with the name exchange.xml.
The accounting system places the following in outbox:
- XML tables with reference data, prices, stock, routes and other data;
- images and other data files for the mobile application.
The XML table file name must match the name in exchange.xml. For example, <db name="ref_products"/> requires ref_products.xml in outbox.
The accounting system must publish only fully written files. For example, write a table to outbox/ref_products.xml.tmp, close the file, then atomically rename it to ref_products.xml in the same directory. The temporary name must not match any file patterns in the exchange profiles.
Documents from devices
When a worker sends documents, the server creates an XML file in inbox. Its name contains the document type and syncName; do not use it as a business identifier or try to predict the suffix generated by the server.
One XML file can contain several documents. For every new file, the accounting system must:
- read all documents;
- import each document into its database and record its processing result;
- move the file to an archive directory or delete it only after all documents have been processed successfully.
If an import is interrupted, the next run must skip documents that have already been imported. To do this, record each document's processing result using a stable key defined by the integrator.
The document structure is described in Documents from devices.
Files from devices
The server stores files sent separately from documents in inbox/files. These can include photographs. The accounting system must retrieve them according to its own processing rules, just as it does with documents in inbox.
Device-specific directories
By default, all devices use the shared inbox and outbox. An administrator can assign a separate incoming or outgoing directory to a specific syncName. This is useful when workers use different departments or accounting databases.
See Data storage for setup instructions.
