b2c-controllers

Official

Build storefront controllers for SFRA and Classic

AuthorSalesforceCommerceCloud
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill enables developers to implement storefront controllers for Salesforce B2C Commerce using SFRA or Classic patterns, enabling proper request routing, rendering, and API handling.

Core Features & Use Cases

  • Supports both SFRA and Classic controller patterns for storefront endpoints (pages, forms, AJAX).
  • Provides guidance on file placement, controller naming, and middleware usage.
  • Includes examples for rendering templates, returning JSON, and URL generation with URLUtils.
  • Describes extension and override patterns for existing controllers.

Quick Start

  • Create a storefront controller file under cartridge/controllers (for example Home.js) using SFRA or Classic pattern.
  • Expose a route (e.g., Show) and wire in middleware when using SFRA; for Classic, export Show.public = true.
  • Access the endpoint at the standard Controller URL, e.g. /on/demandware.store/Sites-YourSite-Site/en_US/Home-Show

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: b2c-controllers
Download link: https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/archive/main.zip#b2c-controllers

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.