Integrations
Commerce Gateway
What it does
Commerce Gateway provides LLM-accessible commerce data, including product catalog, pricing, inventory, and supplier context through a unified API. AI actors in Loop Engine procurement and demand loops use this data as evidence before submitting governed recommendations.
- Without Commerce Gateway: AI actors lack structured commerce context.
- With Commerce Gateway: actors query commerce data, attach evidence, and submit decisions into runtime guards.
In Commerce Chain deployments, SCM and DCM procurement loops often combine Loop Engine governance with Commerce Gateway so AI actors can retrieve product, supplier, and inventory context before submitting governed transitions. See the Commerce Gateway integration guide on commercechain.io for the CCO-oriented setup and boundaries.
Use case
SCM Procurement loop at ANALYZING:
- AI actor queries Commerce Gateway for suppliers on
SKU-4892 - Gateway returns structured supplier + inventory data
- Actor submits recommendation with attached evidence
- Confidence guard and human approval gates evaluate transition
Quick setup
-
Install
1npm install @loop-engine/adapter-commerce-gateway -
Create a
CommerceGatewayClient1import { CommerceGatewayClient } from "@loop-engine/adapter-commerce-gateway";23const gateway = new CommerceGatewayClient({4 baseUrl: process.env.COMMERCE_GATEWAY_URL!,5 apiKey: process.env.COMMERCE_GATEWAY_API_KEY!6}); -
Query commerce context (typed client surface)
1"cmt">// @no-typecheck2"cmt">// Illustrative: fetch inventory + price before you attach evidence to a governed transition3const inv = await gateway.getInventory("SKU-4892");4const price = await gateway.getCurrentPrice("SKU-4892");5void { inv, price };
Configuration reference
| Option | Type | Default | Description |
|---|---|---|---|
| baseUrl | string | required | Commerce Gateway base URL |
| | | required | Commerce Gateway API key |