Blocks fulfilling an order for stock oversold across channels — before the fulfillment token is issued.
For: Multi-channel Shopify merchants with a shared inventory pool
Blocks an order that would ship more units than the system of record has in stock.
Restrains fulfillment when the same units are reserved on another channel.
Escalates a fulfillment decided on an inventory feed older than the freshness window.
# Shopify Oversell Prevention
# Fork: set the feed freshness window your integration can actually hold.
apiVersion: decionis.dev/v1
kind: PolicyPack
metadata:
name: shopify-oversell-prevention
surface: shopify
workflow_key: order_fulfillment
standards: [SOC2-CC8.1, ISO27001-A.8.34]
defaults:
mode: shadow
emit_dossier: true
feed_freshness_minutes: 30
rules:
- name: over_selling_gate
when: "action == 'order.fulfill'"
decision: |
BLOCK IF units_ordered > units_available
ALLOW OTHERWISE
reason_code: oversold_inventory
- name: cross_channel_reservation_guard
when: "action == 'order.fulfill'"
decision: |
RESTRAIN IF inventory.reserved_on_other_channel == true
ALLOW OTHERWISE
reason_code: units_reserved_elsewhere
- name: stale_inventory_feed_check
when: "action == 'order.fulfill'"
decision: |
ESCALATE IF inventory.feed_age_minutes > feed_freshness_minutes
ALLOW OTHERWISE
reason_code: stale_inventory_feed
Fork it, change the thresholds to match your environment, and deploy in shadow mode first — it defaults to listen-only so nothing in your live pipeline changes.
The app evaluates checkouts and order admissions in read-only mode by default — no live behavior changes until you enable enforcement.
1. Install "Decionis Margin Protection" from the Shopify App Store.
2. Pick a starter pack (margin guard / oversell prevention / refund threshold).
3. App is in read-only mode by default — every governed checkout / order
produces a signed Decision Dossier. No shopper-facing change.Ships in shadow mode — every verdict is recorded, nothing is blocked.
This recipe is one step in a path. The same five steps apply to every recipe in the exchange.
Run the policy against a realistic action in the browser. Push it past what the rules allow and watch the verdict come back. No account.
See exactly what was decided and why: the rule that fired, the evidence it read, the policy version in force, and an Ed25519 signature you can verify yourself.
Measure what the policy would have caught on your own traffic without touching the live path. Every recipe defaults to shadow, so the first deployment carries no execution risk.
Point the same policy at the system where the action actually originates — a checkout, an ERP posting, a Zap, an agent's tool call.
Publish the proof: a public verification link, an embeddable badge, a PR comment, or an anonymized shadow-mode finding. This is how the next person discovers Decionis.