OCAPI for Salesforce B2C Commerce

Learn how to use OCAPI to manage data and processes in Salesforce B2C Commerce. Straight to the point, with real examples.

Jonatan Jumbert
Language
English
Level
advanced
Duration
4 hours

What you will learn

  • OCAPI vs. SCAPI – Key differences and when to use each.
  • Authentication methods – Choose the right one for every scenario.
  • Deep dive into OCAPI – Shop API, Data API, and more.
  • Hooks – Extend and customize OCAPI functionality.
  • Session Bridge – How it works and why it’s crucial.
  • Advanced integration techniques – Connect OCAPI with other APIs.
  • Best practices – Write clean, efficient, and scalable code.
  • Jobs, caching, logging, versioning – Master essential SFCC tools.

Course content

10 sections · 47 lessons

Introduction to OCAPI: Understanding Salesforce Commerce Cloud Integration2 lessons
  • OCAPI
  • SCAPI
OCAPI 101: Basics of Open Commerce API in Salesforce6 lessons
  • What is OCAPI?
  • Client Application Identification
  • OCAPI Settings
  • URL Syntax
  • OCAPI Postman Collection
  • API Explorer
OCAPI 102: Authentication Security8 lessons
  • Introduction
  • Example No Auth Request
  • OCAPI JWT
  • JWT - Guest customer token
  • JWT - Registered customer token
  • Example - Retrieve Basket for Registered customer
  • OAuth2 - Client ID
  • OAuth2 - BM User Grant
Shop API: Storefront interactions with OCAPI11 lessons
  • Introduction
  • Exercise Preview: Headless App OCAPI Integration
  • ShopAPI: Retrieving Categories
  • ShopAPI: Product Search by Category
  • ShopAPI: Get customer JWT (JSON Web Token)
  • ShopAPI: Get Content Asset
  • ShopAPI: Get Cateogory & Get Multiple Products
  • ShopAPI: Search Refinements
  • ShopAPI: Get Product
  • ShopAPI: Create Basket
  • ShopAPI: Add Items to the Basket
Data API: Accessing and Manipulating SFCC Data2 lessons
  • DataAPI: Introduction
  • DataAPI: Retrieve Content Slot Configurations
Meta API: What it is and how to use it2 lessons
  • Meta API Basics
  • Meta API Endpoints in Action
OCAPI Hooks: Extend and Customize API Behavior4 lessons
  • Introduction to OCAPI Hooks
  • Before Hooks: Practical Example
  • After Hooks: Practical Example
  • ModifyResponse Hooks: Practical Example
OCAPI Session Bridge2 lessons
  • Understanding the OCAPI Session Bridge
  • Hands-On: OCAPI Session Bridge with Postman and Headless Store
OCAPI: Advanced Topics7 lessons
  • OCAPI Caching Explained
  • Localized Requests in OCAPI
  • Understanding FLASH Properties in Baskets
  • OCAPI Pagination
  • Global vs System Jobs in OCAPI
  • Setting Up CORS for OCAPI Requests
  • OCAPI Batch Requests Explained
Downloadable Materials3 lessons
  • OCAPI Postman Collection
  • OCAPI Cartridge - Hooks implementation
  • Headless App - NodeJS

Course Description

This course is a complete and practical introduction to working with OCAPI (Open Commerce API) in Salesforce B2C Commerce. You'll start by understanding the differences between OCAPI and SCAPI, then move step-by-step through everything you need to build and integrate a headless storefront using OCAPI.

From setting up API access and authentication, to making requests with the Shop API and managing data with the Data API, you’ll learn how each part fits together. You’ll also explore the Meta API, and get hands-on with OCAPI Hooks and the Session Bridge to customize API behavior and manage user sessions across systems.

In the final sections, we dive into more advanced topics like caching, CORS, job execution (Global and System Jobs), pagination, localization, and FLASH properties that determine when a basket is ready to become an order.

The course balances theory with hands-on practice, and includes all source code so you can follow along and apply what you learn.

This isn’t about memorizing definitions. It’s about building real-world skills and understanding how OCAPI works in practice. If you’ve felt that OCAPI is hard to navigate or poorly documented, this course is your shortcut to clarity and confidence. You are not expected to figure it all out on your own.

FAQ

What are the requirements to take this course?

This is an advanced-level course, so you need prior Salesforce Commerce Cloud (SFCC) knowledge. We won’t cover the basics—jumping straight into OCAPI. Want to follow along with the exercises? You'll need a sandbox to implement everything in real time.

What makes this OCAPI course different from others?

First, good luck finding many alternatives. There aren't many. Second, this course goes where others don’t. We tackle advanced, real-world OCAPI challenges that most avoid.

Is this course hands-on?

80% practice, 20% theory. We cover the essentials, but then we dive straight into real-world exercises—because the best way to learn is by doing. You'll also get exclusive resources: Postman collection to test API calls. Node.js project to keep practicing anytime.

Do I really need to learn OCAPI at this point?

OCAPI isn’t going anywhere. Period. You have two options: 1️⃣ Learn how it works and confidently implement it in your projects. 2️⃣ Tell your boss you have no clue when OCAPI comes up. Your call. SCAPI won’t replace everything. Like SiteGenesis, migrating thousands of projects isn’t feasible—too much time, effort, and money. Plus, some things just aren’t possible with SCAPI. If you’re serious about SFCC development, OCAPI is a must.