Architecture of hybris-SAP Solution Integration

The hybris-SAP Solution Integration pr
ovides integration between hybris
Commerce Suite and the following SAP
solutions:
SAP ERP
Used as a system of record for master data, product
configuration, and order fulfillment.
SAP Customer Activity Repository (SAP CAR) Optional
Used in the retail industry, it provides the following:
Online point-of-sale (POS) transaction
information in the customers' order history
As of version 5.4: A consolidated omni-channel
order history that includes sales orders from
SAP ERP as well as POS transactions
SAP hybris Marketing (formerly SAP Customer
Engagement Intelligence, or SAP CEI) - Optional
Among the various solutions included in SAP hybris
Marketing, the following can be integrated within the
hybris-SAP Solution Integration:
SAP hybris Marketing Segmentation (formerly
SAP Audience Discovery and Targeting)
As of version 5.4: SAP hybris Marketing
Recommendation (formerly SAP Product
Recommendation Intelligence)
System Landscape and Data Flow
Types of Communication
hybris Commerce Platform
hybris Data Hub
hybris-SAP Solution Integration within hybris
Commerce Suite
Architecture of Asynchronous Order Management
Outbound Data Transfer (from hybris to SAP
ERP)
Inbound Data Transfer (from SAP ERP to
hybris)
Architecture of Synchronous Order Management
Transfer of the Configuration to hybris Data Hub
Configuration of hybris-SAP Solution Integration in hybris
SAP Global Configuration
SAP Base Store Configuration
SAP RFC Destinations Configuration
SAP HTTP Destinations Configuration

About this Document
This document provides an overview of the architecture underlying the hybris-SAP Solution Integration.
Audience: Decision makers, consultants, developers
Validity: 5.6.0 and higher
Based on hybris version: 5.3.0

See Also
Setting up System Connections for hybris-SAP Solution Integration
Defining an SAP Base Store and Global Configuration
Setting RFC Destinations and HTTP Destinations

System Landscape and Data Flow
The graphic below shows an example of a system landscape and data flow typically used in the retail industry.

Types of Communication
Synchronous communication with SAP ERP: Examples: Synchronous order management and synchronous pricing. RFC calls are
used to communicate with the back end.
Asynchronous communication with SAP ERP: Examples: Asynchronous order management and master data replication.
Communication with the back end occurs through hybris Data Hub using HTTP as the communication protocol. Messages transferred
between the SAP back end and hybris Data Hub are of content type IDoc, and messages transferred between the hybris Data Hub and
hybris are of content type ImpEx.
Synchronous communication with SAP CAR or SAP hybris Marketing (SAP hMA): The communication protocol used is HTTP.
Messages transferred between hybris and SAP CAR or SAP hybris Marketing are of content type OData.

hybris Commerce Platform
Receives and sends data asynchronously using hybris Data Hub
Can access SAP ERP or other SAP systems such as SAP CAR or SAP hybris Marketing synchronously
Is integrated with the SAP systems via SAP extensions that are delivered as part of hybris Commerce Platform. The SAP extensions
enable data replication, integration via direct calls, and provide extensions to the hybris data model.

hybris Data Hub
Receives and sends data to SAP ERP or to hybris (data replication in both directions). For example, hybris Data Hub can replicate
product master data from SAP ERP to hybris, or send orders from hybris to SAP ERP.
It can be used to connect hybris to non-SAP systems.
It executes the following major steps:
Data import (raw format)
Composition (canonical format)
Publication (target format)
It also acts as a staging area where external data can be analyzed for errors and corrected before being fed into hybris.

hybris-SAP Solution Integration within hybris Commerce Suite
The hybris-SAP solution integration is delivered as part of hybris Commerce Suite. It does not come as a separate module.
It fully complies with the hybris architecture by using the following:
hybris extension concept
Spring as programming model
hybris Data Hub for asynchronous scenarios
"hybris Management Console (hMC) (versions 5.3 to 5.5.1) or Backoffice Admin Area (as of version 5.6) for configuration tasks
You activate basic scenarios and additional functionality by installing extensions and configuring the functionality in hMC/Backoffice.

