Loading…
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.