Skip to content
TrustedSkillsbeta
Back to all skills

B2C Controllers

Listed
salesforcecommercecloud·vlatest·backend·Apache-2.0

B2C Controllers manage complex customer journeys across Salesforce Commerce Cloud, streamlining personalization and improving conversion rates for enhanced experiences.

Install on your platform

Showing Claude Code. One command installs this skill into any of the agents below.

  1. 1

    Run this in your project

    terminal
    $ npx skills add salesforcecommercecloud/b2c-developer-tooling --skill b2c-controllers -a claude-code
  2. Uses the open-source skills CLI and needs Node.js. Add -g to install it for your user instead of this project.

What we know about this skill

Publisher

salesforcecommercecloud

Taken from the source listing. We haven't verified who controls this account.

Install target

Live repository

Not pinned. Installing fetches whatever the repository holds at the time you run the command.

Nobody has reviewed this code. TrustedSkills indexes and links skills; it does not audit, run or scan them. A skill runs with whatever access you give your agent — read the source before you install it.

Automated safety checks

scanned

We could not read this skill's source, so none of the checks below were run.

Not scanned. none of the 11 skills in the repository match this slug — it was most likely renamed or removed upstream after the registry indexed it Source recorded as salesforcecommercecloud/b2c-developer-tooling.
This is a static scan, not a review. It reads the skill's files; it does not run them, and it cannot tell you whether the skill is any good or whether the code does what its description says. A skill runs with whatever access you give your agent.
What each check looks for →

About this skill

What it does

This skill enables AI agents to assist in creating storefront controllers for Salesforce B2C Commerce. Controllers are JavaScript modules that handle HTTP requests and render responses, effectively managing customer journeys and personalizing experiences within a Salesforce Commerce Cloud storefront. The skill guides users through the process of building these controllers, which define specific URLs and associated functionality.

When to use it

  • Creating custom endpoints for your B2C Commerce storefront.
  • Developing simple APIs or handling requests in non-SFRA projects.
  • Implementing personalized experiences by controlling how content is delivered based on user interactions.
  • Working with Storefront Reference Architecture (SFRA) sites, which is the recommended approach for most development.

Key capabilities

  • Controller Creation: Guides users through building storefront controllers.
  • Pattern Support: Supports both SFRA (recommended) and Classic controller patterns.
  • File Structure Guidance: Provides information on where to place controller files within a cartridge directory (/cartridge/controllers).
  • Request & Response Handling: Explains how to use the req (request) and res (response) objects for handling HTTP requests, form data, rendering templates, returning JSON, and more.
  • Middleware Integration: Demonstrates how to apply middleware (e.g., caching, consent tracking, CSRF protection) to controller routes.

Example prompts

  • "How do I create a 'Home' controller in SFRA?"
  • "Show me an example of a Classic controller that returns JSON data."
  • "What are the available properties on the req object for handling form submissions?"

Tips & gotchas

  • SFRA Recommendation: For most storefront development, using the SFRA (Storefront Reference Architecture) controller pattern is recommended.
  • Naming Conventions: Controller filenames directly influence the URL prefix (e.g., Home.js creates URLs starting with Home-{function}).
  • File Location: Ensure controllers are placed in the /cartridge/controllers directory within your cartridge.