Skip to main content

Stock ownership

The stock figure for a store is owned either by Hii Retail's stock ledger, Stock Transaction Processing (STP), or by an external system such as an ERP. Stock Count works fully with both — provided the stock is held in STP, because that is where Stock Count learns which items to count and how many to expect. Without stock in STP it can only record counts that another system plans.

The three setups​

Three ways the stock can be owned: STP owns it, an external system owns it and synchronizes it into STP, or an external system owns it and STP only forwards lookups. Stock Count plans counts in the first two.

How the stock is ownedCount listsExpected quantities and deviation warningsWho turns the count into a stock figure
STP is the stock master✅✅STP, automatically, when the count is submitted
An external system is master and synchronizes its stock into STP✅✅ — as current as the last synchronization plus the movements STP has processed sinceBoth: STP applies it at once; the external system receives the same count, applies it, and asserts its own result back — see below
An external system is master and STP only forwards stock lookups to it (the lookup proxy)❌ — unless the external system supplies them, see Counting without stock in STP❌The external system

The last row is not a gap that more configuration could close. STP's lookup proxy answers "how many of item X?" by asking the external system, and it publishes nothing. Stock Count does not ask item by item; it keeps its own copy of the stock from the stock level updates STP publishes, and a store whose stock is only ever looked up through the proxy produces none. If Stock Count is to plan the counts, the stock must be held in STP — which is also what Synchronizing stock concludes from STP's side.

Why the list depends on the stock​

One hundred dots for the assortment, ten of them lit for the items that have stock in STP

A store's assortment in Product, Price and Promotion says what the store may sell. It says nothing about what is on the shelves. Counting the assortment would send staff looking for tens of thousands of items that were never delivered.

So Stock Count lists only items that STP has stock information for — items that hold stock, or that have moved since they were last counted — and shows STP's quantity as the expected quantity, which is what the deviation review and the deviation warnings compare against. An item STP has never held stock of is not listed, not even in a full count. With no stock in STP, a planned count has nothing to list.

Counting without stock in STP​

A store whose stock is not held in STP can still use Stock Count as a counting tool, as long as the decision about what to count is made elsewhere:

The count is carried out in the app as usual and published as usual, and the external system subscribes to it and applies it — as of the count time. Mandatory items on an imported list that nobody counted are reported as 0, exactly as in any other count.

What this setup does not give you, because each of these needs the stock:

MissingWhy
Full, cycle and recurring counts that list anythingTheir lists are built from STP's stock, and there is none
Expected quantities, the deviation review and deviation warningsThere is nothing to compare the counted quantity with
Deviation reportsSame reason

⚠ Check whether STP processes stock for the tenant. If Do enable PosLog processing is on — because other stores of the tenant are held in STP — STP applies this store's counts too, and from then on holds a stock figure for every item counted there, built from nothing but counts. Either keep such a store in a tenant where STP does not process stock, or treat its STP figures as meaningless.

When an external system owns the stock and synchronizes it​

This is a common setup: the ERP stays authoritative, pushes its quantities into STP with synchronize-stocks, and STP processes sales in between so the POS has a current figure. Stock Count works fully, and counting is done in Hii Retail — the app does not have to belong to the system that owns the number.

Both systems see the count. STP subscribes to stc.public.event.stock-count-completed.v1 and applies it straight away. The ERP subscribes to the same event through External Events, applies it in its own ledger, and asserts the result back through synchronize-stocks. The final figure is the ERP's, which is the intent; STP's ledger simply holds its own count adjustment followed by the ERP's correction. Take the financial side — shrinkage, the value of the count loss — from the system that owns the quantity. See Whoever owns the quantity owns the accounting derived from it.

🛑 If your system applies the count, apply it as of the count time — not the time the message arrives. A count is a statement about the moment each item was counted, and sales keep happening after that. For each item, take the time of its earliest line (countedDateTime, across all locations), and set the quantity to the counted total plus every movement dated after that time. That is exactly what STP does. Setting the quantity to the counted total when the message arrives silently drops every sale between the count and the moment you process it — often hours, because a count is typically submitted long after the first shelf was counted. See Counting while the store is open.

⚠ Let the external system process the count before it next asserts that item's quantity. An absolute assertion overrides whatever STP has. An assertion computed without the count — sent after the count was submitted, but before the ERP applied it — puts the pre-count figure back.

Mixing setups across stores​

Ownership is decided per store, not per tenant: STP has no "who is master" switch, and a store is externally mastered simply because it receives synchronize-stocks assertions. A tenant can let STP own the stock in its physical stores and let an ERP own a webshop business unit. Counting happens where there are shelves, so in practice Stock Count is used in the stores STP masters or synchronizes.

⚠ STP applies counts only for a tenant with stock processing switched on — the tenant setting Do enable PosLog processing, which gates every feed from Hii Retail services into stock, counts included. A tenant that keeps it off while an external system is being onboarded will have its counts published but not applied by STP. See STP configuration.