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
- Order placed at bottom reseller's store
- Order forwards up to super admin
- Super admin ships via courier (Delhivery)
- Courier collects COD, remits to super admin
- Margins flow DOWN to each reseller automatically
Scenario B: Reseller Fulfills Locally
- Order placed at reseller's store
- Reseller ships locally, collects COD directly
- Reseller keeps their margin
- Reseller remits UP to parent (parent's cost + margin)
- 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-Tenantheader
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
-
Set Up Master Catalog
- Go to Reseller Catalog → Master Products
- Add products with base costs and minimum margins
- Configure default pricing rules
-
Onboard Resellers
- Go to Settings → Resellers
- Create new reseller accounts
- Set their pricing tier and credit limits
-
Configure Settlements
- Set remittance due dates
- Configure auto-settlement rules
- Set up notifications for overdue payments
For Resellers
-
View Your Catalog
- Go to Reseller Catalog → My Catalog
- See products available at your cost
- Set selling prices with your margin
-
Manage Sub-Resellers (if allowed)
- Go to Settings → Sub-Resellers
- Invite or create sub-reseller accounts
- Set their pricing (your cost + your margin)
-
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 catalogreseller_product_pricing- Per-reseller pricingchain_orders- Order chain trackingtenant_wallets- Wallet balancescod_collections- COD trackingcod_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_tenantsoraccess_descendantscapabilities - 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
- Architecture Deep Dive - Technical details
- Catalog Module - Product and pricing management
- Orders Module - Chain order processing
- Finance Module - Wallet and settlements
- API Reference - Integration endpoints
- Database Schema - Table structures