spree-b2b

Installation
SKILL.md

Spree B2B / Wholesale

In Spree 6, B2B is built from four open-source building blocks. They're all configuration, and one storefront plus one backend can serve retail and trade side by side:

Block Answers
Company (Spree::Company) Who is buying: an organization, its people, its addresses, its tax identity
Catalog (Spree::Catalog) The agreement: what that audience sees, what they pay, how much they must order
Channel gating (storefront_access) Whether guests can see the catalog or prices at all
Freight (delivery rules plus the Freight rate provider) How wholesale loads ship: cartons, pallets, containers, quoted after review

The end-to-end walkthrough is the Build a B2B Store guide (node_modules/@spree/docs/dist/developer/how-to/build-a-b2b-store.md) — follow it for setup order and dashboard screens; this skill is the rules and traps behind it.

Seeded for every store: a wholesale channel (login_required, guest checkout off), a Wholesale customer group (the wholesale portal's approval marker), and a publishable key bound to the wholesale channel. Sample data (spree sample-data) adds a demo buyer wholesale@example.com / spree123 — publicly known credentials, so never load sample data into production (the task has no environment guard) — a wholesale price list with quantity breaks, the two-level company Acme Industrial → Acme EMEA, and an inactive Wholesale Assortment catalog assigned to Acme Industrial.

Spree Enterprise only: company roles and capabilities (the OSS membership role is a cosmetic label, and every member can do everything within their standing), order approvals (approval_required), spending limits, governance audit history, and a company onboarding/approval flow. Payment terms, net invoicing and quotes are on the Enterprise roadmap. Enterprise governance enforces through the same endpoints, so an OSS storefront keeps working unchanged when it's switched on.

Companies

Installs
17
GitHub Stars
10
First Seen
Oct 1, 2026