From salesforce-commerce
Develops SFRA-based Salesforce B2C Commerce storefronts using cartridge overlays, module.superModule extensions, server-side MVC, and site customizations. For SFRA storefront development.
How this skill is triggered — by the user, by Claude, or both
Slash command
/salesforce-commerce:sf-b2c-sfraThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Fetch live docs:**
Fetch live docs:
github.com/SalesforceCommerceCloud/storefront-reference-architecture for SFRA sourcesite:developer.salesforce.com SFRA architecture MVC for MVC patternssite:developer.salesforce.com SFRA cartridge overlay for overlay best practicessite:developer.salesforce.com module.superModule for extension patternssite:developer.salesforce.com SFRA getting started for latest docsSFRA (Storefront Reference Architecture) is the reference implementation for B2C Commerce storefronts:
| Principle | Rule |
|---|---|
| Overlay | Never modify app_storefront_base -- create custom cartridges that layer on top |
| Extend | Use module.superModule to inherit and augment, not replace |
| Hooks | Use commerce hooks for order, payment, and shipping customization |
| Services | Use the Service Framework for external integrations (payment gateways, ERP) |
The cartridge path (configured in Business Manager) resolves files left-to-right. The leftmost cartridge wins.
Example path: app_custom:app_storefront_base
controllers/Product.js checks app_custom first, falls back to app_storefront_baseapp_custom/cartridge/
├── controllers/ # Route handlers
├── models/ # Data models
├── scripts/ # Helpers, services
├── templates/ # ISML templates
├── experience/ # Page Designer
└── client/default/ # JS + SCSS source (Webpack)
module.superModule resolves to the next cartridge in the path that provides the same module. This is how you extend without duplicating:
var base = module.superModule; server.extend(base); then use append/prepend/replacebase.call(this, apiProduct, options), then add properties| Layer | Location | Role |
|---|---|---|
| Controller | controllers/*.js | Route handling via server module |
| Model | models/**/*.js | Transform API data to view-friendly objects |
| View | templates/default/**/*.isml | ISML templates for HTML rendering |
| Client JS | client/default/js/ | Browser-side behavior (Webpack bundled) |
| SCSS | client/default/scss/ | Styles (compiled to CSS) |
| Approach | When | Trade-off |
|---|---|---|
server.extend(base) + append | Adding data, logging, analytics | Keeps base logic; auto-receives base updates |
server.replace('Route', fn) | Fundamentally different logic | You own the entire implementation; no base updates |
Prefer extend + append in nearly all cases. Only replace when the base logic is wrong for your use case.
SFRA uses Webpack to build client assets from client/default/js/ and client/default/scss/. Output goes to cartridge/static/default/. Client JS can extend base modules:
// Pattern: Extend base client module
var base = require('base/product/detail');
// Fetch live docs for base module API
Site.getCurrent().getCustomPreferenceValue('prefName') -- store-level configurationCustomObjectMgr.getCustomObject('Type', 'key') -- custom data structuresdw.* APIapp_storefront_baseapp_custom_[sitename] or int_custom_[feature]module.superModule to extend -- avoid code duplicationserver.extend() to inherit base routesnext() in middleware chain<isinclude> for reusable componentsResource.msg('key', 'bundle', null)Transaction.wrap() for all database writesCacheMgrFetch the SFRA GitHub repository, developer documentation, and module.superModule guide for exact patterns, API references, and best practices before implementing.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin salesforce-commerceBuilds SFCC B2C Commerce cartridges with directory structure (controllers/, models/, scripts/, templates/, static/), stacking, naming (app_custom_*, plugin_*), path config, and certification requirements. Use for creating or modifying cartridges.
Creates storefront controllers for Salesforce B2C Commerce using SFRA or classic patterns with server.get/post, middleware chains, and res.render/json.
Manages B2C Commerce cartridge code via deploy, download, activate, and watch commands. Useful for pushing code to sandboxes, pulling code, and setting up dev workflows with live reload.