Integrate

Connect your repricer, ERP, workflow or agent in one call.

Commerce Gate answers one question before your tool acts: does this action clear the policy your operations team published? There are three ways to ask. They share one contract, one policy and one Decision Ledger, and none of them lets Commerce Gate write to your marketplace or ERP.

Recipe 1

Before the push: your repricer or ERP asks over HTTPS

One request per proposed action, sent before the tool writes to the marketplace. The operation is evaluateCommerceDecision in the published contract at /.well-known/openapi.json.

Request
POST https://api.decionis.com/v1/protocol/evaluate-decision
Headers
Authorization: Bearer <workspace API key> and Idempotency-Key, stable for retries of the same proposed action.
Who is asking
channel is repricer, erp, workflow or api; source is your tool's name. Both are recorded on the dossier.
Mode
SHADOW. The verdict is the same as enforcement would give; enforcing it is your tool honoring the answer.

A price change from a repricer, with the signals the starter policy reads:

{
  "org_id": "your-workspace-id",
  "decision_type": "PRICE_CHANGE",
  "transaction_type": "price_change",
  "workflow_key": "commerce_price_change",
  "amount": 89,
  "channel": "repricer",
  "source": "acme-repricer",
  "mode": "SHADOW",
  "idempotency_key": "sku:DC-AFR-55:price:89.00:2026-09-10T12:00:00Z",
  "context": {
    "action_type": "PRICE_CHANGE",
    "actor_type": "REPRICER",
    "actor_id": "acme-repricer",
    "platform": "walmart-marketplace",
    "signals": {
      "sku": "DC-AFR-55",
      "from_price": 129,
      "to_price": 89,
      "currency": "USD",
      "estimated_cost": 81.79,
      "net_margin_percent": 8.1
    }
  }
}

The answer, trimmed to what the tool acts on:

{
  "outcome": "REVIEW",
  "policy_version": "commerce-policy-v2",
  "dossier_id": "9d8b4c1e-2f0a-4b6e-9c3d-1e2f3a4b5c6d",
  "reason_codes": [
    "MARGIN_BELOW_FLOOR"
  ],
  "mode": "SHADOW"
}
Contract saysOperators readYour tool does
APPROVEPROCEEDGo ahead. This is a policy result, not consent from a person.
REVIEWHOLDStop. Leave the marketplace as it is and put the action in front of an operator.
ESCALATEESCALATEStop. A named approver decides before you ask again.
REJECTBLOCKStop. Outside policy; do not retry the same action.

An error, a timeout or an answer you cannot parse means hold. Keep the dossier_id with your own record of the push; finance can open it in the Decision Ledger months later.

What to send: the signals the starter policy reads

Rules read context.signals. The starter policy every workspace begins with reads these; a rule you add on the Policies page reads whatever field you name.

RuleReadsFires whenSend it withHow
Protect minimum marginsignals.net_margin_percentLT 12 require reviewPRICE_CHANGE, ORDER_ACCEPTANCE

Percentage points: (net revenue minus landed cost) divided by net revenue, times 100. Landed cost is your unit cost plus the marketplace referral fee and shipping you bear. Send it as a number, so 8.1 means 8.1%.

Protect low inventorysignals.available_inventoryLT 10 require reviewINVENTORY_MUTATION, ORDER_ACCEPTANCE

Units left after the change or the order, at the location it applies to, from your source of truth.

Review stacked promotionssignals.discount_countGT 1 require reviewORDER_ACCEPTANCE, PROMOTION_CHANGE

How many discount sources combine on the order or would combine under the promotion.

Reject refunds above the refundable balancesignals.refund_exceeds_refundableEQ true auto rejectREFUND_REQUEST

true when the refund amount is more than the order line still has left to refund; send remaining_refundable beside it.

Escalate refunds above the unattended limitsignals.refund_amountGT 1000 escalateREFUND_REQUEST

The refund amount in the order currency; send currency and reason_code beside it.

Review a second refund on the same linesignals.prior_refund_countGT 0 require reviewREFUND_REQUEST

How many refunds the same order line already carries; 0 for the first.

No landed cost, no margin rule: Commerce Gate fails open rather than guess a cost. Send estimated_cost and the margin it produces, or expect PROCEED on price and order checks.

Recipe 2

An AI agent asks through the CommerceGate MCP

The MCP does the normalization above for the agent: it takes the plain facts (SKU, prices, cost, quantities, refund amounts), derives the signals, and sends the same request in Shadow Mode. Install it with npx -y @decionis/commerce@0.1.3.

  • commercegate_describe_capabilities
  • commercegate_validate_erp_transaction
  • commercegate_evaluate_action
  • commercegate_get_dossier
  • commercegate_get_proof_packet
  • commercegate_list_shadow_reports
  • commercegate_summarize_shadow_reports
The MCP page: tools, safety contract, install

Recipe 3

After the push: let Commerce Gate see what the repricer already did

A repricer that never asks can still be watched. On Walmart Marketplace, the listing sweep reads the price of every published listing through the Items API, lands the cost with your referral-fee schedule, and checks each listing against the margin floor in Shadow Mode. Listings below the floor get a signed decision and appear on the Price Guard page; nothing on Walmart is written.

The sweep waits for Walmart to grant the Items read scope on your connection; the Price Guard page shows “Waiting for Walmart” until then, and the switch unlocks when it is granted. Until that day, recipe 1 is how a repricer is governed.

What Commerce Gate never does

  • Write a price, a quantity, an order change or a refund to your marketplace or ERP through these recipes.
  • Invent a cost. Unknown landed cost fails open on price and order checks.
  • Treat PROCEED as consent from a person, or as an execution grant.

Where to look next