Stateset iCommerce Architecture
AI‑powered order flow from conversation to fulfillment
Stateset iCommerce is a vertically integrated commerce operating system. It lets AI agents run a complete purchase and support lifecycle inside a natural conversation while the platform executes every operational step in the background. At a high level, the system combines:- Conversational AI agents for shopping, support, and operations
- Agentic Commerce Protocol (ACP) for secure AI‑initiated checkout and delegated payment
- Model Context Protocol (MCP) for tool execution and in‑chat widgets
- StateSet API as the unified backend for orders, inventory, payments, fulfillment, returns, and finance
- StateSet Sync Server for multi‑tenant routing and integrations (Shopify, ERPs, 3PLs, marketplaces)
System architecture
Conversation & Agent Layer
Three specialized agents collaborate in one session:- Commerce Agent: product discovery, recommendations, cart building, ACP checkout.
- Customer Service Agent: tracking, returns, warranties, order modifications, escalation.
- Operations Agent: inventory checks, fulfillment routing, sync jobs, exception handling.
Transaction Layer (ACP)
ACP is the secure “handshake” that allows an AI agent to initiate and complete purchases:- Create checkout with line items and currency.
- Update checkout with buyer identity and shipping/billing details.
- Delegate payment to get a scoped, time‑boxed, single‑use token.
- User confirms in‑chat.
- Complete checkout to capture payment and create the order.
Core iCommerce Engine
Once ACP completes, the iCommerce Engine executes the lifecycle:- Orders: creation, state machine, line items, split shipments.
- Inventory: multi‑location availability, reservations, backorder logic.
- Payments: capture, refunds, chargebacks (gateway‑agnostic).
- Fulfillment: routing to the best warehouse/3PL, shipment records, tracking.
- Returns & warranties: eligibility, labels, restock, replacement orders.
- Finance: double‑entry postings for revenue, COGS, refunds.
External Integrations
The Sync Server provides:- Multi‑tenant configuration per merchant/brand.
- Real‑time webhooks + batch sync jobs.
- Field mapping and normalization.
- Circuit breakers, retries, and per‑tenant rate limits.
End‑to‑end flow (conversation → fulfillment)
- Customer asks for a product in natural language.
- Commerce Agent searches catalog and presents options in a widget.
- Customer selects an item; agent creates an ACP checkout session.
- Agent collects shipping/buyer details conversationally and updates checkout.
- Agent delegates payment; customer sees summary and explicitly confirms.
- ACP completes checkout: payment captured and order created.
- Sync Server routes order to the optimal fulfillment center.
- Inventory is reserved at the chosen location.
- Fulfillment partner ships; tracking updates stream back via webhooks.
- Customer Service Agent handles post‑purchase (tracking, returns, warranty) in the same conversation.
Security and trust model
Agentic commerce must be safe by default. iCommerce enforces:- Scoped delegated payments: tokens are bound to a checkout session, amount, and expiry.
- Explicit consent: the buyer must confirm before payment capture.
- Time limits + single use: tokens expire quickly and cannot be replayed.
- Idempotency keys: retries never double‑charge or duplicate orders.
- Audit trail: every agent action and ACP call is logged with request IDs.
- PCI isolation: sensitive payment data stays with the gateway.
Adoption paths
Merchants on an existing stack
- Enable ACP endpoints for checkout and delegated payment.
- Register MCP tools for product search, add‑to‑cart, order/return/tracking actions.
- Connect systems to the Sync Server (Shopify/marketplaces, ERP, 3PL).
- Start with one workflow (orders + tracking), then expand to returns, warranties, finance, and proactive ops.
Marketplaces or multi‑brand operators
- Onboard each tenant with isolated credentials, mappings, and rate limits.
- Share the agent layer across tenants while keeping data and outcomes isolated.
- Route orders per tenant policy (warehouse rules, SLA, costs).