> For the complete documentation index, see [llms.txt](https://docs.claret.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claret.app/integrations/inbound-file-feed/inventory.md).

# Inventory

On-hand inventory snapshot for **bulk wine WIP and finished goods**. Both flow through the same file format. The only difference is the underlying master data the rows reference (e.g., `ZAM-WINERY` + tank bins for bulk; `ZAM-WHS` + storage bins for FG).

## Schema

<table><thead><tr><th>#</th><th>Column</th><th data-type="checkbox">Required?</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>1</td><td><code>item_name</code></td><td>true</td><td>The item this inventory belongs to, at the <strong>transactional level</strong>. For FG items: this is the <code>vintage_name</code> from the Finished Good Items file when one exists (e.g., <code>122-16</code>), otherwise the <code>item_name</code> (e.g., <code>124</code>). For bulk wine: this is the <code>child_wip_name</code> from the Bulk Wine Items file (e.g., <code>ZAMNVCAS19</code>).</td><td><code>122-16</code></td></tr><tr><td>2</td><td><code>bin_name</code></td><td>true</td><td>Tank or storage location identifier. Must match a <code>bin</code> from the Locations file.</td><td><code>SS-01</code></td></tr><tr><td>3</td><td><code>lot_name</code></td><td>true</td><td>Lot code.</td><td><code>RM19CASRUT.ZAM</code></td></tr><tr><td>4</td><td><code>date_filled</code></td><td>true</td><td>Date the bin was last filled with this lot/item, as <code>YYYY-MM-DD</code>.</td><td><code>2023-08-01</code></td></tr><tr><td>5</td><td><code>quantity</code></td><td>true</td><td>On-hand quantity at snapshot time. Numeric value. Decimals fine, whole numbers fine. No thousands separators.</td><td><code>5000</code></td></tr><tr><td>6</td><td><code>uom</code></td><td>true</td><td>Unit of measure (e.g., <code>Gallon</code>, <code>9LE Case</code>).</td><td><code>Gallon</code></td></tr><tr><td>7</td><td><code>lot_status</code></td><td>false</td><td>Status of the wine in the lot, e.g., <code>RTB</code> (ready to bottle), <code>WIP</code> (work in process), <code>Aging</code>, <code>Blending</code>, <code>Finished</code>. Most relevant for bulk wine rows; typically empty for FG rows. Tracks with the lot, so every row sharing the same <code>lot_name</code> within a file should carry the same <code>lot_status</code>.</td><td><code>RTB</code></td></tr></tbody></table>

## Header row

```
item_name,bin_name,lot_name,date_filled,quantity,uom,lot_status
```

## Sample data

```csv
item_name,bin_name,lot_name,date_filled,quantity,uom,lot_status
ZAMNVCAS19,SS-01,RM19CASRUT.ZAM,2023-08-01,5000,Gallon,RTB
ZAMNVCAS19,SS-02,RM19CASSH.ZAM,2022-07-08,5000,Gallon,Aging
ZAMNVCAS20,SS-03,RM20CASRUT.ZAM,2022-07-08,20000,Gallon,WIP
122-16,FG-GEN-BIN,FG-GEN-LOT,2024-01-01,879,"9LE Case",
124,Refrigerator,FG-GEN-LOT,2024-04-04,2310,"9LE Case",
```

{% hint style="info" %}
Rows 1–3 are bulk wine, referencing child WIPs (`ZAMNVCAS19`, `ZAMNVCAS20`). Row 4 is FG with vintage, and references the vintage level (`122-16`), not the planning level. Row 5 is FG without vintage and references the item level (`124`) directly, because no vintage exists.
{% endhint %}

## Snapshot semantics

* Full snapshot every delivery. Each file is the complete current state, with no partial or delta files.
* One row per **(item, bin, lot, date\_filled)** combination. Multiple lots in the same bin → multiple rows.
* An emptied bin must be reported as a row with `quantity=0` for the most recent (item, lot) it held. This clears the position.
* A bin with no recent activity may be omitted; Claret retains the prior known quantity until the next snapshot.
* `lot_status` should be consistent across all rows that share the same `lot_name` within a single file.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.claret.app/integrations/inbound-file-feed/inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