Architecture of Asynchronous Order Management

Outbound Data Transfer (from hybris to SAP ERP)
1. The Data Hub adapter transfers data from hybris Commerce Suite to hybris Data Hub.
2. The Data Hub extensions define the raw data formats, the transformation to the canonical data format, and the target system format.
3. The SAP IDoc outbound adapter reads the target system definition, creates IDocs, and sends them via Spring integration to SAP ERP.

Inbound Data Transfer (from SAP ERP to hybris)
1.
2.
3.
4.

The SAP IDoc inbound adapter receives the IDocs and creates Spring integration messages.
The messages are routed to the mapping services provided by the SAP extensions.
The mapping services create raw data fragments and route them to hybris Data Hub.
hybris Data Hub transforms the raw items to canonical items and on to target items, and publishes the target items to hybris Commerce
Suite.
5. With the processing of the ImpEx data, hybris services, interceptors, translators, and events are used.

Architecture of Synchronous Order Management

In keeping with the hybris AddOn extension concept, the hybris-SAP solution integration extends or exchanges existing views, data
transfer objects (DTOs), and facades of the hybris Commerce Accelerator.
The SAP facade layer communicates with the SAP business objects (BO) via SAP services. The BO layer is used for interaction and
presentation. It provides business functionality via well-defined interfaces in a back-end independent manner.
The SAP BO layer communicates with the corresponding SAP back-end (BE) objects through the BE layer. The implementation of the BE
layer is back end-dependent, that is, the integration can handle communication with different back-end systems. Currently, only SAP ERP
is supported as a back-end system.
The SAP BE layer communicates with the SAP back end via RFC by using the Java connector.

Transfer of the Configuration to hybris Data Hub

Synchronous and asynchronous order management scenarios require common configuration data. This configuration data is maintained
in hMC/Backoffice, and is stored in the hybris core database.
When an administrator saves the configuration in hMC/Backoffice, this triggers the Data Hub adapter, which in turn transfers the changed
configuration data to hybris Data Hub. A data feed receives the stream and puts the data into the SAP configuration pool.
The configuration data can be accessed in hybris Data Hub by using Java API or Spring Expression Language (SpEL).

Configuration of hybris-SAP Solution Integration in hybris

The hybris-SAP solution integration provides the following configuration scopes:
SAP global configuration
SAP base store configuration
SAP RFC destinations configuration
SAP HTTP destinations configuration
You perform hybris-SAP configurations either in hybris Management Console (for versions 5.3 to 5.5.1) or Backoffice Admin Area (as of version
5.6).

SAP Global Configuration
The SAP global configuration is related to the tenant. It comprises store-dependent configuration parameters, such as the logical SAP
ERP system used to transfer the IDocs, and replication settings.
There is only one global configuration per tenant.
The global configuration can be accessed in hMC/Backoffice via the SAP Integration node.

SAP Base Store Configuration
The SAP base store configuration is related to the base store. It comprises store-dependent configuration parameters, such as the RFC

destination used and customizing settings for order management.
There can be multiple base store configurations, and each one can be assigned to one or more base stores.
Each base store configuration can be accessed in hMC/Backoffice via the SAP Integration node and has the following structure:
Name of the configuration
Assigned RFC destination
Configuration tabs for different functions (only available if the corresponding extensions are activated)

SAP RFC Destinations Configuration
The configuration data for RFC destinations is provided in the sapcoreconfiguration extension, and either the sapcoreconfigura
tionhmc (versions 5.3 to 5.5.1) or sapcoreconfigurationbackoffice extension (as of version 5.6).
One RFC destination configuration can be used in multiple base store configurations.
The configuration is used to establish the RFC calls using the SAP Java Connector (JCo).

SAP HTTP Destinations Configuration
The configuration data for HTTP destinations is provided in the sapcoreconfiguration extension, and either the sapcoreconfigur
ationhmc (versions 5.3 to 5.5.1) or sapcoreconfigurationbackoffice extension (as of version 5.6).
It can be accessed using the sapCoreHTTPDestinationService service at runtime.