Net margin clears your encoded floor β the discount applies, recorded as a signed pass.
The recurring nightmare is a runaway automation loop: a stacked promotion or an AI agent maps a 90% discount onto a luxury item, it goes viral, and inventory clears at a massive net loss before anyone reacts. Decionis evaluates net margin at the millisecond of the checkout API call and suppresses the discount when it breaches your encoded floor β a deterministic, policy-gated hard block, not an after-the-fact alert.
| Metric | Automation attempted | Decionis policy floor |
|---|---|---|
| Unit price | $125.00 β $12.50 (90% off) | Net margin β₯ 12% |
| Unit cost basis | $70.00 (from ERP, Gate 1 verified) | β |
| Net margin | β460% (sells at a loss) | 12% floor |
| Verdict | Hold β discount suppressed at checkout, Decision Dossier issued with the margin math | |
In Shadow Mode this same evaluation runs without suppressing anything β it just records the attempt and the dollars at risk into your Drift Report, so you can see the exposure before you enable enforcement.
One certified outcome per evaluation β deterministic from the same inputs every time.
Net margin clears your encoded floor β the discount applies, recorded as a signed pass.
Net margin would fall below the floor β the discount is suppressed at checkout via Shopify Functions.
Item cost is missing in Shopify, so margin can't be computed β flagged for cost entry rather than guessed. Never a fabricated cost.
Every held or allowed checkout produces a signed, exportable receipt β the fields finance needs for month-end reconciliation and dispute defense.
| Cart total | Pre-discount order value evaluated at checkout |
| Discount amount | Total order-level discount the automation attempted |
| Estimated cost basis | Sum of real unit costs (Shopify InventoryItem.unitCost), never assumed |
| Net margin % | (revenue β discount β cost) / (revenue β discount) β the deterministic verdict input |
| Margin at risk (USD) | Dollars the order would have leaked below your floor, computed for held orders |
| Policy version + floor | The encoded margin-floor policy and rule digest that governed the decision |
| Rule key | net_margin_floor (Gate 2) or cost_basis_truth / inventory_floor (Gate 1) |
| Verdict | Allow, hold, or review β one certified outcome at the action boundary |
| Signature + hash | Ed25519 signature over the canonical SHA-256 of the dossier (when the prod key is provisioned) |
Install from the Shopify App Store, let Shadow Mode score your recent orders, and read the margin at risk computed from your own cost data. Enforcement is one click when you're ready.