Multi-Level Reseller Platform

Auto Commerce includes a powerful multi-level reseller platform that enables hierarchical distribution networks with unlimited depth, cascading pricing, and dual COD settlement flows.

Overview

The reseller platform transforms Auto Commerce into a complete dropshipping and reseller management system where:

  • Super Admin acts as the master wholesaler/manufacturer
  • Resellers can onboard their own sub-resellers (unlimited depth)
  • Margins cascade through the chain - each level sets prices for their downstream
  • Orders flow up the chain to whoever fulfills them
  • Settlements flow based on who collected the COD
┌─────────────────────────────────────────────────────────────┐
│                   SUPER ADMIN TENANT                        │
│  • Master product catalog (base_cost + minimum_margin)      │
│  • Can fulfill orders OR delegate to resellers              │
│  • Global settlements dashboard                             │
│  • Context switch to view any reseller                      │
└─────────────────┬───────────────────────────────────────────┘
                  │ Sets margin for direct children
        ┌─────────┴─────────┐
        ▼                   ▼
┌───────────────┐   ┌───────────────┐
│  Reseller A   │   │  Reseller B   │
│  cost = ₹120  │   │  cost = ₹120  │
│  +own margin  │   │  +own margin  │
└───────┬───────┘   └───────────────┘
        │ Sets margin for their sub-resellers
   ┌────┴────┐
   ▼         ▼
┌──────┐  ┌──────┐
│Sub-R1│  │Sub-R2│   (unlimited depth continues...)
│cost= │  │cost= │
│ ₹138 │  │ ₹138 │
└──────┘  └──────┘

Key Features

Unlimited Chain Depth

Unlike traditional two-tier affiliate systems, our platform supports unlimited reseller levels:

  • Super Admin → Distributor → Wholesaler → Retailer → Sub-Retailer → ...
  • Each level maintains their own margin and downstream network
  • Full visibility up and down the chain

Cascading Margin Pricing

Each reseller sets prices for their sub-resellers:

Level Sees Cost Sets Price Their Margin
Super Admin ₹100 (base) ₹120 ₹20
Distributor ₹120 ₹138 ₹18
Retailer ₹138 ₹155 ₹17
Customer pays - ₹155 -

Dual COD Flow

The platform handles both fulfillment scenarios:

Scenario A: Super Admin Fulfills

  1. Order placed at bottom reseller's store
  2. Order forwards up to super admin
  3. Super admin ships via courier (Delhivery)
  4. Courier collects COD, remits to super admin
  5. Margins flow DOWN to each reseller automatically

Scenario B: Reseller Fulfills Locally

  1. Order placed at reseller's store
  2. Reseller ships locally, collects COD directly
  3. Reseller keeps their margin
  4. Reseller remits UP to parent (parent's cost + margin)
  5. Parent remits to their parent, and so on

Context Switching

Super admins can "operate as" any reseller in their network:

  • View the platform exactly as that reseller sees it
  • Access their orders, products, and settings
  • Debug issues without requesting credentials
  • Managed via X-Effective-Tenant header

Modules

The reseller platform consists of three integrated modules:

ResellerCatalog

Master product management and cascading pricing:

  • Create master products with base costs
  • Set minimum margin requirements
  • Configure pricing for each reseller level
  • Resellers see products at their cost

ResellerOrders

Chain order management and fulfillment:

  • Orders flow up the reseller chain
  • Track order status across all levels
  • Multiple fulfillment options
  • Full order timeline and audit trail

ResellerFinance

Wallet system and COD settlements:

  • Per-tenant wallet with balance tracking
  • COD collection and remittance management
  • Dual flow settlement processing
  • Transaction history and reporting

Tenant Roles (Dynamic)

The platform uses a capability-based role system that allows dynamic organization types. See the Tenant Roles Architecture for full details.

Default System Roles

Role Legacy Type Description Key Capabilities
platform_owner super_admin Platform owner/master wholesaler Full access, context switching, master catalog
distributor reseller Distributor/wholesaler Sub-tenant creation, descendant access, margins
retailer standard End-level seller Standard e-commerce features only

Key Capabilities

Capability Description
create_sub_tenants Can create child organizations
access_all_tenants Can view/switch to any tenant
access_descendants Can view/switch to descendant tenants
bypass_permissions Skips permission checks (admin level)
manage_master_catalog Can manage master product catalog
receives_margins Receives margin payments from children
remits_to_parent Must remit payments to parent

Custom roles can be created during installation or at runtime to support any organizational structure (e.g., Regional Manager, Wholesaler, Franchise).

Getting Started

For Super Admins

  1. Set Up Master Catalog

    • Go to Reseller Catalog → Master Products
    • Add products with base costs and minimum margins
    • Configure default pricing rules
  2. Onboard Resellers

    • Go to Settings → Resellers
    • Create new reseller accounts
    • Set their pricing tier and credit limits
  3. Configure Settlements

    • Set remittance due dates
    • Configure auto-settlement rules
    • Set up notifications for overdue payments

For Resellers

  1. View Your Catalog

    • Go to Reseller Catalog → My Catalog
    • See products available at your cost
    • Set selling prices with your margin
  2. Manage Sub-Resellers (if allowed)

    • Go to Settings → Sub-Resellers
    • Invite or create sub-reseller accounts
    • Set their pricing (your cost + your margin)
  3. Handle Orders

    • Incoming orders appear in Chain Orders
    • Forward up or fulfill locally
    • Track settlements in Finance

Architecture

Database Design

The platform uses a hybrid database approach:

Central Database (shared across all tenants):

  • master_products - Super admin's product catalog
  • reseller_product_pricing - Per-reseller pricing
  • chain_orders - Order chain tracking
  • tenant_wallets - Wallet balances
  • cod_collections - COD tracking
  • cod_remittances - Settlement records

Tenant Databases (isolated per tenant):

  • Regular orders, customers, products
  • Local inventory and settings
  • Tenant-specific data

Security

  • Tenant isolation maintained at all levels
  • Context switching requires can_switch_context + access_all_tenants or access_descendants capabilities
  • Wallet operations are transactional
  • Full audit trail for all financial operations

Navigation

Reseller modules appear in the sidebar for tenants with the create_sub_tenants or manage_master_catalog capabilities (typically platform_owner and distributor roles):

📦 Reseller Catalog
   ├── Master Products (platform_owner / access_all_tenants only)
   ├── My Catalog (distributor / create_sub_tenants only)
   └── Pricing

🔄 Chain Orders
   ├── Incoming Orders
   ├── Forwarded Orders
   └── Fulfillment

💰 Finance
   ├── Wallet
   ├── Settlements
   └── Transactions

Next Steps