ERPClimb logoERPClimb
Commerce Cloud architecture
SAP Commerce Cloudbeginner 5 min read

Commerce Cloud architecture — SAP Guided Tutorial

Free sample lesson · open to everyone

Key takeaway

How SAP Commerce Cloud is built: a Java/Spring platform of extensions, the type system and service layer, Backoffice, OCC REST APIs, the composable storefront, Solr search and the cloud environments managed through Cloud Portal.

In this lessonShow sections

Visual overview

Commerce Cloud architecture — learning sheetFlow: Storefront: composable → OCC REST APIs → Platform: extensions + services → DB + Solr + integrations. Key ideas: PLATFORM LAYERS; FRONT ENDS AND APIS; SUPPORTING COMPONENTS; CLOUD OPERATIONS. Watch out: Putting business logic in the storefront instead of the platform duplicates rules and bypasses validation for other channels.ERPClimb.com / COMMERCE / LESSON 1/12 / LEARNING SHEETCommerce Cloud architecture1 · HOW IT FLOWS1Storefrontcomposable2OCC REST APIs3Platformextensions + services4DB + Solr +integrations2 · KEY IDEAS EXPLAINEDPlatform LayersPersistence: type system mapped to databasetables.Service layer: Spring services, interceptors,events; models generated from types.Front Ends And APIsOCC (Omni Commerce Connect) REST APIs forproducts, carts, checkout, users.Composable storefront renders pages using OCC andCMS content.Supporting ComponentsSolr for product search and facets.Backoffice for catalog, order and customermanagement.Cloud OperationsCode in a Git repository; builds and deploymentsrun in SAP Commerce Cloud Portal.Environments typically development, staging andproduction.3 · REMEMBER · WATCH OUTRememberSAP Commerce Cloud is a Java/Spring platform organised in extensions;your project adds custom extensions on top of SAP's.The type system (items.xml) defines the data model; the service layerand generated models access it.Backoffice is the business user and admin UI; OCC is the REST APIlayer used by storefronts and integrations.!Watch outPutting business logic in thestorefront instead of the platformduplicates rules and bypassesvalidation for other channels.4 · IN A REAL PROJECTA retailer calculated a delivery surcharge in the storefront code. Orders placed via the mobile app skippedit, losing revenue. Moving the rule into a platform service used by OCC applied it to every channel.Original ERPClimb learning sheet • Verify against your SAP release and edition

The situation: a real project scenario

A retailer calculated a delivery surcharge in the storefront code. Orders placed via the mobile app skipped it, losing revenue. Moving the rule into a platform service used by OCC applied it to every channel.

Explanation

SAP Commerce Cloud is a Java/Spring platform organized into extensions — SAP ships a set of extensions for commerce, and a project adds its own custom extensions on top rather than modifying SAP's code directly. Understanding how a request flows through these layers is the foundation for everything else, because it tells you where new logic should actually live.

At the bottom, the type system (defined in items.xml) describes the data model, and it's mapped to database tables through the persistence/service layer; from these type definitions, Commerce generates Java model classes that the service layer's Spring services, interceptors and events work with. Above that sit facades and DTOs, whose job is to shape that internal data into the form a specific API or storefront needs, rather than exposing the raw service layer directly.

The two main front-end-facing pieces are OCC (Omni Commerce Connect), the REST API layer that exposes products, carts, checkout and users, and the composable storefront (an Angular application, formerly branded Spartacus), which is a separate application that calls OCC to render pages using CMS content. Critically, OCC is meant to be the single contract other channels use too — a mobile app, a marketplace integration, or any other channel should go through the same OCC endpoints and therefore the same business rules, rather than each channel reimplementing logic independently.

Supporting all of this: Solr handles product search and faceted navigation, Backoffice is the business-user and admin interface for managing catalogs, orders and customers, and integration to the ERP (for orders, prices, stock) typically runs through SAP Integration Suite or the platform's own integration APIs.

Operationally, the whole thing lives in a Git repository, and builds and deployments run through SAP Commerce Cloud Portal across environments (typically development, staging, production), with manifest.json declaring which extensions, aspects (api, backoffice, backgroundProcessing, etc.) and properties apply to each one.

The single architectural principle that trips up the most teams: business logic belongs in the platform's service layer, exposed consistently through OCC, not duplicated inside the storefront's own code — because anything implemented only in one storefront silently doesn't apply anywhere else.

Watch out

Common mistakes

Implementing business rules only in the Angular storefront rather than in the platform's service layer: the rule then only applies to that one channel, so a mobile app or any other OCC consumer bypasses it entirely — this is how delivery surcharges, discount eligibility rules, or validation logic quietly stop applying for whole classes of orders.

Modifying SAP's own extensions directly instead of extending them from a custom extension: this makes every platform upgrade a merge conflict and defeats the entire point of the extension architecture. Treating Backoffice as a developer-only tool and not investing in making it usable for the actual business users who need it daily.

Ignoring manifest.json when debugging why an environment behaves differently than expected — a surprising amount of 'why doesn't this work in staging but works locally' comes down to a missing extension or aspect in that environment's manifest.

Do this

Best practices

Put business logic in the platform's service layer and expose it through OCC, so every channel — storefront, mobile, marketplace, partner integration — gets the same rules automatically, with no duplication and no risk of one channel silently diverging from another.

Keep all project-specific code in custom extensions that extend SAP's extensions, never by editing SAP's own code, so upgrades stay a configuration and testing exercise rather than a manual re-merge. Version-control environment configuration (manifest.json, properties per environment) alongside code, so differences between environments are visible in a diff rather than discovered by debugging a production incident.

In the interview

Interview angle

A classic architecture question is 'Where would you implement a new delivery surcharge rule, and why there?' A weak answer says 'in the Angular storefront, since that's where the price is shown.' A strong answer says the rule belongs in a platform service, exposed through a facade/DTO so OCC returns the already-calculated total — because any other channel calling the same OCC endpoint (a native mobile app, a B2B ordering integration) needs the same rule applied, and implementing it only in one storefront's UI code means every other channel silently skips it.

Being able to trace a single request from storefront through OCC, facade, service layer and persistence, and point to exactly where a new rule should sit, is what separates someone who understands the architecture from someone who's only used the storefront.

Practice this lesson

Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.

Quick check

0 of 4 questions attempted

Question 1 of 4

Where should a rule like a delivery surcharge be implemented in SAP Commerce Cloud?

Practise this in an interview

Answer in your own words and get instant feedback, the way an interviewer would judge it.

1Explain the architecture of SAP Commerce Cloud.

2What is the role of facades and DTOs in SAP Commerce?

Was this lesson helpful?

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.