---
title: "Vendor Management"
description: "Vendor lifecycle, stock ownership, earnings, and merchant configuration"
locale: "en"
---
# Vendor Management

Ring’s multi-vendor marketplace ties **entities** (`storeActivated: true`) to product ownership and merchant payout configuration. ERP hub P0 adds **ownership-gated stock restock** and deeper earnings visibility from the canonical `settlements` ledger.

### For founders

## Vendor journey

1. **Onboarding** — `/vendor/start` creates store slug, branding, categories.
2. **Products** — `/vendor/products` (+ optional Main Store submission for admin review).
3. **Orders** — `/vendor/orders` for lines where the vendor appears in `vendorSettlements`.
4. **Stock** — `/vendor/stock` — restock own catalog only; bulk select; low-stock badges.
5. **Earnings** — `/vendor/earnings` — pending + history (simulated badge when payout mode is simulated).
6. **Settings** — merchant-facing configuration (settlement frequency / branding where enabled).

Approved vendors see a **VENDOR** group in desktop/mobile nav: Dashboard, Products, Orders, Stock, Earnings, Settings.

> **Tip**
> Platform admins can restock any product from `/admin/store/stock`. Vendors cannot restock another vendor’s SKU — ownership is enforced server-side.

### For developers

## Ownership & data

| Concern | Implementation |
|---------|----------------|
| Vendor entity | `getVendorEntity(userId)` — `entities` with `storeActivated: true` |
| Product owner | `productOwner` / `resolveVendorEntityId` (`features/store/lib/product-document.ts`) |
| Restock ACL | `restockVendorProduct` in `app/_actions/admin-store-erp.ts` — admin OR matching vendor entity |
| Stock list | `ERPStockService.listProductsForVendor(vendorEntityId)` |
| Earnings | `getVendorPayoutHistory` / `getVendorPendingPayouts` from `settlement.ts` |

## Trust tiers & commission

Platform commission defaults follow vendor **store tier** (`TIER_BENEFITS` in `constants/store.ts`). Merchants may have `merchant_configs` / `merchantConfigs` with `commissionStructure` overrides (admin-managed). Per-product `referralCommission` overrides feed the shared resolver used by settlements and refcodes.

## Related code

- Vendor UI: `app/[locale]/(protected)/vendor/*`
- Admin product CRUD: `app/_actions/admin-store-erp.ts`
- Entity service: `features/entities/services/vendor-entity.ts`

  
- [features/erp](/docs/features/erp.md) — Prerequisite: ERP hub overview.

  
- [features/erp/inventory](/docs/features/erp/inventory.md) — Same-workflow: vendor stock restock and low-stock badges.

  
- [features/erp/commissions](/docs/features/erp/commissions.md) — Next-step: earnings backed by settlements ledger.

  
- [features/store](/docs/features/store.md) — Depends-on: multi-vendor catalog and product approval.

  
- [features/entities](/docs/features/entities.md) — See-also: entity profiles with storeActivated.
