Count variances
Tolerance, recount, valuation and approval authority for count adjustments, including discovered stock and unusable costs.
Request with "decision": "variance" and one of these operations: controller_confirm, manager_approve.
Clauses applied
variance.tolerance: Both configured absolute quantity and percent tests must pass for a first count to be within tolerance; otherwise an independent recount and review are required.variance.found: Zero expected with found stock has null percent and requires independent review; missing/stale cost never becomes zero value.variance.manager: Discovery, identity change, reserved/owned stock, above-threshold value or exceptional cost requires independent Warehouse Manager.variance.cost: A usable cost and matching approval packet remain mandatory.variance.controller: Existing-stock correction within the USD threshold may use explicit ControllerConfirmation after any required independent recount/review and when usable cost and unreserved/unowned eligibility checks pass; the controller may confirm their own draft only on that path.
Evidence questions
discovered_stock@1
This is the reason given for a count adjustment at one location. Does it describe stock that was not on record there, such as found, unexpected or misplaced stock, or a change of item, lot or serial identity?
| Answer | Meaning |
|---|---|
true | The reason describes stock not on record at this location, such as found, unexpected or misplaced stock, or a change of item, lot or serial identity. |
false | The reason describes a correction to stock that was on record: a miscount, damage, loss, a missed pick or a unit-of-measure slip. |
cost_usable@1
This is the evidence offered for an item's unit cost when valuing a count adjustment. Does it establish that cost as current, from an accountable source such as a recent invoice, purchase order, price list or the finance team?
| Answer | Meaning |
|---|---|
true | The evidence establishes the cost as current, from an accountable source such as a recent invoice, purchase order, price list or the finance team. |
false | The cost is a guess, a placeholder, zero for lack of a cost, or older than the evidence admits. |
Examples
Found stock with no usable cost
{
"decision": "variance",
"proposal": {
"operation": "controller_confirm",
"by": "u-inv-07",
"drafted_by": "u-inv-07"
},
"today": "2026-10-02",
"policy": {
"tolerance_qty": "2",
"tolerance_pct": "5",
"value_threshold": "500",
"cost_max_age_days": 90
},
"count": {
"expected": "0",
"counted": "5",
"recounted": true
},
"reason": "Found a sealed case behind the reserve pallet, not on record for this bin."
}Response from the rules with no model loaded, so every question abstains.
{
"verdict": "review",
"next": {
"action": "obtain_cost",
"text": "No usable unit cost, so the controller path is closed. Missing or stale cost never becomes zero value.",
"role": "Warehouse Manager"
},
"questions": []
}
Request schema
{
"type": "object",
"required": [
"decision",
"proposal",
"count",
"policy",
"today"
],
"additionalProperties": false,
"properties": {
"decision": {
"const": "variance"
},
"proposal": {
"type": "object",
"required": [
"operation",
"by"
],
"additionalProperties": false,
"properties": {
"operation": {
"type": "string",
"enum": [
"controller_confirm",
"manager_approve"
]
},
"by": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"drafted_by": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
},
"count": {
"type": "object",
"required": [
"expected",
"counted"
],
"additionalProperties": false,
"properties": {
"expected": {
"type": "string",
"format": "decimal"
},
"counted": {
"type": "string",
"format": "decimal"
},
"recounted": {
"type": "boolean"
}
}
},
"policy": {
"type": "object",
"required": [
"tolerance_qty",
"tolerance_pct",
"value_threshold",
"cost_max_age_days"
],
"additionalProperties": false,
"properties": {
"tolerance_qty": {
"type": "string",
"format": "decimal"
},
"tolerance_pct": {
"type": "string",
"format": "decimal"
},
"value_threshold": {
"type": "string",
"format": "decimal"
},
"cost_max_age_days": {
"type": "integer",
"minimum": 0
}
}
},
"cost": {
"type": "object",
"required": [
"unit_cost"
],
"additionalProperties": false,
"properties": {
"unit_cost": {
"type": "string",
"format": "decimal"
},
"as_of": {
"type": "string",
"format": "date"
},
"source": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
}
},
"cost_evidence": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"reserved_or_owned": {
"type": "boolean"
},
"identity_changed": {
"type": "boolean"
},
"today": {
"type": "string",
"format": "date"
}
}
}