sfcc-cartridge-development

Build SFRA-based Salesforce Commerce Cloud cartridges with controllers, ISML templates, and hooks.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill sfcc-cartridge-development-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sfcc-cartridge-development
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/platform-salesforce-cc/sfcc-cartridge-development
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill sfcc-cartridge-development-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Customizing a Salesforce Commerce Cloud storefront requires deep knowledge of SFRA cartridge layering, server-side controllers, ISML templates, and the B2C Commerce Script API, and mistakes like missing transactions or broken override chains cause silent failures in production. ## Core Features & Use Cases - Cartridge Scaffolding & Layering: Set up the standard cartridge directory structure and override app_storefront_base using module.superModule and server.extend. - Controllers, Models & ISML: Create route handlers with server.js, data model wrappers, and ISML templates with correct <isprint> encoding and asset registration. - Jobs, Hooks & Forms: Implement scheduled Job Framework steps for inventory sync, OCAPI hooks registered via hooks.json, and XML form definitions with server-side validation. - Use Case: You need to display loyalty points on the cart page without breaking existing extensions. Use this Skill to extend the base Cart controller with server.append, inject view data, and render the result in an ISML template. ## Quick Start Use the sfcc-cartridge-development skill to create a custom cartridge that extends the SFRA Cart controller and adds a loyalty points display to the cart page.

Frequently Asked Questions about sfcc-cartridge-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extend an SFRA controller in Salesforce Commerce Cloud?▼

Extend an SFRA controller by referencing the base controller with `module.superModule`, calling `server.extend(page)`, then adding logic with `server.append` or `server.prepend`. Use `res.getViewData()` and `res.setViewData()` to inject extra data without replacing the original route.

How to create a scheduled job in SFCC?▼

Create a job step script under `cartridge/scripts/jobs/` that exports `module.exports.execute` and returns a `dw/system/Status` object in all code paths. Configure parameters like API URLs through job step parameters in Business Manager rather than hardcoding them.

Why is my SFCC Custom Object not saving?▼

Custom Object writes fail silently when not wrapped in `Transaction.wrap()`, since SFCC requires explicit transactions for all persistent changes. Also verify the Custom Object type is defined in Business Manager under Administration > Site Development > Custom Objects.

Why are my ISML template changes not appearing on the storefront?▼

ISML templates are aggressively cached by SFCC. Clear the template cache in Business Manager under Administration > Sites > Manage Sites > Cache, and confirm your cartridge appears before the base cartridge in the site's cartridge path.

How do I register an OCAPI hook in SFCC?▼

Register an OCAPI hook by creating a `hooks.json` file in the cartridge with a hooks array mapping a hook name like `dw.ocapi.shop.order.afterPOST` to your script path. The hook function must return a `new Status(Status.OK)` object.

When should I use server.append instead of server.replace in SFRA?▼

Use `server.append` whenever extending existing routes, because it preserves the original controller logic and other cartridge extensions in the chain. `server.replace` breaks the override chain and should be avoided for additive customizations.