Skip to main content
Developer docs
core/safety

Cost Confidence Tiers

Tier A (verified cost), B (estimated), C (unknown). Stamped on each catalog engine decision; a margin-based discount needs Tier A.

A cost-confidence tier records how much Magistry knows about what a product costs the merchant. Every cost record carries one. When the catalog engine decides, it reads the tier of the product's newest cost and writes it onto the decision row as cost_tier_at_decision, so an auditor sees the confidence the engine actually had at that moment, not what was known after a cost was corrected. A product with no cost is written with an empty tier, which reads as Tier C. The tier is also shown on each product's page in the catalog.

The tiers

  • Tier A — verified cost. It comes from Shopify's own cost per item field, from a supplier spreadsheet or quote the merchant uploads and confirms on the Costs page, from a manual entry, or from the other variants of the same product when every costed variant agrees on one cost.
  • Tier B — estimated cost: a supplier figure nobody has confirmed yet. An estimate is recorded as Tier B and never as A, so it cannot be mistaken for a verified cost; once the merchant approves it, it is recorded as Tier A.
  • Tier C — unknown: no cost on record.

What the tier changes

On the catalog engine's performance path, the tier decides one thing: whether the engine may propose a discount. discount_test is the one action in its enum that moves a price. It needs Tier A and a margin above the store's floor, which is 35% unless the store's calibration sets another. A mid performer qualifies only with margin at least 15 points above that floor. A loser qualifies at the floor, and only after a copy rewrite has already been tried. A loser that has reached that point at Tier B or C is drafted instead, with "cost tier B/C — cannot safely discount" in its reasoning.

Every other move is decided on performance, and Tier B and Tier C are handled alike: a copy rewrite for a loser, drafting, a seasonal vault and its revival. Classification flags a Tier C product as no_cost_data so the gap is visible in its evidence.

One path skips the tier check. A product with a high customer-service complaint rate is routed to a discount test first, whatever its tier, because the complaint signal is read before performance. That proposal still meets the executor's floor below.

The floor at execution

The tier gate acts when a decision is proposed. The executor then holds a price floor per variant: a discount never sets a price below 1.8 times that variant's cost, and a variant with no cost on record is skipped rather than guessed at. Discounts are declared with an expiry, and the expiry is the revert: when the test ends, the original price comes back.

Outside the catalog engine, the tier also decides which costs count as profit. A store that bids on profit sends Google Ads a conversion value of revenue minus costs, using Tier A and Tier B costs; an order line at Tier C falls back to its revenue. Because the tier is stamped on the decision row, margin policy lives in the code path that acts. See the Action enum for the full move set.

// developer docs

Magistry runs your store. We run Magistry.

The SDK is the same one our worker uses in production. Same auth, same rate limits, same audit plane — no shadow surface.

Not installed yet? Start on the Free plan. API reference · Stable for a year · Versioned changelogs