SAP Commerce Development
Overview
SAP Commerce Cloud (formerly Hybris) is an enterprise e-commerce platform built on Java and Spring. This skill provides guidance for extension development, type system modeling, service layer implementation, data management, API customization, and accelerator patterns for both Cloud (CCv2) and On-Premise deployments.
Core Architecture
Type System
Data modeling via
defines item types, attributes, relations, and enumerations. Types are compiled into Java classes during build. See
type-system.md for syntax and patterns.
Extensions
Modular architecture where functionality lives in extensions. Each extension has
for metadata,
for types, and
for beans. See
extension-development.md.
Service Layer
Four-layer architecture: Facade (API for controllers) → Service (business logic) → DAO (data access) → Model (generated from types). See service-layer-architecture.md.
Data Management
ImpEx: Scripting language for data import/export. See impex-guide.md.
FlexibleSearch: SQL-like query language for items. See flexiblesearch-reference.md.
OCC API
RESTful web services exposing commerce functionality. Controllers use
for DTO conversion. See
occ-api-development.md.
Accelerators
Pre-built storefronts: B2C (retail) and B2B (enterprise with approval workflows). See accelerator-customization.md.
CronJobs & Task Engine
Scheduled and asynchronous job execution. Define
implementations, configure via
+
+
in ImpEx. See
cronjob-task-engine.md.
Business Processes
Stateful workflows for order processing, returns, approvals, and custom flows. XML process definitions with action beans (
AbstractSimpleDecisionAction
,
), wait states, and event triggers. See
business-process.md.
Solr Search
Product search and faceted navigation powered by Apache Solr. Configure indexed types, properties, value providers, and boost rules. See solr-search-configuration.md.
Promotions & Rule Engine
Drools-based promotion rules with conditions and actions. Supports order/product/customer promotions, coupons, and custom actions. See promotions-rule-engine.md.
Caching
Multi-layered caching: platform region caches (entity, query, typesystem), Spring
, and cluster-aware invalidation. See
caching-guide.md.
Backoffice
Administration UI customization via cockpitng: widget configuration, custom editors, search/list views, wizards, and deep links. See backoffice-configuration.md.
Common Workflows
Create a Custom Extension
- Generate structure with or use template from
assets/extension-structure/
- Configure with dependencies
- Define types in
- Configure beans in
- Add to
- Build:
Reference:
extension-development.md | Template:
assets/extension-structure/
Define Custom Item Types
- Create or modify in extension
- Define itemtype with attributes, relations
- Build to generate model classes
- Use in services/DAOs
Reference:
type-system.md | Templates:
assets/item-type-definition/
Implement Service Layer
- Create DTO class for data transfer
- Create DAO interface and implementation with FlexibleSearch
- Create Service interface and implementation with business logic
- Create Facade interface and implementation for external API
- Configure beans in
Reference:
service-layer-architecture.md | Templates:
Import Data with ImpEx
- Create file with header and data rows
- Use INSERT_UPDATE for create/modify operations
- Define macros for reusable values
- Import via HAC or
Reference:
impex-guide.md | Templates:
Query with FlexibleSearch
sql
SELECT {pk} FROM {Product} WHERE {code} = ?code
SELECT {p.pk} FROM {Product AS p JOIN Category AS c ON {p.supercategories} = {c.pk}} WHERE {c.code} = ?category
Reference:
flexiblesearch-reference.md | Examples:
assets/flexiblesearch-queries/
Customize OCC API
- Create controller with and
- Create WsDTO for response data
- Create populator for model-to-DTO conversion
- Register in
Reference:
occ-api-development.md | Templates:
assets/occ-customization/
Extend Accelerator Checkout
- Create custom checkout step implementing
- Configure in checkout flow XML
- Create JSP for step UI
- Register beans in
Reference:
accelerator-customization.md | Templates:
assets/checkout-customization/
Create a Scheduled Job (CronJob)
- Implement
AbstractJobPerformable<CronJobModel>
with method
- Register Spring bean with
parent="abstractJobPerformable"
- Create , , and via ImpEx
- Test via HAC > Platform > CronJobs
Reference:
cronjob-task-engine.md | Templates:
Define a Business Process
- Create process definition XML in
- Implement action beans extending
AbstractSimpleDecisionAction
- Register action beans in Spring with
- Register process definition via
ProcessDefinitionResource
Spring bean
- Start process via
BusinessProcessService.createProcess()
and
Reference:
business-process.md | Templates:
Configure Solr Product Search
- Set up with server, languages, currencies, catalog versions
- Define for Product
- Configure entries (searchable, facet, sortable)
- Set up indexer CronJobs (full nightly, incremental every 5 min)
- Test search via HAC > Platform > Solr
Reference:
solr-search-configuration.md | Templates:
assets/solr-configuration/
Set Up Promotions
- Create for your store
- Define with conditions and actions
- Configure coupons ( / ) if needed
- Publish rules to activate them
- Test in Backoffice > Marketing > Promotion Rules
Reference:
promotions-rule-engine.md | Templates:
Quick Reference
| Task | Reference | Assets | Script |
|---|
| Extension setup | extension-development.md | assets/extension-structure/
| scripts/generate-extension.sh
|
| Type definitions | type-system.md | assets/item-type-definition/
| - |
| Service layer | service-layer-architecture.md | | - |
| Data import | impex-guide.md | | scripts/validate-impex.sh
|
| Queries | flexiblesearch-reference.md | assets/flexiblesearch-queries/
| |
| API customization | occ-api-development.md | assets/occ-customization/
| - |
| Checkout/Storefront | accelerator-customization.md | assets/checkout-customization/
| - |
| Spring config | spring-configuration.md | - | - |
| Data patterns | data-modeling-patterns.md | - | - |
| Troubleshooting | troubleshooting-guide.md | - | - |
| CronJobs | cronjob-task-engine.md | | - |
| Business processes | business-process.md | | - |
| Solr search | solr-search-configuration.md | assets/solr-configuration/
| - |
| Promotions | promotions-rule-engine.md | | - |
| Caching | caching-guide.md | - | - |
| Backoffice | backoffice-configuration.md | - | - |
Resources
scripts/
Utility scripts for common tasks:
- - Scaffold new extension structure
- - Validate ImpEx syntax before import
- - Execute FlexibleSearch queries via HAC
references/
Detailed guides for each topic area. Load as needed for in-depth information.
assets/
Production-quality code templates ready to copy and customize. Organized by domain (service-layer, impex-scripts, etc.).