Production-Grade

Everything You Need to Scale

KubeRiva is a complete, AI-native OMS — not a toolkit. Multi-channel orders, intelligent sourcing across your fulfillment network, real-time inventory, and KubeAI-powered analytics.

FastAPI + Async PythonPostgreSQL · MongoDB · RedisReact + TypeScriptKubeAIElasticsearchEnterprise-Ready
OMS

Order Management

Ingest orders from any channel, manage them through a full 15-state lifecycle, and fulfill them across your distributed node network.

Multi-Channel Order Ingestion

Aggregate orders from Shopify, Amazon, WooCommerce, POS, and API channels. Each order gets a unique ORD-YYYYMMDD-XXXXXX reference.

15-State Order Lifecycle

PENDING → CONFIRMED → SOURCING → SOURCED → PICKING → PACKING → READY_TO_SHIP → SHIPPED → OUT_FOR_DELIVERY → DELIVERED, plus BACKORDERED, ON_HOLD, RETURNED, REFUNDED, CANCELLED. Full MongoDB audit trail.

Returns & RMA Handling

Process returns and refunds with automatic inventory adjustments (RETURNED reason) and payment status sync.

Backorder Management

Automatically retry sourcing for backordered orders every 30 minutes for up to 72 hours. Partial shipment support included.

Sourcing Rule Builder

Priority-ordered rules with condition matching on channel, fulfillment type, order total, and region. Choose from 7 strategies per rule.

5 Fulfillment Types

SHIP_TO_HOME, STORE_PICKUP, SHIP_FROM_STORE, CURBSIDE_PICKUP, and SAME_DAY_DELIVERY — each routed optimally.

# Create an order via REST API
POST /orders
{
  "channel": "SHOPIFY",
  "fulfillment_type": "SHIP_TO_HOME",
  "customer_email": "jane@example.com",
  "shipping_address": { "city": "New York", "zip": "10001", "lat": 40.71, "lng": -74.00 },
  "items": [{ "sku": "USB-C-CABLE-BLK", "quantity": 2, "unit_price": 19.99 }]
}
# Response: { "order_number": "ORD-20240312-004821", "status": "CONFIRMED" }
# Async: sourcing task queued → webhook fired: order.created
Inventory & Nodes

Warehouse & Fulfillment Network

Manage your entire fulfillment network — distribution centers, retail stores, dark stores — with real-time inventory, atomic reservations, and capacity tracking.

Multi-Location Inventory

Per-node stock tracking: on_hand, reserved, available, and on_order. Real-time updates on every allocation and shipment.

Fulfillment Node Types

Manage distribution centers, retail stores, dark stores, warehouses, and pickup points — each with capability flags and capacity limits.

Inventory Adjustments

Full audit log with reasons: RECEIVED, SOLD, RETURNED, DAMAGED, CYCLE_COUNT, TRANSFER_IN, TRANSFER_OUT.

Real-Time Dashboards

Live inventory visibility per SKU across all nodes. Aggregate availability checks for bulk order processing.

Inventory Reservations

Atomic reservation system prevents overselling during concurrent order processing. Reservations expire automatically.

Node Capacity Management

Daily order capacity limits with real-time usage tracking. Status management: ACTIVE, INACTIVE, MAINTENANCE, CLOSED.

# Check inventory across all nodes for a SKU
GET /inventory/sku/USB-C-CABLE-BLK

# Per-node response:
{ "node": "DC-Newark",    "qty_on_hand": 450, "qty_reserved": 32, "qty_available": 418 }
{ "node": "Store-BK",     "qty_on_hand": 12,  "qty_reserved": 3,  "qty_available": 9   }
{ "node": "DC-Chicago",   "qty_on_hand": 220, "qty_reserved": 18, "qty_available": 202 }

# Receive stock with audit trail
POST /inventory/{id}/adjust
{ "quantity_delta": 100, "reason": "RECEIVED", "notes": "PO-2024-0312 received" }
AI & Automation

Artificial Intelligence

