StateSet Sync
Multi-tenant synchronization runtime for commerce operations. Ingest Shopify orders, submit eligible orders to Capacity and other fulfillment systems, write line-level tracking back to Shopify, and keep direct and bundle inventory aligned across warehouses and storefronts.
- Connectors
- 30+
- Order Ingest
- API + Webhooks
- Capacity Jobs
- Split Flows
- Inventory Workflows
- 3
- Framework
- Rust
Why Teams Deploy Sync
Integration reliability becomes a product advantage
StateSet Sync is built for teams that need more than point-to-point scripts: brands, 3PLs, and operators who need visibility, repair workflows, and controlled production writeback.
Fewer integration fire drills
Centralize order ingest, inventory refresh, tracking writeback, and repair workflows in one runtime.
Cleaner brand and 3PL collaboration
Expose sync status, failed records, and recommended repair actions before issues turn into account escalations.
Production-safe writeback
Use dry-run modes, idempotency, retries, status records, and operator approval paths for safer go-lives.
Deployment Motion
From integration audit to monitored production sync
Start with a practical path: map the current systems, validate jobs safely, then operate the critical sync flows with observability and repair paths.
Sync architecture audit
Document the order, inventory, tracking, and exception paths across storefront, ERP, WMS, and 3PL systems.
Dry-run integration lane
Run jobs against real records without production mutation until mappings, policies, and exceptions are clear.
Production sync control tower
Move verified flows into monitored production with dashboards, retries, repair queues, and escalation paths.
Latest Sync Capabilities
Operational order and inventory sync
StateSet Sync now manages the full Shopify-to-Capacity lifecycle: order ingest, eligibility checks, guarded submission, tracking ingestion, Shopify fulfillment writeback, Capacity inventory refresh, direct SKU inventory sync, and virtual bundle inventory sync.
Shopify Order Ingest
Polls Shopify with financial, fulfillment, status, timestamp, and since_id filters, or accepts signed Shopify webhooks.
Capacity Order Submission
Submits eligible local orders to Capacity with validation, in-flight locking, submission keys, and retry backoff.
Tracking Writeback
Polls Capacity tracking batches, matches Shopify order ids, extracts carrier data, and writes Shopify fulfillments.
Order Intelligence
Surfaces missing StateSet rows, unsent Capacity orders, unverified submissions, duplicate rows, and tracking gaps.
Capacity Refresh
capacity_inventory_refresh
Pull Capacity available/on-hand counts into the local inventory cache for dashboard and API reads.
Direct Shopify Sync
capacity_inventory_shopify
Push direct, non-bundle Capacity SKU counts to Shopify inventory levels with per-SKU status tracking.
Bundle Inventory Sync
capacity_inventory_bundles
Derive virtual bundle availability from component inventory and update Shopify bundle SKUs.
Inventory guardrails
The Capacity inventory path is designed for operator control: preview first, write only when resolved, and keep SKU-level Shopify sync state visible for troubleshooting.
Architecture
Layered, Modular Design
Built with Axum and Tokio for async throughput. Clear separation between HTTP handlers, orchestration logic, platform clients, inventory workflows, and durable persistence.
┌─────────────────────────────────────────────────────────────────┐ │ AXUM HTTP SERVER (8080) │ │ TONIC gRPC SERVER (50051) │ ├─────────────────────────────────────────────────────────────────┤ │ REQUEST HANDLERS LAYER │ │ • REST API handlers • gRPC service handlers │ │ • Authentication • Validation & RBAC │ ├─────────────────────────────────────────────────────────────────┤ │ ORCHESTRATION LAYER │ │ • OrderOrchestrator • InventoryOrchestrator │ │ • Capacity workflows • ACP routing • Sync plans │ ├─────────────────────────────────────────────────────────────────┤ │ SERVICES LAYER (30+ Clients) │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Shopify │ │ NetSuite │ │ DCL │ │ Amazon │ │ │ │ Capacity │ │ Cart.com │ │ Luminous │ │ Walmart │ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ ├─────────────────────────────────────────────────────────────────┤ │ RESILIENCE & INFRASTRUCTURE │ │ • Circuit Breakers • Retry with Exponential Backoff │ │ • Rate Limiting • Correlation ID Tracing │ ├─────────────────────────────────────────────────────────────────┤ │ DATA PERSISTENCE LAYER │ │ • PostgreSQL Jobs • Shopify Checkpoints │ │ • Order Snapshots • Inventory Levels • Audit Logs │ └─────────────────────────────────────────────────────────────────┘
Data Synchronization
Multi-Directional Sync
Three synchronization modes for order, tracking, inventory, and operator repair workflows across the commerce stack.
Pull-Based Sync
Scheduled or on-demand ingest from storefronts, ERPs, WMS systems, and 3PL APIs.
Push-Based Sync
Outbound order, fulfillment, and inventory writeback with retry and idempotency controls.
Webhook Sync
Signed webhook ingress for real-time order and fulfillment events with replay tooling.
Integrations
30+ Connector Coverage
Type-safe Rust clients with per-service rate limiting, circuit breakers, health checks, and tenant-scoped credentials.
E-commerce & Marketplaces
Shopify
Polling, webhooks, fulfillments
Amazon
SP-API order sync
TikTok Shop
Order & product sync
Walmart
Orders, ack, ship, cancel
eBay
Trading API
Etsy
Open API v3
WooCommerce
REST API
Shopware
Commerce order sync
BigCommerce
Catalog and order sync
Adobe Commerce
Magento order sync
MercadoLibre
Marketplace order sync
Zalando
Merchant orders
Shopee
Regional marketplace sync
Lazada
Marketplace order sync
Fulfillment & Logistics
DCL Logistics
Batch Order Fulfillment
Cart.com
Fulfillment & Webhooks
Capacity
Orders, tracking, inventory
Flexport
Logistics visibility
AfterShip
Tracking refresh
Loop Returns
Returns events
ShipStation
Shipment webhooks
ERP & Business Systems
NetSuite
OAuth 1.0 + SuiteQL
StateSet
Hasura GraphQL
StateSet API
REST shipment sync
Luminous
Sales orders and status
Supporting Services
Algolia
Product Indexing
SendGrid
Email Notifications
Resilience
Production-Grade Reliability
Built-in resilience patterns for handling failures gracefully and preventing cascade failures.
Circuit Breaker
Automatic failure detection with configurable thresholds. Opens after 10 failures, recovers in 30 seconds.
Exponential Backoff
Intelligent retry with jitter (0.8-1.2x) to prevent thundering herd. Initial: 50ms, Max: 5s.
Rate Limiting
Per-tenant semaphore-based concurrency control. Prevents upstream API overload.
Background Jobs
Event-Driven Processing
Persistent job queue with PostgreSQL backing. Automatic recovery on restart and configurable retry policies.
Job Lifecycle
Job Types
Retry Policy: Durable jobs with retry_pending state, exponential backoff, and PostgreSQL persistence when configured.
REST + gRPC
Order and Inventory API
HTTP REST API on port 8080 and gRPC on port 50051. The current surface supports idempotent order creation, operator repair, split Capacity jobs, inventory workflows, reservations, and movement analytics.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/tenants/{tid}/orders | Create idempotent order |
| POST | /v1/tenants/{tid}/orders/batch | Batch import with dry run |
| POST | /v1/tenants/{tid}/orders/backfill/shopify/{shopifyOrderId} | Repair missing Shopify snapshot |
| POST | /v1/tenants/{tid}/orders/{id}/capacity/submit | Submit one order to Capacity |
| POST | /v1/tenants/{tid}/orders/{id}/capacity/tracking | Pull Capacity tracking for one order |
| GET | /v1/tenants/{tid}/orders/intelligence | Shopify/StateSet/Capacity exception view |
| GET | /v1/tenants/{tid}/orders/movements/health | Order movement health signals |
| POST | /v1/tenants/{tid}/sync/shopify | Queue Shopify order ingest |
| POST | /v1/tenants/{tid}/sync/capacity/orders | Queue Capacity order submission |
| POST | /v1/tenants/{tid}/sync/capacity/tracking | Queue tracking writeback |
| POST | /v1/tenants/{tid}/sync/inventory | Run inventory workflow |
| GET | /v1/tenants/{tid}/inventory/capacity | Capacity inventory cache |
| GET | /v1/tenants/{tid}/inventory/reconciliation | Inventory sync status and actions |
| POST | /v1/tenants/{tid}/inventory/reservations | Reserve stock for an order |
gRPC Service (Port 50051)
service OrderIntegrationService {
rpc SubmitOrder(SubmitOrderRequest)
returns (SubmitOrderResponse);
rpc CreateNetSuiteSalesOrder(
NetSuiteOrderRequest
) returns (NetSuiteOrderResponse);
rpc CreateDclBatch(DclBatchRequest)
returns (DclBatchResponse);
rpc CreateCartOrder(CreateCartOrderRequest)
returns (CreateCartOrderResponse);
}AI-Native
Agent Commerce Protocol
Enable AI agents to place orders directly via a unified protocol. Automatic routing to fulfillment centers and ERPs.
ACP Order Flow
POST /v1/tenants/{tid}/acp/orders
{
"agent_id": "claude-agent-001",
"order": {
"customer": { "email": "...", "address": {...} },
"items": [{ "sku": "PROD-001", "qty": 2 }],
"routing": "auto" // auto | netsuite | dcl | cartcom
}
}Observability
Production Monitoring
Prometheus Metrics
HTTP latency, throughput, errors, job stats on /metrics endpoint
Structured Logging
JSON logs with correlation IDs, Sentry error tracking
Distributed Tracing
W3C Trace Context, B3 Zipkin, AWS X-Ray headers
Health Checks
Kubernetes-compatible liveness, readiness, startup probes
Quick Start
Get Running in Minutes
# Clone the repository $ git clone https://github.com/stateset/stateset-sync-server $ cd stateset-sync-server # Start with Docker Compose (includes PostgreSQL) $ docker-compose up -d # Or build and run natively $ cargo build --release $ ./target/release/stateset-sync-server # Server running on: # HTTP: http://localhost:8080 # gRPC: http://localhost:50051 # Docs: http://localhost:8080/docs/
Unify Your Commerce Stack
Stop building custom integrations. Sync orders, inventory, and fulfillment across all your platforms with a single server.