> For the complete documentation index, see [llms.txt](https://shoxl.gitbook.io/erp-integration-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shoxl.gitbook.io/erp-integration-guide/2024.3/erp-cache-batch/stock.md).

# Stock

## Short description

The ERP Cache Stock interface allows the import of article stock into the ERP Cache.

## Delivery method

**Update Frequency**: Batch at least once a day\
**Incremental or complete set:** Incremental

**Filetype:** Zipped XML

**Filename: \[SHOPNAME]\_ErpCache\_Stock**\_**\[INDEXNUMBER]**.xml\
**Transport:** over FTPS, FTPS Vendisto server hosted by INTEGRACE, file will be placed on FTPS server by ERP party.

**Location within FTP root:** \ErpCache\\

## Structure XML

### Changes from ErpCache\_Stock XML 1.1 to 1.2

* The ImportSettings node is now required as well as the 'Importer' and 'Version' settings.
* The Stock element can now contain a decimal value.

```markup
<?xml version="1.0" encoding="utf-8"?>
<Import>
    <ImportSettings>
        <Importer>ErpCache_Stock</Importer>
        <Version>1.2</Version>
    </ImportSettings>
    <Stocks>
        <Stock>
            <ProductNumber></ProductNumber>
            <WarehouseId></WarehouseId>
            <Stock></Stock>
            <EndOfLife></EndOfLife>
            <TempNotAvailable></TempNotAvailable>
            <StockIndicationCode></StockIndicationCode>
        </Stock>
    </Stocks>
</Import>

```

## Fields XML

**Import element:**

<table data-header-hidden><thead><tr><th width="175">Name</th><th>Description</th><th width="150">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>ImportSettings</td><td>Container element for importsettings</td><td>Element</td><td>Required</td></tr><tr><td>Stocks</td><td>Container element for Stock data</td><td>Element</td><td>Required</td></tr></tbody></table>

**ImportSettings element:**

<table data-header-hidden><thead><tr><th width="180">Name</th><th>Description</th><th width="160">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>Importer</td><td>Name of the importer.<br>Must be ErpCache_Stock.</td><td>Text</td><td>Required</td></tr><tr><td>Version</td><td>Version of the import xml. Must be 1.2 for this version.</td><td>Text</td><td>Required</td></tr></tbody></table>

**Stock element:**

<table data-header-hidden><thead><tr><th width="185">Name</th><th width="161">Description</th><th width="194">Type</th><th>Required/Optional</th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Type</td><td>Required/Optional</td></tr><tr><td>ProductNumber</td><td>The identifier of a product</td><td>Text</td><td>Required</td></tr><tr><td>WarehouseId</td><td>Identifier of the warehouse</td><td>Text</td><td>Optional</td></tr><tr><td>EndOfLife</td><td>Indication of whether or not the article is end of life</td><td>Boolean</td><td>Optional</td></tr><tr><td>TempNotAvailable</td><td>Indication of whether or not the article is temporary not available</td><td>Boolean</td><td>Optional</td></tr><tr><td>Stock</td><td>The amount of stock still available for the product</td><td>Decimal</td><td>Required</td></tr><tr><td>StockIndicationCode</td><td>A stock indication, in stock (green), not in stock, short delivery time (orange), not in stock, longer delivery time (red)</td><td>StockIndicationCode</td><td>Required</td></tr></tbody></table>

**Types:**

| Type                | Values                                                           |
| ------------------- | ---------------------------------------------------------------- |
| StockIndicationCode | InStock, NotInStockShortDeliveryTime, NotInStockLongDeliveryTime |