AI isn't a feature — it's the brain of KubeRiva. KubeAI powers sourcing decisions, the assistant interface, proposal generation, and continuous learning from outcomes.

AI Adaptive Sourcing

KubeAI analyzes historical outcomes (delivery time, return rate, cost variance) stored in MongoDB to score fulfillment nodes contextually.

Natural Language Assistant

Chat interface powered by KubeAI with tool access to orders, inventory, analytics, nodes, and sourcing rules. Streaming SSE responses.

AI Learning Worker

Celery worker processes completed orders to extract sourcing outcome labels and update node performance metrics in MongoDB.

AI Architect (Proposals)

AI proposes sourcing rule changes, custom attributes, and UI widgets. All proposals await human approval before application.

A/B Sourcing Experiments

Create experiments comparing sourcing strategies with traffic splitting. Real-time results show cost and delivery time improvements.

AI Hybrid Strategy

Blend 60% AI scoring with 40% rule-based scoring for predictable yet intelligent sourcing. Ideal for production environments.

# AI Assistant — streaming SSE with tool calls
POST /ai/chat
{ "message": "Which node had the best on-time rate for NYC orders last month?" }

# KubeAI calls: get_node_list() + get_sourcing_rules() + node performance data
# Streams back:
# "DC-Newark had 97.3% on-time delivery for NYC orders in February,
#  compared to 91.2% for DC-Philadelphia. AI_ADAPTIVE selected it for
#  68% of NYC orders based on this 30-day historical pattern."

# AI Architect — proposals await human approval
GET /architect/proposals
# Returns pending AI-generated sourcing rule changes, config updates, experiments
Analytics

Analytics & Reporting

Real-time KPIs, channel breakdowns, node performance comparisons, and AI vs. rule-based sourcing effectiveness — all queryable over any date range.

Dashboard KPIs

Total orders, revenue, average order value, and fulfillment rate for any date range.

Order Volume Trends

7/14/30/60-day time-series charts for order count and revenue.

Channel Breakdown

Revenue and order count by channel: WEB, MOBILE, POS, API, MARKETPLACE.

Node Performance

Per-node throughput, average delivery time, return rate, and cost. Powered by MongoDB rolling metrics.

Strategy Effectiveness

Compare AI_ADAPTIVE vs COST_OPTIMAL vs DISTANCE_OPTIMAL with real outcome data.

Fulfillment Type Distribution

Breakdown of SHIP_TO_HOME vs STORE_PICKUP vs SAME_DAY orders.

# Dashboard KPIs
GET /analytics/dashboard?start=2024-03-01&end=2024-03-12
{
  "total_orders": 8421, "total_revenue": 1042800.00,
  "avg_order_value": 123.84, "fulfillment_rate": 0.987
}

# Sourcing strategy performance comparison
GET /analytics/sourcing-strategy-performance
{ "AI_ADAPTIVE":      { "orders": 2940, "avg_delivery_hrs": 27.2, "return_rate": 0.028 } }
{ "DISTANCE_OPTIMAL": { "orders": 2105, "avg_delivery_hrs": 31.4, "return_rate": 0.041 } }
{ "COST_OPTIMAL":     { "orders": 1683, "avg_delivery_hrs": 38.1, "return_rate": 0.037 } }
B2B & Multi-Brand

B2B Commerce & Multi-Brand

Run B2C and B2B from a single platform. Multi-brand tenant modes, customer account pricing tiers, approval gating, SLA monitoring, and brand-scoped access control.

Multi-Brand Tenant Modes

Set tenant_mode to B2C_ONLY, B2B_ONLY, or HYBRID per org. Each brand carries its own slug, display name, logo, and default currency.

Customer Accounts

B2B buyer profiles with company name, credit limit, payment terms (NET_15 / 30 / 45 / 60 / 90), and pricing tier (STANDARD → PLATINUM).

B2B Order Approval Gate

Orders from B2B accounts enter PENDING_APPROVAL before CONFIRMED. Approve or reject via API with a reason — full audit trail in MongoDB.

