Shopify, Capacity, ERP, and 3PL Sync

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.

Map

Sync architecture audit

Document the order, inventory, tracking, and exception paths across storefront, ERP, WMS, and 3PL systems.

System map
Payload inventory
Risk and ownership matrix
Validate

Dry-run integration lane

Run jobs against real records without production mutation until mappings, policies, and exceptions are clear.

Shopify order ingest
Inventory preview
Tracking match validation
Operate

Production sync control tower

Move verified flows into monitored production with dashboards, retries, repair queues, and escalation paths.

Production writeback
Sync health reporting
Operator repair workflow

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.

Stores source order snapshots
Persists canonical StateSet orders
Supports operator backfill

Capacity Order Submission

Submits eligible local orders to Capacity with validation, in-flight locking, submission keys, and retry backoff.

Skips cancelled orders
Prevents duplicate pushes
Records attempt/result state

Tracking Writeback

Polls Capacity tracking batches, matches Shopify order ids, extracts carrier data, and writes Shopify fulfillments.

Line-level shipped quantities
No fallback full-order fulfillment
Local tracking and fulfillment audit

Order Intelligence

Surfaces missing StateSet rows, unsent Capacity orders, unverified submissions, duplicate rows, and tracking gaps.

Recommended operator actions
Capacity location filtering
Movement health endpoints

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.

Dry-run inventory workflows before mutating Shopify or local cache
Expose Shopify sync status, last sync time, and error reason per Capacity SKU
Skip inventory rows without SKU or explicit available quantity to avoid accidental zeroing
List adjustments, reservations, low-stock alerts, and reconciliation actions from the API

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.

Shopify -> StateSet
Capacity inventory -> StateSet
NetSuite -> StateSet

Push-Based Sync

Outbound order, fulfillment, and inventory writeback with retry and idempotency controls.

StateSet -> Capacity
Capacity -> Shopify inventory
StateSet -> NetSuite

Webhook Sync

Signed webhook ingress for real-time order and fulfillment events with replay tooling.

Shopify order webhooks
ACP order webhooks
ShipStation tracking

Integrations

30+ Connector Coverage

Type-safe Rust clients with per-service rate limiting, circuit breakers, health checks, and tenant-scoped credentials.

E-commerce & Marketplaces

S

Shopify

Polling, webhooks, fulfillments

20 conc
A

Amazon

SP-API order sync

15 conc
T

TikTok Shop

Order & product sync

15 conc
W

Walmart

Orders, ack, ship, cancel

15 conc
E

eBay

Trading API

15 conc
Et

Etsy

Open API v3

10 conc
Wc

WooCommerce

REST API

15 conc
S

Shopware

Commerce order sync

15 conc
B

BigCommerce

Catalog and order sync

15 conc
A

Adobe Commerce

Magento order sync

15 conc
M

MercadoLibre

Marketplace order sync

15 conc
Z

Zalando

Merchant orders

15 conc
S

Shopee

Regional marketplace sync

15 conc
L

Lazada

Marketplace order sync

15 conc

Fulfillment & Logistics

D

DCL Logistics

Batch Order Fulfillment

10 conc
C

Cart.com

Fulfillment & Webhooks

10 conc
C

Capacity

Orders, tracking, inventory

5 conc
F

Flexport

Logistics visibility

10 conc
A

AfterShip

Tracking refresh

10 conc
L

Loop Returns

Returns events

10 conc
S

ShipStation

Shipment webhooks

10 conc

ERP & Business Systems

N

NetSuite

OAuth 1.0 + SuiteQL

5 conc
S

StateSet

Hasura GraphQL

20 conc
S

StateSet API

REST shipment sync

20 conc
L

Luminous

Sales orders and status

10 conc

Supporting Services

Ag

Algolia

Product Indexing

15 conc
Sg

SendGrid

Email Notifications

10 conc

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.

ClosedOpenHalf-Open

Exponential Backoff

Intelligent retry with jitter (0.8-1.2x) to prevent thundering herd. Initial: 50ms, Max: 5s.

50ms100ms200ms400ms800ms

Rate Limiting

Per-tenant semaphore-based concurrency control. Prevents upstream API overload.

StrictStandardGenerous

Background Jobs

Event-Driven Processing

Persistent job queue with PostgreSQL backing. Automatic recovery on restart and configurable retry policies.

Job Lifecycle

QueuedAwaiting processing
RunningWorker executing
SucceededCompleted successfully
FailedAll retries exhausted
RetryPendingScheduled for retry

Job Types

ShopifySyncMax 3 retries
CapacityOrderSyncMax 3 retries
CapacityTrackingSyncMax 3 retries
CapacityInventoryRefreshMax 3 retries
CapacityInventoryShopifyMax 3 retries
CapacityInventoryBundlesMax 3 retries
SyncAllMax 3 retries
AcpOrderProcessMax 3 retries

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.

MethodEndpointDescription
POST/v1/tenants/{tid}/ordersCreate idempotent order
POST/v1/tenants/{tid}/orders/batchBatch import with dry run
POST/v1/tenants/{tid}/orders/backfill/shopify/{shopifyOrderId}Repair missing Shopify snapshot
POST/v1/tenants/{tid}/orders/{id}/capacity/submitSubmit one order to Capacity
POST/v1/tenants/{tid}/orders/{id}/capacity/trackingPull Capacity tracking for one order
GET/v1/tenants/{tid}/orders/intelligenceShopify/StateSet/Capacity exception view
GET/v1/tenants/{tid}/orders/movements/healthOrder movement health signals
POST/v1/tenants/{tid}/sync/shopifyQueue Shopify order ingest
POST/v1/tenants/{tid}/sync/capacity/ordersQueue Capacity order submission
POST/v1/tenants/{tid}/sync/capacity/trackingQueue tracking writeback
POST/v1/tenants/{tid}/sync/inventoryRun inventory workflow
GET/v1/tenants/{tid}/inventory/capacityCapacity inventory cache
GET/v1/tenants/{tid}/inventory/reconciliationInventory sync status and actions
POST/v1/tenants/{tid}/inventory/reservationsReserve 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

AI Agent
Sync Server
Fulfillment
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

Terminal
# 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.