一键导入
b2b-commerce
// Enable wholesale and B2B sales with company accounts, custom catalogs, quote workflows, purchase orders, and net payment terms
// Enable wholesale and B2B sales with company accounts, custom catalogs, quote workflows, purchase orders, and net payment terms
Manage supplier invoices and vendor payments with automated receipt matching, payment scheduling, early discount optimization, and reconciliation workflows
Predict future inventory needs using historical sales data, seasonal trends, and reorder points to prevent stockouts and overstock
Launch a multi-vendor marketplace with seller onboarding, commission rules, automated payouts via Stripe Connect, and vendor dashboards
Control which products appear first in collections using automated ranking rules, manual overrides, and performance-based sorting algorithms
Sync your catalog and inventory across your own site, Amazon, eBay, and wholesale channels to sell everywhere from one system
Design an order management system that routes orders to the right warehouse, handles split shipments, and manages backorders gracefully
| name | b2b-commerce |
| description | Enable wholesale and B2B sales with company accounts, custom catalogs, quote workflows, purchase orders, and net payment terms |
| category | business-operations |
| risk | critical |
| source | curated |
| date_added | 2026-03-12 |
| tags | ["b2b","wholesale","company-accounts","quote-workflow","net-terms","custom-catalog","purchase-order","CPQ"] |
| triggers | ["B2B commerce","wholesale portal","company accounts","quote workflow","net terms","custom catalog B2B","business accounts"] |
| tools | ["claude-code","cursor","gemini-cli","copilot","codex-cli","kiro","opencode"] |
| platforms | ["shopify","woocommerce","bigcommerce","custom"] |
| difficulty | advanced |
B2B commerce adds wholesale capabilities to your store: company accounts where multiple employees order under one credit limit, custom pricing per account, a quote-to-order workflow for large or custom orders, and net payment terms (Net 30/60/90) with invoice generation. Most platforms have first-party B2B features or dedicated apps that handle these requirements without custom development.
| Platform | Recommended Tool | Why |
|---|---|---|
| Shopify Plus | Shopify B2B (built-in) | Shopify Plus includes Company accounts, custom catalogs, payment terms, and a dedicated B2B checkout — no extra app needed |
| Shopify (non-Plus) | Wholesale Club or Wholesale Gorilla | Both apps add customer-tag-based wholesale pricing, minimum order quantities, and hidden wholesale sections without requiring Plus |
| WooCommerce | WooCommerce B2B (WooCommerce.com extension) or B2BWoo | WooCommerce B2B handles company registration, role-based pricing, and net terms; B2BWoo is a premium alternative |
| BigCommerce | BigCommerce B2B Edition or the built-in Customer Groups | BigCommerce B2B Edition adds company accounts and quotes; Customer Groups (all plans) handle tiered wholesale pricing |
| Custom / Headless | Build company accounts, custom catalogs, and a quote workflow from scratch | Full control over credit limits, approval workflows, and invoice generation |
Quote workflow on Shopify Plus:
WooCommerce B2B (official extension):
Alternative — WooCommerce Role-Based Pricing:
Customer Groups (available on all plans):
BigCommerce B2B Edition (add-on for growing wholesale operations):
For large or custom orders, a quote workflow lets buyers request a price before committing.
Net terms let B2B buyers pay after receiving goods (Net 30 = pay within 30 days of invoice).
Accounting integration for net terms:
// Company account with credit management
interface Company {
id: string;
name: string;
taxId?: string; // EIN, VAT number
billingAddress: Address;
paymentTerms: 'prepay' | 'net15' | 'net30' | 'net60' | 'net90';
creditLimitCents: number | null; // null = no limit
creditUsedCents: number;
status: 'pending' | 'approved' | 'suspended';
}
// Check credit before placing an order
async function checkCreditAvailability(
companyId: string,
orderTotalCents: number
): Promise<{ approved: boolean; reason?: string }> {
const company = await db.companies.findById(companyId);
if (company.status !== 'approved') {
return { approved: false, reason: 'Company account not approved' };
}
if (company.creditLimitCents !== null) {
const availableCredit = company.creditLimitCents - company.creditUsedCents;
if (orderTotalCents > availableCredit) {
return {
approved: false,
reason: `Order exceeds available credit. Available: $${(availableCredit / 100).toFixed(2)}`,
};
}
}
return { approved: true };
}
// Record credit usage when order is placed (in same DB transaction as order creation)
async function consumeCredit(companyId: string, amountCents: number): Promise<void> {
// Atomic update prevents race condition when multiple buyers order simultaneously
await db.raw(
'UPDATE companies SET credit_used_cents = credit_used_cents + ? WHERE id = ? AND credit_used_cents + ? <= COALESCE(credit_limit_cents, 2147483647)',
[amountCents, companyId, amountCents]
);
}
| Problem | Solution |
|---|---|
| Individual buyer sees another company's pricing | Scope all catalog and pricing queries strictly by company ID; test by logging in as buyers from different companies |
| Credit limit exceeded due to concurrent orders | Use atomic SQL update with a WHERE clause checking credit headroom; Shopify Plus's built-in B2B handles this automatically |
| B2B checkout bypasses the approval flow | Enforce approval checks server-side in your order creation logic, not just in the UI |
| Wholesale prices show to non-wholesale customers | Customer tags on Shopify and user roles in WooCommerce must be verified server-side; never trust client-side state for pricing |