On this page
This scenario checks the complete exchange workflow with PalmOrder Server: the device receives prepared XML tables from outbox, and a created order returns to inbox. Start with the ready-made demo set or data from your accounting system.
Before you begin
Make sure that:
- PalmOrder Server is installed and running;
- the correct
inboxandoutboxdirectories are set in the control panel; - the server has an active license or a demo device is available;
- an Android device is paired with the server;
- the device can open the server address through the local network or HTTPS.
1. Prepare tables in outbox
For the first exchange, choose the ready-made set or prepare your own XML tables. Both options use the file list below.
Ready-made demo data
Download the English XML table set. A Ukrainian set is also available.
The set contains 1,000 products and 32 groups, 100 customers and 10 groups, price categories, trade points, routes and sample debt documents.
Extract the archive and copy all XML files directly into the required device’s outbox. The archive includes a matching exchange.xml. Then continue with 3. Download the exchange file.
The Download data profile replaces the corresponding references on the device with this set. customer_product_data is empty: the example has no customer-specific prices, and previous entries in this table will be cleared. Product images and print forms are not included.
Individual files from the English set:
| File | Contents |
|---|---|
ref_products.xml | 1,000 products and 32 groups, prices, stock and pack sizes. |
ref_customers.xml | 100 customers and 10 groups, price categories, addresses and balances. |
vl_cat_prices.xml | 3 price categories matching the product price fields. |
vl_delivery_types.xml | 3 delivery types. |
vl_pay_types.xml | 5 payment types. |
vl_trade_points.xml | 110 trade points linked to customers. |
doc_debts.xml | 4 sample debt documents. |
doc_debts_products.xml | 5 product lines for those debt documents. |
customer_product_data.xml | The customer-specific price schema with no records. |
routes.xml | 196 trade point visits by day of week. |
exchange.xml | Profiles for downloading all tables in the set and sending documents. |
README.txt | Instructions for loading the set. |
Data from your accounting system
Write the XML tables needed to create an order directly to the outbox directory:
outbox/
├── ref_customers.xml
├── ref_products.xml
├── vl_cat_prices.xml
├── vl_delivery_types.xml
├── vl_pay_types.xml
├── vl_trade_points.xml
├── doc_debts.xml
├── doc_debts_products.xml
├── customer_product_data.xml
└── routes.xml
The accounting system must create table files with current customers, products, prices and sales points. Every file must have a <table> root element and be fully written before the exchange begins. A reliable approach is to write a temporary file first and atomically rename it to the required name after writing completes.
2. Download the prepared exchange.xml
If you used the demo archive, exchange.xml has already been copied with the tables. Continue to the next step.
For your own data, download the standard exchange.xml and place it directly in outbox under this name. It includes profiles for:
- Передати документи (Send documents) — orders, payments, store-checks and files;
- Завантажити дані (Download data) — the tables listed above;
- Завантажити зображення, Завантажити налаштування and Завантажити форми для друку — additional images, settings and print form files when present in
outbox.
The demo file contains two profiles: Send documents and Download data. It works with all ten tables in the archive. The following steps use their English names; the standard file uses the Ukrainian names shown above.
3. Download the exchange file
On the Android device, open Exchange and run the built-in Download exchange file action. It is available before a custom exchange.xml has been installed.
The application receives exchange.xml from outbox, validates the XML and replaces its local exchange configuration. The list should contain Send documents and Download data. The standard file also adds the optional file profiles, with Ukrainian names as listed above.
If the file does not download, first check that its name is exactly exchange.xml, it is in the outbox directory configured for this syncName, and its XML encoding is valid.
4. Receive tables
Run the Download data profile. For every requested name, PalmOrder Server:
- finds the XML file with the same name in
outbox; - creates an SQLite database in its own
cachedirectory; - sends the database to the paired device;
- reuses the cache until the source XML changes.
Every requested table should finish without errors in the device exchange log. Find events for the same syncName in the server log.
The source XML table files remain in outbox. They are not shown to the device as ordinary files and are not deleted after download.
5. Create and send an order
In PalmOrder, create an order for a customer and a product from the prepared tables. Save the document, open Exchange and run Send documents.
After successful sending, the server creates a separate XML file in inbox. Its name starts with the document type and contains syncName, for example:
order_sales-kyiv-1_6aa1d0ae1.xml
The server generates the exact time suffix, so the accounting system must not try to predict it.
6. Check the received document
Open the new file from inbox. The order must contain a header and product lines:
<?xml version="1.0" encoding="utf-8"?>
<post user="sales-kyiv-1" connType="remote">
<docs name="order">
<doc>
<head>
<field name="number" value="ЗК-1"/>
<field name="customer_code" value="C001"/>
</head>
<table>
<row>
<field name="code" value="T00001"/>
<field name="count" value="2"/>
<field name="koef" value="1"/>
<field name="price" value="18.5"/>
<field name="sum" value="37"/>
</row>
</table>
</doc>
</docs>
</post>
The actual file contains the fields configured for this document type. After a successful import, the accounting system must move or delete the file according to its own processing rule so that it is not posted again.
Signs of a successful exchange
- the device downloaded the current
exchange.xml; - the Download data profile installed every requested table;
- a customer and product can be selected on the device and an order can be saved;
- the Send documents profile finished without errors;
- an XML file with the correct document type and
syncNameappeared ininbox;
If your accounting system is already connected, also check that it imported the document only once.
If the exchange does not complete
First open Log in the control panel. Find the event by the exchange time and device syncName: its message usually explains at which step the server stopped. If the reason is unclear, check the following:
| Symptom | Check after the log |
|---|---|
| The device cannot connect | Address, port, HTTP/HTTPS, firewall access and pairing status. |
exchange.xml is not found | The outbox directory configured for syncName, the exact file name and server read permissions. |
| A table does not download | The name in <db>, XML file name, <table> root, schema and the number of <f> values in records. |
An order does not appear in inbox | send_status, the inbox directory configured for syncName and write permissions. |
| A document arrives again | Whether the application changed send_status from 0 to 1 and whether the ERP removes the processed file from inbox. |