B2B Analytics

Dedicated endpoints for account-level revenue, outstanding balance, order volume over time, and tier distribution across your buyer base.

Brand-Scoped Access Control

UserBrandRole table grants users role (OWNER / ADMIN / MEMBER / VIEWER) per brand. All queries enforce brand_id — IDOR vectors closed across every entity.

SLA Monitoring

Per-lifecycle-step SLA config with Celery beat check every 15 minutes. Breached orders fire order.sla_breach with step, expected_by, and breached_at.

Distribution Groups

Named node pools (e.g. "Northeast DCs") with priority ordering. Sourcing rules target a group instead of enumerating individual nodes.

Enhanced Lifecycle Rules

Rules now filter on pipeline_type (ORDER / RETURN), order_type (B2C / B2B), and brand_slug. Specificity scoring ensures the most targeted rule wins.

# Create a B2B customer account with NET-30 terms and GOLD tier
POST /b2b/accounts
{ "company_name": "Acme Retail", "credit_limit": 50000, "payment_terms": "NET_30",
  "pricing_tier": "GOLD", "contact_email": "ops@acme.com" }

# B2B order → enters PENDING_APPROVAL before CONFIRMED
POST /orders
{ "channel": "API", "order_type": "B2B", "account_id": "acct_...", "fulfillment_type": "SHIP_TO_HOME",
  "items": [{ "sku": "BULK-CABLE-100", "quantity": 500, "unit_price": 8.99 }] }
# Response: { "status": "PENDING_APPROVAL", "requires_credit_check": true }

# Approve and confirm
POST /b2b/orders/{id}/approve
{ "approved_by": "user_...", "notes": "Credit limit verified" }
APIs & Integrations

Connect Anything

Full REST API, HMAC-signed webhooks, pre-built platform connectors, and multi-tenant environments. Build on KubeRiva or integrate it with anything.

REST API

Full REST API with JWT auth, rate limiting, and interactive Swagger docs at /docs. 50+ endpoints covering orders, inventory, nodes, analytics.

API Key Authentication

POST /auth/api-keys issues scoped kr_... tokens stored as SHA-256 hashes. Configurable scopes (orders:read, inventory:write, etc.) and optional expiry date.

HMAC Webhooks

HMAC-SHA256 signed webhook deliveries fire on every order state change across all 15 states, including order.sla_breach events. Exponential backoff retry.

Platform Connectors

Pre-built connectors for Shopify, Amazon SP, WooCommerce, Magento, BigCommerce. Connectors auto-stamp brand_id on every synced order.

Carrier Integrations

Native FedEx, UPS, and DHL integrations for label generation, tracking polling, and shipment status sync.

Multi-Tenant Architecture

Organization → Environment hierarchy. Separate DEV, STAGING, PROD data planes. Per-environment role assignment (OWNER, ADMIN, MEMBER, VIEWER).

Elasticsearch Search

Full-text order search with fuzzy matching on order number, customer email, name, and tags. Multi-field filter support.

# Issue a scoped API key (no JWT required for machine-to-machine integrations)
POST /auth/api-keys
{ "name": "Warehouse WMS", "scopes": ["orders:read", "inventory:write"], "expires_at": "2027-01-01" }
# Response: { "key": "kr_abc123...", "scopes": [...] }  ← shown once, stored as SHA-256

# Use it on any endpoint
GET /orders?status=PICKING
Headers: X-API-Key: kr_abc123...

# Create a Shopify connector (auto-stamps brand_id on synced orders)
POST /connectors
{ "name": "My Shopify Store", "platform": "SHOPIFY", "direction": "BIDIRECTIONAL",
  "config": { "shop_domain": "mystore.myshopify.com", "api_key": "...", "api_secret": "..." } }

# Signed webhook delivery headers:
# X-OMS-Signature: sha256=<hmac_hex>
# X-OMS-Event: order.sla_breach
# X-OMS-Timestamp: 2026-05-09T08:15:00Z