Salesforce Commerce Cloud Development Tutorial
Learn Salesforce Commerce Cloud Development step by step: 28 lessons in 10 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
First Steps
- What Is Salesforce B2C Commerce? Learn what Salesforce B2C Commerce (SFCC) is, how SFRA and the headless PWA Kit differ, and how instances, realms, sites and Business Manager fit together.
- Setting Up Your Development Environment Set up a Salesforce Commerce Cloud development environment: on-demand sandbox, VS Code, dw.json, sfcc-ci, uploading cartridges, activating code and the SFRA npm build.
Cartridges and Architecture
- Cartridges and the Cartridge Path Understand SFCC cartridges: folder structure, app_storefront_base, plugin and int_ cartridges, and how the cartridge path decides which file wins, with runnable lookup demos.
- SFRA Architecture and Request Flow See how a Storefront Reference Architecture request flows through controllers, the server module, middleware and templates, and how append, prepend and replace extend routes.
Controllers, Models and Templates
- Controllers, Routes and Middleware Write SFRA controllers: server.get and server.post, middleware like https and CSRF, res.render and res.json, viewData, redirects, route events and URLUtils, with a mini router to try.
- Models, Decorators and Helpers Learn how SFRA shapes platform objects into models: constructors, the decorator pattern, ProductFactory, helpers, and when code belongs in scripts or models. Includes runnable demos.
- ISML Templates Learn ISML, the template language of Salesforce Commerce Cloud: isprint, isif, isloop, isinclude, isdecorate, remote includes, Resource.msg and output encoding against XSS.
- Forms, Validation and CSRF Build forms in SFRA: XML form definitions, server.forms.getForm, field validation and error keys, client versus server checks, and CSRF tokens, with runnable stand-ins.
Platform APIs and Data
- The Script API and Common Classes A tour of the Script API in Salesforce Commerce Cloud: the dw packages, require paths, Logger, Transaction.wrap, collections, Money, quotas and JavaScript limits.
- Catalog, Products and Price Books Understand product types (master, variant, set, bundle), categories, price books, promotions and ProductSearchModel in Salesforce Commerce Cloud.
- Basket, Checkout and Order Flow Follow a purchase through Salesforce Commerce Cloud: BasketMgr, shipments, line items, the calculate hook, SFRA checkout stages, OrderMgr.createOrder and placeOrder.
- Customers, Sessions and Profiles Learn how Salesforce Commerce Cloud models guests and registered customers, session and request scope, profiles, custom attributes, address books, wishlists and privacy.
- Custom Objects and System Object Extensions Learn how Salesforce B2C Commerce stores your own data: custom attributes on system objects, custom object types, CustomObjectMgr, site preferences and metadata XML.
Extending the Platform
- Hooks and Extension Mechanisms Learn how to extend Salesforce B2C Commerce without forking it: hooks.json, HookMgr, calculate and OCAPI/SCAPI hooks, overriding versus extending, and plugin cartridges.
- Service Framework and Third-Party Integrations Call external systems safely from Salesforce B2C Commerce: LocalServiceRegistry, credentials, profiles, timeouts, circuit breakers, mocks and payment or tax integrations.
APIs and Headless
- OCAPI and SCAPI Understand the HTTP APIs of Salesforce B2C Commerce: OCAPI Shop and Data APIs, SCAPI, SLAS tokens, client IDs and permissions, rate limits and a working token-flow model.
- Headless Storefronts with PWA Kit Learn how PWA Kit builds a headless Salesforce B2C Commerce storefront: React, commerce-sdk-react, Managed Runtime, proxies, server-side rendering, caching and when to pick SFRA instead.
Jobs, Content and Operations
- Jobs, Feeds and Import/Export Run batch work on Salesforce B2C Commerce: job steps, custom steptypes.json steps, schedules, catalog, price and inventory imports, XML feeds, error handling and idempotent imports.
- Content Assets and Page Designer Learn how Salesforce B2C Commerce manages storefront content: content assets, content slots, Page Designer components, regions, localization and caching.
Quality
- Caching and Performance Make a Salesforce B2C Commerce storefront fast: page cache, iscache, remote includes, custom caches, CDN, cache keys, personalization and profiling.
- Testing, Debugging and Logging Test Salesforce B2C Commerce code: unit tests with mocha and proxyquire, integration tests, Jest for PWA Kit, custom log categories and the script debugger.
- Security, Sessions and Compliance Secure a Salesforce B2C Commerce storefront: context-aware encoding against XSS, CSRF tokens, secrets, Business Manager roles, PCI scope, sessions and consent.
Projects
- Project: A Plugin Cartridge That Extends Checkout Build a Salesforce B2C Commerce plugin cartridge: extend a Cart route, add a model decorator, an ISML template, a custom hook and a safe save endpoint.
- Project: Product Badges and Delivery Estimates Build product badges and delivery estimates in Salesforce B2C Commerce: custom attributes, model decorators, ISML snippets and the effect on page caching.
- Project: Order Export Job and Integration Build an order export for Salesforce B2C Commerce: a custom job step, an order query, a service call, retries and export statuses, with an idempotent Node stand-in.
Practice and Review
- Practice Exercises with Solutions Six Salesforce Commerce Cloud exercises with hints and self-checking solutions: cartridge path, routes, decorators, hooks, caching keys and idempotent job imports.
- SFCC Interview Questions Prepare for a Salesforce B2C Commerce developer interview: concise answers on cartridges, SFRA, hooks, caching, OCAPI and SCAPI, jobs and performance, with two stand-ins.
- SFCC Cheat Sheet A quick Salesforce B2C Commerce developer reference: cartridge layout, controller pattern, ISML tags, dw classes, hook names, caching rules, logging and CLI commands.