Policy pack

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.

  1. Reject refunds above the refundable balance

    priority 400

    reject_refund_above_refundable · COMMERCE

    When
    • signals.refund_exceeds_refundable = true
    Then

    AUTO_REJECT → REJECT · urgent · SLA 60 min

    A refund that exceeds what the order has left to refund is never sent.

  2. Hold a Marketplace offer submission without a platform identity

    priority 400

    review_marketplace_offer_missing_identity · COMMERCE

    When
    • workflow_key = "commerce_marketplace_offer_submission"
    • signals.marketplace_identity_complete is absent
    Then

    REQUIRE_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.

  3. Hold a Marketplace offer submission with an unverified platform identity

    priority 395

    review_marketplace_offer_unverified_identity · COMMERCE

    When
    • workflow_key = "commerce_marketplace_offer_submission"
    • signals.marketplace_identity_verified = false
    Then

    REQUIRE_REVIEW → REVIEW · elevated · SLA 240 min

    Marketplace identities must be verified before a person submits an offer for review.

  4. Hold a Marketplace offer submission without release evidence

    priority 390

    review_marketplace_offer_missing_release_evidence · COMMERCE

    When
    • workflow_key = "commerce_marketplace_offer_submission"
    • signals.release_evidence_complete is absent
    Then

    REQUIRE_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.

  5. Hold a Marketplace offer submission with unverified release evidence

    priority 380

    review_marketplace_offer_unverified_release_evidence · COMMERCE

    When
    • workflow_key = "commerce_marketplace_offer_submission"
    • signals.release_evidence_complete = false
    Then

    REQUIRE_REVIEW → REVIEW · elevated · SLA 240 min

    A Marketplace offer submission remains on hold until the release evidence packet is complete.

  6. A held order is released only by an approver

    priority 360

    escalate_order_release · COMMERCE

    When
    • workflow_key = "commerce_order_release"
    Then

    ESCALATE → ESCALATE · elevated · SLA 240 min

    Releasing an order the gate held is its own decision and needs an approver to prove who made it.

  7. Escalate refunds above the unattended limit

    priority 350

    escalate_large_refund · COMMERCE

    When
    • signals.refund_amount > 1000
    Then

    ESCALATE → ESCALATE · elevated · SLA 240 min

    A refund above the unattended limit needs a named approver before it is sent.

  8. Review a second refund on the same line

    priority 340

    review_repeat_refund · COMMERCE

    When
    • signals.prior_refund_count > 0
    Then

    REQUIRE_REVIEW → REVIEW · elevated · SLA 240 min

    A refund on an order line that was already refunded is the double-refund case.

  9. Protect minimum margin

    priority 300

    review_margin_floor · COMMERCE

    When
    • signals.net_margin_percent < 12
    Then

    REQUIRE_REVIEW → REVIEW · elevated · SLA 240 min

    Review commerce actions that would take net margin below the merchant floor.

  10. Protect low inventory

    priority 250

    review_inventory_floor · COMMERCE

    When
    • signals.available_inventory < 10
    Then

    REQUIRE_REVIEW → REVIEW · elevated · SLA 240 min

    Review fulfilment when source-of-truth inventory is below the safety floor.

  11. Review stacked promotions

    priority 200

    review_discount_stacking · COMMERCE

    When
    • signals.discount_count > 1
    Then

    REQUIRE_REVIEW → REVIEW · elevated · SLA 240 min

    Review carts that combine more discount sources than the merchant allows.

  12. Approve routine commerce actions

    priority 10

    approve_routine_commerce · COMMERCE

    When
    • decision_type exists
    Then

    AUTO_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": true

Workflow 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