# Inventory tracking

Where your stock actually lives — Shopify, Assemblified's own virtual stock, shelf stock, rounding remainders and the local index. Multi-location rules and what happens when stock changes outside Assemblified.

import Term from '~/components/Term.astro';
import { Aside } from '@astrojs/starlight/components';
import DocUpdated from '~/components/DocUpdated.astro';

Stock does not all live in one place, and the difference matters when a number looks wrong.
Assemblified keeps track of **five** kinds of stock:

- **Shopify stock**, for Shopify-linked materials. Shopify is the source of truth and Assemblified
  reads it live, per location.
- **Virtual stock**, for <Term def="virtual-material">virtual materials</Term>. Assemblified owns it,
  per location.
- **Shelf stock**, for finished goods and assembly BOMs you have already built ahead of demand.
  Assemblified owns it, per location. See [Pre-assembled stock](/features/bill-of-materials/pre-assembled/).
- **Rounding remainders**, the fractions left over when a build run or a safety-stock reservation
  cannot use a whole unit. Assemblified keeps them so they are not lost.
- **The local index**, Assemblified's own mirror of your Shopify stock. Off by default. It exists so
  that high-volume stores do not have to read Shopify on every calculation, and it is what
  **Reconcile inventory** compares against Shopify.

This page explains how they fit together.

## On this page

- The five kinds of stock
- The local index and Reconcile inventory
- Multi-location rules
- When stock changes outside Assemblified
- Common gotchas

## The five kinds of stock

| Kind of stock | Who owns the number | What it covers |
|---|---|---|
| Shopify stock | Shopify | Every Shopify-linked material, at every Shopify location. |
| Virtual stock | Assemblified | Every virtual material, at every location. |
| Shelf stock | Assemblified | Finished goods and assembly BOMs already built and waiting. |
| Rounding remainders | Assemblified | Fractions carried over from build runs and safety-stock reservations. |
| The local index | Assemblified (a mirror of Shopify) | A copy of Shopify's numbers, for stores that switch it on. |

Every one of them is **per-location**. An adjustment at one location never touches another.

Three more figures appear beside these on the list and on the material page, and none of them is a
separate pot of stock — they are views onto where your material has gone:

- **Committed to orders** — how much open orders still hold.
- **Safety stock** — how much your safety-stock reservations hold.
- **Allocated in shelf stock** and **Allocated in work orders** — how much of the material is
  already inside something on a shelf, or already picked (or still to be picked) by an open work
  order.

None of these is subtracted from **Available** for you. They tell you where your stock is, not what
is left.

To see exactly which orders and safety stock hold a material, open the material and choose the
**Inventory ledger** tab. To see how a number got where it is, step by step, use its **History** tab.
Both are described on [The material page](/features/raw-materials/material-detail/).

## The local index and Reconcile inventory

**Settings → General → Beta features → Use Assemblified's local index** turns on a mirror of your
Shopify stock inside Assemblified. Calculations then read the mirror instead of asking Shopify every
time, which helps stores where Shopify inventory reads have become a bottleneck. Shopify is still
updated normally.

Because a mirror can drift, switching it on also gives you **Reconcile inventory** — on a material's
row menu, on the material page, and as a bulk action. It shows you, per location, what the local
index holds, what Shopify reports, and the difference. You then choose which side wins:

- **Shopify wins.** The local index is rewritten from Shopify.
- **The local index wins.** Its numbers are pushed to Shopify.

Nothing moves until you confirm, and the dialog shows the before-and-after per location first. A
material whose Shopify variant no longer exists is refused rather than reconciled to zero.

<Aside type="caution">
Switching the local index on changes where parts of Assemblified's inventory logic read their
numbers from. Review it with support before turning it on — the setting says exactly that in the app,
and it sits under **Beta features** for the same reason.
</Aside>

## Multi-location rules

