Commerce Gate
Governance for storefront and marketplace decisions — price and promotion changes, inventory mutations, order acceptance and release, refunds, and Microsoft Partner Center or AWS Marketplace offer submission — against the merchant's margin, inventory, refund, and release-evidence floors.
- Key
- commerce
- Version
- commerce-v1
- Rules
- 12
- Domain
- COMMERCE
Rules, in the order the evaluator tries them
Highest priority first. The first rule whose conditions all hold decides; with none, the decision is a REVIEW.
Reject refunds above the refundable balance
priority 400reject_refund_above_refundable · COMMERCE
When- signals.refund_exceeds_refundable = true
ThenAUTO_REJECT → REJECT · urgent · SLA 60 min
A refund that exceeds what the order has left to refund is never sent.
Hold a Marketplace offer submission without a platform identity
priority 400review_marketplace_offer_missing_identity · COMMERCE
When- workflow_key = "commerce_marketplace_offer_submission"
- signals.marketplace_identity_complete is absent
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
A Marketplace offer submission needs a bounded Microsoft Entra or Login with Amazon identity before a human submits it.
Hold a Marketplace offer submission with an unverified platform identity
priority 395review_marketplace_offer_unverified_identity · COMMERCE
When- workflow_key = "commerce_marketplace_offer_submission"
- signals.marketplace_identity_verified = false
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
Marketplace identities must be verified before a person submits an offer for review.
Hold a Marketplace offer submission without release evidence
priority 390review_marketplace_offer_missing_release_evidence · COMMERCE
When- workflow_key = "commerce_marketplace_offer_submission"
- signals.release_evidence_complete is absent
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
A Marketplace offer submission needs digest-bound listing, technical-configuration, and preview or test evidence before a human submits it.
Hold a Marketplace offer submission with unverified release evidence
priority 380review_marketplace_offer_unverified_release_evidence · COMMERCE
When- workflow_key = "commerce_marketplace_offer_submission"
- signals.release_evidence_complete = false
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
A Marketplace offer submission remains on hold until the release evidence packet is complete.
A held order is released only by an approver
priority 360escalate_order_release · COMMERCE
When- workflow_key = "commerce_order_release"
ThenESCALATE → ESCALATE · elevated · SLA 240 min
Releasing an order the gate held is its own decision and needs an approver to prove who made it.
Escalate refunds above the unattended limit
priority 350escalate_large_refund · COMMERCE
When- signals.refund_amount > 1000
ThenESCALATE → ESCALATE · elevated · SLA 240 min
A refund above the unattended limit needs a named approver before it is sent.
Review a second refund on the same line
priority 340review_repeat_refund · COMMERCE
When- signals.prior_refund_count > 0
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
A refund on an order line that was already refunded is the double-refund case.
Protect minimum margin
priority 300review_margin_floor · COMMERCE
When- signals.net_margin_percent < 12
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
Review commerce actions that would take net margin below the merchant floor.
Protect low inventory
priority 250review_inventory_floor · COMMERCE
When- signals.available_inventory < 10
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
Review fulfilment when source-of-truth inventory is below the safety floor.
Review stacked promotions
priority 200review_discount_stacking · COMMERCE
When- signals.discount_count > 1
ThenREQUIRE_REVIEW → REVIEW · elevated · SLA 240 min
Review carts that combine more discount sources than the merchant allows.
Approve routine commerce actions
priority 10approve_routine_commerce · COMMERCE
When- decision_type exists
ThenAUTO_APPROVE → APPROVE · routine · SLA 30 min
A storefront action proceeds when no floor is breached and nothing is held.
Evaluate under it
Locally, with @decionis/mcp: the payload becomes the request's context, and its action the decision type. On the hosted protocol, once the bundle is stored for your organization, name vertical_pack, policy_version and require_exact_policy_version: true. @decionis/mcp 0.4.0 carries commerce-v1 without its Marketplace offer submission rules, so only the hosted protocol holds an offer submission under them.
decionis_evaluate arguments
{ "policy_pack": "commerce", "payload": { "action": "<decision type>" } }In a hosted evaluate-decision request
"vertical_pack": "commerce",
"policy_version": "commerce-v1",
"require_exact_policy_version": trueWorkflow keys that resolve to this pack: commerce, commerce_order_release, commerce_refund_approve, commerce_refund_request, commerce_price_change, commerce_promotion_change, commerce_inventory_mutation, commerce_order_acceptance, commerce_marketplace_offer_submission.
What its rules read
decision_type, workflow_key are fields of the request itself, not of its context. A value put only in the context is discarded, and the evaluator holds the decision as an ESCALATE rather than decide without it.
- decision_typerequest
- signals.available_inventory
- signals.discount_count
- signals.marketplace_identity_complete
- signals.marketplace_identity_verified
- signals.net_margin_percent
- signals.prior_refund_count
- signals.refund_amount
- signals.refund_exceeds_refundable
- signals.release_evidence_complete
- workflow_keyrequest
Signals it maps
- net_margin_percentcommerce_connector
- available_inventorycommerce_connector
- refund_amountcommerce_connector
