Skip to main content

Configuration for Hii Retail

Stock handling is controlled at three levels: per tenant, per business unit, and per item. All three have to be right for a quantity to come out correct.

Stock handling is set at three levels, and all three must be right. Per tenant: Do enable PosLog processing and Use default values if item is unknown. Per business unit: Low stock threshold and Number of nearby business units. Per item, in PnP: Stp.StockHandlingType, Stp.StockHandlingMethod, Stp.UseAverageWeightedCostPrice and the purchase price.

In-Store configuration​

Each setting below is its own Customer Controlled Configuration (CCC) kind holding a single property, set per tenant or per business unit. None of them has a form in the Configuration Portal today, so values are written through the CCC API — which means the kind and the property id, not the readable name, are what you work with. STP receives each change as a Pub/Sub message carrying the kind in the Kind attribute.

Configuration parameterCCC kind and propertyScopeDescription
Do enable PosLog processingstp.do-enable-pos-log-processing.v1
doEnablePosLogProcessing — boolean, required
TenantThe master switch for stock processing from Hii Retail services. With it enabled, PosLog sales are processed and the stock quantity is adjusted in real time — and so are goods received, stock counts, corrections, store transfers, and item master data from PnP. With it disabled, none of those reach stock, and the Input API becomes the only ingress. Unset means off, so a new tenant moves no stock from Hii Retail services until it is turned on.
Use default values if item is unknownstp.use-default-values-if-item-is-missing.v1
useDefaultValuesIfItemIsMissing — boolean, required
TenantIf enabled, default values will be used, so stock quantity will still be updated even though item configuration is missing. With it disabled, a movement for an unknown item is not stock handled. Unset means off.
Low stock thresholdstp.low-stock-threshold.v1
lowStockThreshold — integer, nullable
Business unitThe quantity at or below which an item is reported as LOW_STOCK rather than IN_STOCK by the nearby-store stock lookup. Unset means 0, so every positive quantity reports as IN_STOCK.
Number of nearby business unitsstp.number-of-nearby-business-units.v1
numberOfNearbyBusinessUnits — integer, nullable
Business unitHow many nearby stores the nearby-store stock lookup considers. Defaults to 5 when not configured.

Note: Use default values if item is unknown keeps the quantity correct at the price of correct item behaviour — a defaulted item is stock handled with FIFO and has no purchase price, so its cost rests entirely on the weighted average of whatever stock it has. It is the right setting during a rollout, and worth reviewing afterwards.

Item configuration​

The Hii Retail items can be configured to control the logic for the stock handling. The configuration is added as additional properties for the items.

PropertyMember ofValid valuesDescription
Stp.StockHandlingTypeAdditionalPropertyNoStockHandling, DoStockHandling, DoConsignmentStockHandlingIndicates how the item will be stock handled:
NoStockHandling: Stock quantity will not be calculated.
DoStockHandling: Stock quantity will be calculated.
DoConsignmentStockHandling: As DoStockHandling, but the stock value is reported as zero — see below.
Stp.StockHandlingMethodAdditionalPropertyFIFO, FEFO, LIFOFIFO: (Default) First In, First Out: Pick the oldest delivery with remaining items.
FEFO: First Expire First Out: Pick the delivery that first expires.
LIFO: Last In First Out: Pick the latest delivery with the remaining items.
Stp.UseAverageWeightedCostPriceAdditionalPropertytrue, falseWhether the item is costed at a weighted average across its stock (default: true) rather than at the cost of the batch a movement draws from. Independent of Stp.StockHandlingMethod, which still decides which batch is physically drawn down. See Cost calculations.

Note: Only items of type STOCK can be enabled for stock handling.

Consignment stock​

DoConsignmentStockHandling is for articles owned by the supplier, where the store pays only for the articles it sells. The quantity is tracked exactly as for DoStockHandling, and profit is calculated as usual — sales price minus cost price. The difference is the stock value: because the store does not own the goods, the value of that stock (normally quantity × cost price) is reported as zero.

Purchase price is part of the configuration​

An item's purchase price is not an additional property — it is a PURCHASE price specification in PnP — but it is just as much a prerequisite. A stock-handled item with no purchase price and no other cost source produces movements costed at 0. See Cost calculations.

What each setting affects​

SymptomSetting to check first
Nothing at all is reaching stock for a tenantDo enable PosLog processing — it gates every ingress from Hii Retail services, not only sales
Sales are not changing the stock quantityDo enable PosLog processing, and Stp.StockHandlingType on the item
Quantity is right, cost is 0the item's purchase price in PnP
The wrong batch is being drawn downStp.StockHandlingMethod
Cost per sale does not match the delivery it came fromStp.UseAverageWeightedCostPrice — on by default, so movements are costed at the item's weighted average
Nearby stores show as in stock when nearly emptyLow stock threshold

Return