EzXml Connector - Live Stock
This document describes how the EzXml connector retrieves and calculates live stock information for items. Live stock provides real-time inventory data, which can include current available quantities and future stock availability dates. This information is displayed within the App4Sales application to provide up-to-date inventory status.
Activation & Sources
The EzXml connector retrieves live stock primarily from an XML file named FD_stock.xml. This file is downloaded via FTP. If the FD_stock.xml file is not found or contains no stock data, the connector falls back to using stock information available in the FD_catalog.xml file, which is also downloaded via FTP.
Data Source Configuration
Stock data is pulled from the external system via FTP from the following XML files:
Primary Source:
FD_stock.xml(XML format)Fallback Source:
FD_catalog.xml(XML format)
The FTP server details (host, username, password, and folder paths) are configured within the connector's settings. The stock values are read from the variant elements within these XML files.
Data Mapping Table - Live Stock (Primary Source: FD_stock.xml)
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
Item Identifier |
| Unique identifier for the item. |
Available Stock |
| The quantity of stock available. This value is used if |
To Be Received |
| The quantity of stock expected to be received in the future. This value is used if |
Next Delivery Date |
| The date when the future stock (To Be Received) is expected to become available. The date is parsed from the format "yyyyMMdd" or "yyyy-MM-dd". If this field is empty, the stock is considered currently available. Past dates are ignored. |
Data Mapping Table - Live Stock (Fallback Source: FD_catalog.xml)
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
Item Identifier |
| Unique identifier for the item. |
Available Stock |
| The quantity of stock available. This value is used if the |
Calculation Logic
The connector prioritizes stock information from FD_stock.xml. If this file is available and contains data, it processes each variant entry:
If an
available_ondate is present and is today's date, the correspondingstockquantity is considered Available Stock.If an
available_ondate is present and is a future date, the correspondingstockquantity is considered To Be Received, and the date itself is noted as the Next Delivery Date.Entries with
available_ondates in the past are ignored.If
available_onis not specified, thestockquantity is treated as Available Stock.
If FD_stock.xml is empty or not found, the connector uses stock values from FD_catalog.xml. In this fallback scenario, the Stock field within each item's variant in FD_catalog.xml is taken directly as the Available Stock. If this field is null, it defaults to 0.
Output & UX
The processed stock values are mapped to internal App4Sales fields. Specifically:
The current available stock is stored as
AvailableStock.Future stock quantities are stored as
ToBeReceived.The expected date for future stock is stored as
NextDeliveryDate.
These fields are then used to display the stock indicator and quantities in the App4Sales mobile application.
Related Settings & Prerequisites
The live stock functionality relies on proper configuration of FTP settings to access the FD_stock.xml and FD_catalog.xml files. These settings include the FTP host, username, password, and the specific directory paths where the XML files are located.
Known Limitations
This connector does not explicitly support multiple warehouses for stock. All stock quantities are aggregated or assumed to be for a single, undifferentiated stock pool.
The stock quantities are provided as decimal values and converted to string for storage; rounding rules are implicitly handled by the App4Sales platform.