B2B capabilities
The SDK and UI libraries are built for B2B as well as B2C. The features below span the data layer, the components and the Accelerator.
Shop modes and portal modes
Two settings control B2B behavior. The shop mode (set when you scaffold) decides which account features ship. The portal mode decides what anonymous visitors see.
Shop modes (--mode in the Accelerator):
| Shop mode | Account features | Register form |
|---|---|---|
b2b | Adds quotes, purchase authorization and contacts | Contact only |
b2c | Universal account routes only | Customer only |
hybrid | Adds quotes, purchase authorization and contacts, gated at runtime | Both |
Portal modes (the portalMode value on the provider, and an environment setting in the boilerplates):
| Portal mode | Anonymous visitors see |
|---|---|
open | Catalog and prices |
semi-closed | Catalog, but prices and catalog actions hidden until login |
closed | Nothing until login |
semi-closed suits B2B catalogs where pricing is customer-specific and should appear only after login. Components honor the portal mode: price, add-to-cart, the price filter and price sorting hide or disable accordingly.
Company and contact model
Propeller's B2B model has Contacts that belong to Companies, where a Company carries price sheets, order lists and addresses. The useCompany hook and the CompanySwitcher component let a Contact switch the active Company, which drives pricing, addresses and authorization. Registration callbacks let you assign a new Contact to a Company, link a price sheet, or add the Contact to an order list. See Understanding companies, contacts and customers.
Purchase authorization and quotes
For approval-driven buying, the library ships purchase-authorization components and hooks (PurchaseAuthorizationConfigurator, PurchaseAuthorizationRequests and the matching hooks) and quote actions (QuoteActions). These ship in the b2b and hybrid shop modes.
Clusters
Propeller models configurable products as Clusters with Cluster Options. The ClusterCard, ClusterConfigurator, ClusterInfo and ClusterOptions components, and the useClusterConfigurator hook, handle variant selection and option configuration. See Understanding products and categories.
Customer-specific pricing
When a Contact is signed in, the GraphQL proxy forwards their token and the API returns prices for their Company's price sheet. In semi-closed portal mode, anonymous visitors see the catalog without prices, and customer-specific prices appear after login. See Customer-specific pricing.
See also
- SDK services for the services behind these features
- UI components for the components and hooks
- Understanding companies, contacts and customers for the B2B data model
- Customer-specific pricing for price sheets and action codes