For **Shopify-linked materials**, multi-location follows Shopify's model directly: each Shopify
location has its own stock, and Assemblified writes its changes per location.

For **virtual materials**, Assemblified keeps the same per-location structure itself.

Either way, stock changes at a location, and a material's total follows: for a Shopify-linked
material it is Shopify's own total, for a virtual one the sum of its locations. No screen, import or
API call sets the total directly.

When a bill of materials runs, the location each component is taken from is resolved in this order:

1. **The component's own pinned location.** If the BOM line names a location, that material always
   comes from there.
2. **The nearest pinned assembly above it.** A component under an assembly BOM that is pinned to a
   location is taken from that location too, unless it carries a pin of its own.
3. **The order's location**, when **Settings → General → Respect order and fulfillment locations
   when available** is switched on.
4. **Your default location**, as the fallback.

See [Location rules](/features/bill-of-materials/location-rules/) for how to pin a component or a
whole branch.

## When stock changes outside Assemblified

Someone edits a quantity in the Shopify admin, or another app syncs stock in. What happens next:

1. **Shopify's product update reaches Assemblified.** The material's mirrored figures — product and
   variant name, SKU, selling price, unit cost, stock quantity, product type and vendor — are refreshed
   from what Shopify sent.
2. **If the quantity actually moved** and **Settings → General → Auto-update on inventory change**
   is switched on, Assemblified recalculates every finished good that uses the material, so its
   displayed availability follows. With the setting off, the figure is refreshed but nothing is
   recalculated.

A change to the material's **cost, weight or inventory tracking** in Shopify arrives on a separate
path and refreshes the mirrored cost, SKU and [weight](/features/raw-materials/weight/). Assemblified
never writes weight back to Shopify.

**Virtual materials have no Shopify side**, so there is nothing to be picked up: every change to a
virtual material's stock is made in Assemblified in the first place — on the material page, through
[Adjust stock](/features/raw-materials/restocking/), through an order or a build run, or through
the API.

## Common gotchas

- **Negative stock depends on a setting.** For Shopify-linked materials Shopify's own rules apply.
  For virtual materials, shelf stock and calculations of buildable quantities, Assemblified clamps at zero unless
  **Settings → General → Allow negative inventory in Assemblified calculations** is switched on.
- **Rounding remainders only matter for work orders and reservations.** Order execution does not
  round: fractional quantities are consumed exactly as calculated.
- **A bill can execute at several locations in one order.** Components pinned to different locations
  are written to each of those locations in the same run.
- **History reaches back past 30 days.** A material's **History** tab lists what happened, newest
  first, grouped into one row per action. The last 30 days load straight away; keep paging to read
  older, archived records, which take longer to load. See
  [The material page](/features/raw-materials/material-detail/#paging-into-older-history).
- **A reservation that should be gone still shows.** If the **Inventory ledger** tab lists an order
  that has already shipped, been cancelled or been refunded, its reservation did not close. Clean it
  up through **Inventory → Reserved quantities** on the materials list. See
  [Manual cleanup of remaining reservations](/features/bill-of-materials/order-reservations/#manual-cleanup-of-remaining-reservations).
- **A failed Shopify write does not roll back Assemblified's own state.** Shelf stock is drawn down
  before the Shopify call. If Shopify then refuses, Assemblified has already moved; the failure is
  recorded on the order's execution log and the fix is a reconcile or a restock.

## Where to next

- [Shopify-linked materials](/features/raw-materials/shopify-linked/) — the Shopify side in detail.
- [Virtual materials](/features/raw-materials/virtual-materials/) — the Assemblified side in detail.
- [Adjusting stock and stock counts](/features/raw-materials/restocking/) — how to move stock in bulk.
- [Safety-stock reservations](/features/bill-of-materials/safety-stock-reservations/) — holding stock
  back for a buildable buffer. A reservation already reduces what is available, so it is never
  subtracted twice.

<DocUpdated date="2026-11-19" />