B2B program notes—patterns and metrics, not proprietary schema dumps.
Adobe Commerce B2B adds companies, shared catalogs, negotiable quotes, and layered permissions. The product surface looks like toggles; the engineering surface is indexer cardinality, cache invalidation graphs, and price permission matrices that quietly destroy performance if ignored.
1. Shared catalogs and price books
What explodes
catalog_product_price(and company-specific dimensions) grows with SKU count × company groups × websites.- Reindex jobs that were “fine” in B2C become multi-hour when shared catalogs multiply effective SKUs per customer.
Mitigations
- Segment companies into catalog groups deliberately—avoid “one company = one catalog” unless revenue justifies ops cost.
- Partial reindex strategies: know which indexer invalidations your ERP sync triggers nightly.
- Staging data volume must mirror prod cardinality—10 SKUs in QA will not find the slow query.
2. Permissions and cache
When a sales rep reassigns accounts:
- Customer group / company association changes can invalidate full page cache and block-level FPC entries.
- GraphQL caches may need tag-based invalidation if you cache
productsqueries per company.
Documentation
We kept a matrix: event → invalidated tags → expected customer-visible delay. Support stopped guessing “up to 15 minutes” answers.
3. Company user ↔ customer linkage
Treat linking as a migration project:
- Checksum report: counts of users, linked customers, orphans.
- Idempotent repair command for drift after bulk HR imports.
Automated tests
- Parameterized tests: given company X and SKU set Y, assert visible price and add-to-cart permission.
4. Performance habits that paid off
- Blackfire / New Relic traces on
checkout/cart,graphql, andcompany/usersendpoints before peak. - MySQL slow log sampling on staging with production-sized dumps (anonymized PII).
- Bulk APIs for ERP SKU updates instead of admin grid saves—human scale ≠ machine scale.
5. Quote / negotiation flows
Negotiable quotes add state machines—do not reimplement half in custom modules:
- Subscribe to extension points (
quote_submit, custom approval gates) instead of rewriting controllers. - Ensure email templates and history comments carry audit IDs for finance.
6. Incident examples (redacted)
- Indexer backlog caused checkout timeouts—fixed by throttling ERP delta frequency + raising
max_connectionstemporarily while we split jobs. - Wrong shared catalog assignment duplicated SKUs in navigation—caught by nightly catalog diff script comparing expected category counts.
Resume framing
“Partnered on Adobe Commerce B2B at scale: shared catalog strategy, company permission invalidation, indexer/reindex discipline, and automated tests around price visibility—closed performance incidents with measurable before/after.”