Sie sind auf Seite 1von 74

3/5/2020

Integrations and Data Management


Generated on: 2020-03-05

SAP Commerce | 1905

PUBLIC

Original content: https://help.sap.com/viewer/50c996852b32456c96d3161a95544cdb/1905/en-US

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product documentation. The information included in custom documentation
may not re ect the arrangement of topics in the SAP Help Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/viewer/disclaimer.

SAP Commerce Billing Integration


SAP Commerce Billing with SAP Commerce enables you to sell subscription and usage-based services through SAP Commerce as an omni-channel solution.

SAP Commerce Billing provides consistent and contextual engagement with customers across every touch-point and channel. It fully integrates in the SAP Commerce Billing solution,
allowing you to make your subscriptions, offers, and pricing available to your customers for ordering across all channels and monetizing through SAP Commerce Billing. It offers your
customers self-services, such as control over their orders and contracts, or the ability to trigger contract change processes that are completely integrated into SAP Commerce Billing.

Scenarios
SAP Commerce Billing Integration supports the following scenarios:

Scenario Available With Supported Features

B2B SAP CRM


Synchronous Order Management

Synchronous Contract Management

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 1/74
3/5/2020

Scenario Available With Supported Features

B2C SAP CRM


Asynchronous Order Management

Synchronous Contract Order Management

The following is an overview of the B2B scenarios covered by SAP Commerce Billing Integration:

The following is an overview of the B2C integration scenarios covered by SAP Commerce Billing integration:

Getting Started with SAP Commerce Billing Integration


The integration of SAP Commerce Billing with SAP Commerce allows customers to leverage the power of SAP Commerce Billing to enhance the capabilities of the industry-leading SAP
Commerce solution and reap the bene ts of both worlds.

Prerequisites
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 2/74
3/5/2020
SAP Commerce integration with SAP Commerce Billing is available as an additional package on SAP Commerce. It is based on a SAP CRM 7.0 EhP4 SP05 or higher, and SAP Commerce
CRM Integration 2.5. Before you install the package, carry out the following checks:

Procedure
1. Check the system requirements for your scenario to ensure that your installation and any added functionality meet the requirements.

2. Check that your SAP CRM System has all the RFC modules and business functions needed to integrate SAP Commerce with SAP Commerce Billing.

 Recommendation
SAP recommends that you install or upgrade to SAP CRM 7.0 EhP4 SP05, or higher. It has all the remote function calls and business functions you need for the integration.

3. Check that the following business functions are activated. If they are not, go to transaction SFW5 and activate them in this sequence:

a. Business function CRM_HYBRIS_ORDER

b. Business function CRM_HYBRIS_PROV_ORDER

Installing the Integration Package


To integrate SAP Commerce with SAP Commerce Billing, you need to download and install the corresponding integration package.

Procedure
1. Perform steps described in the SAP CRM: Installing the Integration Package;

2. Go to SAP Service Marketplace . Search for SAP HYBRIS BILLING COMMERCE INTEGRATION, then choose SAP HYBRIS BILLING COMMERCE INTEGRATION
2.10 Comprised Software Component Versions SAP HYBRIS COMMERCE INTEG 2.10 ). Unzip the les, then copy the content as follows:

Copy the content of folder modules/hbci<${HYBRIS_BIN_DIR}>/modules/hbci to folder .

Copy the content of folder installer/recipes/sap_hbci_b2b_b2c to the directory installer/recipes/sap_hbci_b2b_b2c.

How you proceed from here depends on which version you are working with, and what you want to do. The options are as follows:

Non-Production Purposes to: If installing for non-production purposes (for example, for testing or demonstrations) you can use the installer recipe.

Production Purposes: If installing for production purposes, install only the extensions and AddOns that you need for your scenario; perform steps 1 - 3 as described in the
SAP Commerce topic on 'Installing the Integration Package' (see related links);

3. To set up and initialize, execute recipe sap_hbci_b2b_b2c by executing the following commands in the installer directory:

Go to the installer directory, for example: C:\hybris\installer.

On Linux:

a. install.sh -r sap_hbci_b2b_b2c setup.

b. install.sh -r sap_hbci_b2b_b2c initialize.

On Windows:

a. install.bat -r sap_hbci_b2b_b2c setup.

b. install.bat -r sap_hbci_b2b_b2c initialize.

4. Download the Datahub extensions from SAP Service Marketplace . Search for SAP HYBRIS BILLING COMMERCE INTEGRATION, then choose SAP HYBRIS BILLING
COMMERCE INTEGRATION 2.10 Comprised Software Component Versions HYBRIS BILL INTEG DH 2100 . Save the zip le to a directory of your choice. Extract the zip le.

If you use the embedded Data Hub server, copy the extracted .jar les to this directory:

installer/work/datahub-tomcat/webapps/datahub-webapp/WEB-INF/lib

For standalone Data Hub installation only, copy the extracted .jar les to this directory:

${TOMCAT_HOME}/webapps/datahub-webapp/WEB-INF/lib

5. Set up the system connections you need for your system landscape and scenario as described in SAP CRM: Setting up System connections.

6. Con gure your master data replication as described in SAP CRM: Con guring Master Data Replication.

For B2B, you need to set up data replication for the following objects:

CRM customers

Contact persons

Products

Catalog Prices

For B2C, you need to set up data replication for the following objects:

Replication from SAP CRM to SAP Commerce Billing:

Products

Replication of materials and services, including subscription-based and consumption-related products;

Bundles

Replication of bundle structures (material & service products, incl. sales and dependent components);

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 3/74
3/5/2020
Catalog prices

Replication via SolR job;

Replication from SAP Commerce Billing to SAP CRM:

B2C customers

Consumers are replicated to SAP CRM as B2C customers (business partner with consumer role);

Business agreements

Implicitly created and replicated to SAP CRM.

Next Steps

SAP Commerce Price Master Data

CRM price master data replication is not part of the SAP CRM Integration or the SAP Commerce Billing Integration. In order the use the SAP Commerce Billing Integration speci c price
features in bundle personalization and during checkout, the SAP Commerce Price Master Data (price rows) must contain the SAP Commerce Billing Integration speci c attributes.

hybris/bin/ext-integration/hbci/saphbciordermgmtservices/resources/saphbciordermgmtservices-items.xml

recurringPriceDuration and recurringPriceDurationUnit are mandatory for recurring items, for handling different price dimensions (items with different duration units)
in SAP Commerce, and for replicating the prices to CRM (see also "Con guring Asynchronous Provider Order Management”). The bundleID is used to de ne a speci c price for a
bundle.

SAP Commerce prices can either be:

imported using ImpEx les,

de ned in Backoffice;

Importing Prices Using ImpEx Files

The following is an example of an ImpEx le used to import pricing data from CRM into SAP Commerce:

 Sample Code
INSERT_UPDATE

PriceRow;$catalogVersion;product(code,$catalogVersion)
[unique=true];unit(code[unique=true,default=pieces]);currency(isocode)
[unique=true];price;minqtd;unitFactor;net;recurringPriceDuration;recurringPriceDur

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 4/74
3/5/2020
ationUnit(code);bundleId[unique=true];
;;<Product Identifier>;PCE;USD;94.00;1;1;1;1;MON;;
;;<Product Identifier>;PCE;USD;940.00;1;1;1;1;MON;<Bundle Identifier 1>; # If
there is a specific price for the product if sold as part of Bundle 1
;;<Product Identifier>;;PCE;USD;470.00;1;1;1;1;MON;<Bundle Identifier 2>; # If there is a specific price for the product if sold as part of Bun

So, an ImpEx le for a Product HY_CH_HD which has different prices, depending on what bundle it is sold in (Bundle YHY_TV_BUNDLE_XL, or Bundle HY_TV_BUNDLE_SP) could look
like this:

 Sample Code
INSERT_UPDATE

PriceRow;$catalogVersion;product(code,$catalogVersion)
[unique=true];unit(code[unique=true,default=pieces]);currency(isocode)
[unique=true];price;minqtd;unitFactor;net;recurringPriceDuration;recurringPriceDur
ationUnit(code);bundleId[unique=true]; ;;HY_CH_HD;PCE;USD;94.00;1;1;1;1;MON;;
;;HY_CH_HD;PCE;USD;940.00;1;1;1;1;MON;HY_TV_BUNDLE_XL;
;;HY_CH_HD;PCE;USD;470.00;1;1;1;1;MON;HY_TV_BUNDLE_SP;

Related Information
SAP CRM: Installing the Integration Package
SAP CRM: Setting Up System Connections
SAP CRM: Con guring Master Data Replication
Installing SAP Commerce Manually
Con guring Asynchronous Provider Order Management

Audit Reporting for SAP Commerce Billing Integration


The audit report template includes Order and OrderEntry related elds that are added in SAP Commerce Billing.

recurringNetValue

recurringTaxValue

recurringGrossValue

recurringPriceDuration

recurringPriceDurationCode

recurringPriceDurationUnit

nonRecurringNetValue

nonRecurringTaxValue

nonRecurringGrossValue

SAP Commerce Billing Data Hub Extensions


SAP Data Hub extensions replicate master data and orders between the SAP CRM backend and SAP Commerce Billing Integration asynchronously. Replication happens through the Data
Hub where the inbound and the outbound data is mapped.

saphbcicrmorder Data Hub Extension


The saphbcicrmorder Data Hub extension provides the integration content to connect SAP Commerce (with SAP Commerce Billing integration 2.5) installation to a SAP CRM system
for order ful llment.

The extension does the following:

Builds on (or extends) the functionality provided by sapcrmorder Data Hub extension of the standard SAP Commerce CRM integration (see "sapcrmorder Data Hub Extension"
for details)

Creates IDocs of type to capture Provider Order relevant data and sends them to SAP CRM asynchronously, to replicate SAP Commerce Billing B2C orders to SAP CRM as
provider orders.

 Note
If you want to use asynchronous order management for SAP Commerce Billing Commerce Integration 2.5, this is a mandatory component.

The saphbcicrmorder Data Hub extension acts as a parent extension for the following extensions:

saphbcicrmorder-raw

saphbcicrmorder-canonical

saphbcicrmorder-target

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 5/74
3/5/2020
This split follows the Data Hub archetype structure. The saphbcicrmorder Data Hub extension was split into separate extensions to allow for greater exibility and modularity.

Dependencies
The saphbcicrmorder Data Hub extension depends on the following Data Hub extensions:

sapidocintegration

sapidocoutboundadapter

sapcrmorder

Overview
The following graphic gives an overview of the order-related integration between SAP Commerce and an SAP CRM system via Data Hub.

The orders created in SAP Commerce are sent as CSV les to Data Hub, which stores them as raw items. During composition, the raw items are converted into canonical orders and
subordinate items. During publication, the canonical orders are converted into target items that correspond to IDoc segments. Using the IDoc outbound adapter, the corresponding
target items are assembled in IDocs that are sent as XML over HTTP(S) to the SAP CRM system, which starts order ful llment.

When the system replicates sales orders from SAP Commerce to SAP CRM, SAP CRM provisional orders are created automatically. Once a provider order is submitted a corresponding
provider contract is created and the SAP CRM system sends corresponding con rmations back as IDoc XML documents to Data Hub. Using the IDoc inbound adapter built into the
sapidocintegration extension, the raw items for these noti cations are extracted from the received XML documents. Again, they are converted to canonical noti cation items. The
publication of these items to SAP Commerce creates ImpEx les, imported via standard core functionality (handled by the standard Data Hub extension sapcrmorder).

The saphbcicrmorder Data Hub extension contains the raw, canonical, and target item de nitions, the mapping and custom composition and publication handlers.

Contents of the saphbcicrmorder Data Hub Extension


The saphbcicrmorder Data Hub extension carries out the following tasks: order outbound processing and overriding a few aspects of the existing Inbound processing from the
standard integration. The following graphic shows the items related to order outbound processing, and how they correspond to each other.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 6/74
3/5/2020

The following graphic shows the items related to order inbound processing (reused from sapcrmorder Data Hub extension), and how they correspond to each other.

The mapping xmls de ne the dependencies to the respective sapcrmorder child extensions.

The following is an example:

 Sample Code
<dependencies>
<dependency>
<extension>sapcrmorder-canonical</extension>
</dependency>
</dependencies>

Additions/Enhancements in saphbcicrmorder
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 7/74
3/5/2020
The following is a list of data type additions and enhancements.

Raw Items

RawCrmHybrisOrder

This represents an order coming from the SAP Commerce core system. It contains all subordinate information (order entries, payment, addresses, and so on) as well.

saphbcicrmorder extends the existing raw item type from sapcrmorder by adding the following new attributes:

Name Description

parentEntryNumber Item number for the parent bundle item the item belongs to

scGroup Group name for the item

contractDuration Contract duration value for a rate plan product

contractDurationUnit Measuring unit for the contract duration

contractStart Contract start date

selType Selection Type value to be used while creating the provider order item

Canonical Items
The canonical items in this context are designed to facilitate the mapping between the SAP Commerce domain model and the SAP CRM domain model. The structure of the canonical
items has elements of both models: the overall item structure is close to the SAP Commerce domain model, but the structure of the price information & contract data is optimized for the
SAP CRM conditions.

CanonicalCrmOrder

This represents an order header. In addition to the expected attributes (order ID, currency, and so on) the store name and the channel (B2B or B2C) are also stored. The store name is
used during publication, to infer store speci c con guration properties (transaction type, sales area).

 Note
No changes in this type; The existing implementation from sapcrmorder is reused.

CanonicalCrmOrderItem

This represents one item or entry of an order. Like all subordinate objects of an order, the order ID is part of the (compound) key. The entry number is the same as in SAP Commerce. The
existing type from sapcrmorder has been extended in saphbcicrmorder by adding the following new attributes:

Name Mapping From (Raw Item Type and Field

parentEntryNumber parentEntryNumber (RawCrmHybrisOrder)

scGroup scGroup (RawCrmHybrisOrder)

apptType From AppointmentPublicationHandler

isDuration From AppointmentPublicationHandler

contractDuration contractDuration (RawCrmHybrisOrder)

contractDurationUnit contractDurationUnit (RawCrmHybrisOrder)

contractStart contractStart (RawCrmHybrisOrder)

selType selType (RawCrmHybrisOrder)

CanonicalCrmOrderCreationNoti cation

This represents a noti cation saying that the order has been created successfully in the ful llment system. No further details are provided at header level.

 Note
No changes in this type; The existing implementation from sapcrmorder is reused.

Target System SAP Commerce Core


This target system represents SAP Commerce that sends orders and receives order-related con rmations, SAP Commerce Billing materials, and price information.

saphbcicrmorder uses the existing sapcrmorder extension for handling all the inbound process ows without any additions or modi cations.

Target System SapHbciCrmSystem


This target system represents the SAP CRM system that receives sales orders as well as consumers created in SAP Commerce (see sapcrmcustomer extension).

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 8/74
3/5/2020
CRMXIF_ORDER_SAVE_U07$...

All target items starting with the pre x CRMXIF_ORDER_SAVE_U07$ belong to the same IDoc type CRMXIF_ORDER_SAVE_U07. This IDoc is used to create a provider order on the
SAP CRM side. In the following text, this pre x will be omitted in the section headings. All currency and unit codes are expected to be ISO codes. In addition to the default mapping
provided by the IDoc outbound adapter, only the message type is lled. Message type is expected in Java property.

All target items sharing this pre x have the eld OBJECT_ID in common, which is used to determine the correct IDoc instance for a given target item instance. See exportCode
element:

<exportCode>idockeyfield=OBJECT_ID</exportCode>

EDI_DC40

sapcrmorder.ordermessagetype.

E101CRMXIF_BUSTRANS

This is the IDoc control header. In addition to the default mapping provided by the IDoc. The full name is CRMXIF_ORDER_SAVE_U07$E101CRMXIF_BUSTRANS (root segment for the
provider order). It contains the order ID, object task, process type and object type. All following segments are child segments of this. The pre x (CRMXIF_ORDER_SAVE_U07$)
E101CRMXIF_BUSTRANS) are omitted in the section headings of the child segments.

...$E101CRMXIF_PARTNER_XT

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_PARTNER_XT. It represents the partner header. Since it is a header whose child segment
contains the information regarding different partner roles, it contains only the order Id and the DATAX (whose value is X). Only those segments are taken into account for the inbound
processing for which the DATAX ag is set (for example, E101CRMXIF_SALES_X-DATAX = 'X').

...$E101CRMXIF_PARTNER

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_PARTNER_XT$ E101CRMXIF_PARTNER. Contains all the information for different
partners, that is, the partner functions, partner role codes (sold to party, ship to party, bill to party) etc. It represents the partner de nition for a sales order. Since an order has several
partners with different roles, the partner role ( eld PARTNER_FCT) is de ned as a segment key.

…$E101CRMXIF_PARTNER_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_PARTNER_XT$E101CRMXIF_PARTNER$ E101CRMXIF_PARTNER_F. Child


segment of E101CRMXIF_PARTNER. This segment contains elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’
otherwise their values will not be accepted in SAP CRM.

...$E102CRMXIF_ADDRESS

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_PARTNER_XT$ E101CRMXIF_PARTNER$E102CRMXIF_ADDRESS. Corresponds to


document address of the partner. Because of the 0..1 relation between the partner and document address, no segment key has to be de ned.

...$E104CRMXIF_ADDRESS

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_PARTNER_XT$


E101CRMXIF_PARTNER$E102CRMXIF_ADDRESS$E104CRMXIF_ADDRESS. It corresponds to the additional information for a document address. Because of the 0..1 relation
between document address and document address additional information, no segment key has to be de ned.

...$E102CRMXIF_ADDRESS_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_PARTNER_XT$E101CRMXIF_PARTNER$


E102CRMXIF_ADDRESS$E104CRMXIF_ADDRESS$ E102CRMXIF_ADDRESS_F. It is a child segment of E102CRMXIF_ADDRESS. This segment contains elds with ag values. All
the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP CRM.

In this address replication, we do not replicate the sold to party address, and a check is done to verify that sold to party address elds are not replicated. SAP CRM picks and shows the
address from the master data for sold to party.

...$E101CRMXIF_ORGMAN_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_ORGMAN_X. It represents the segment for sales organization related information. It is
the Header segment for sales organization related information, contains the order ID.

...$E101CRMXIF_ORGMAN

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_ORGMAN_X$E101CRMXIF_ORGMAN. This segment contains all the information related
to the sales area such as sales organization, distribution channel, division and sales organization responsible, and so on.

....$E101CRMXIF_PRICING_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_PRICING_X. It represents the segment for pricing related information (currency only). It
is the header segment for pricing related information and contains the order ID.

....$E101CRMXIF_PRICING

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e6… 9/74
3/5/2020
The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_PRICING_X$ E101CRMXIF_PRICING. This segment is used for passing the currency
information. It contains only one eld in addition to the order ID, that is, CURRENCY.

...$E101CRMXIF_PRICING_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_PRICING_X$ E101CRMXIF_PRICING$ E101CRMXIF_PRICING_F. It is the child
segment of E101CRMXIF_PRICING. This segment contains elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’,
otherwise their values will not be accepted in SAP CRM.

...$E101CRMXIF_SHIPPING_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_SHIPPING_ X. It represents the segment for shipping information. It is the Header
segment for shipping related information, contains the order ID.

...$E101CRMXIF_SHIPPING

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_SHIPPING_ X$ E101CRMXIF_SHIPPING. By shipping condition, here we mean the
delivery mode. This segment is used for passing on delivery mode information.

...$E101CRMXIF_SHIPPING_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_SHIPPING_ X$ E101CRMXIF_SHIPPING$ E101CRMXIF_ SHIPPING_F. This
segment contains elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP
CRM.

...$E101CRMXIF_SALES_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_SALES_X. It represents the segment for sales information at header level and it contains
the order ID.

...$E101CRMXIF_SALES

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_SALES_X$E101CRMXIF_SALES. This segment is used for passing requested delivery
date for the order.

...$E101CRMXIF_SALES_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_SALES_X$E101CRMXIF_SALES$E101CRMXIF_SALES_F. This segment contains


elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP CRM.

...$E101CRMXIF_BILLING_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_BILLING_X. Represents the segment for business agreement related information at
header level and it contains the order ID.

...$E101CRMXIF_BILLING

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_BILLING_X$E101CRMXIF_BILLING. This segment is used for passing the business
agreement ID (if any ID is sent from SAP Commerce, otherwise it is left blank) for the order.

...$ E101CRMXIF_BILLING _F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$E101CRMXIF_BILLING_X$E101CRMXIF_BILLING$E101CRMXIF_BILLING_F. This segment


contains elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP CRM.

..$E101CRMXIF_BUSTRANS_ITEM

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_BUSTRANS_ITEM. It represents a provider order item. Note that both the internal and
external item numbers are set: Both item numbers are set to the SAP Commerce order entry number which starts from 1 (as the SAP CRM order does not support item numbers starting
with 0). Note that since there is a to-n cardinality from the provider order root segment to the provider order item segment, the item number ( eld ITM_NUMBER) is de ned as the
segment key.

 Source Code
<attribute>
<name>ITEM_NUMBER</name>
<localizable>false</localizable>
<collection>false</collection>
<transformationExpression>entryNumber</transformationExpression>
<exportCode>keyfield=true</exportCode> <!-- Key -->
<mandatoryInHeader>true</mandatoryInHeader>
</attribute>

It represents the schedule line for a provider order item. The quantities are set on schedule line level. The same mapping of the order item number is carried out as for the order item.
Only one schedule line is created per provider order item. For the provider order item, the eld ITEM_NUMBER is de ned as a segment key. This needs to be adjusted if several schedule
lines are created per item.

...$E101CRMXIF_PRCD_COND_XT

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 10/74
3/5/2020
The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_PRCD_COND_XT. It represents the pricing condition
segment. It is the header segment for pricing conditions. It contains the order ID and item number.

...$E101CRMXIF_PRCD_COND

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_PRCD_COND_XT$


E101CRMXIF_BT_PRCD_COND. It represents the sales condition for the order. The same mapping of the order item number is carried out as for the order item. The entryNumber
attribute of the canonical item maps to an SAP CRM header condition record. Additionally, speci c to SAP CRM, the attribute condition count is lled only for header conditions, not for
item conditions. The segment key is de ned as COND_TYPE.

...$E101CRMXIF_BT_PRCD_COND_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_PRCD_COND_XT$


E101CRMXIF_BT_PRCD_COND$ E101CRMXIF_BT_PRCD_COND_F. It is a child segment of E101CRMXIF_BT_PRCD_COND. This segment contains the elds with ag values. All
the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP CRM.

...$E101CRMXIF_PRODUCT_I_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_PRODUCT_I_X. It represents the segment for
product related information. It is the header segment for product related information. It contains the order ID and item number.

...$E101CRMXIF_PRODUCT_I

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_PRODUCT_I_X $E101CRMXIF_PRODUCT_I. It


represents the segment contain product information, speci cally the product unit and product unit ISO. Since this segment is at item level, it requires no segment key.

...$E101CRMXIF_SCHEDLIN_I_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_SCHEDLIN_I_X. It corresponds to schedule lines


information at item level. This is the header segment for schedule lines at item level. It contains the order ID and item number.

...$E101CRMXIF_SCHEDLIN_I

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_SCHEDLIN_I_X$E101CRMXIF_SCHEDLIN_I.


It is the main segment containing schedule line information at item level. This segment is used for storing the quantity of a speci c item ordered. No segment key is required, as it is used
only for storing the quantity at item level.

...$E101CRMXIF_SCHEDLIN_I_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $


E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_SCHEDLIN_I_X$E101CRMXIF_SCHEDLIN_I$E101CRMXIF_SCHEDLIN_I_F. It is a child segment of
E101CRMXIF_SCHEDLIN_I. This segment contains the elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise
their values will not be accepted in SAP CRM.

...$E101CRMXIF_SCHEDLIN_ XT

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_SCHEDLIN_XT. It also corresponds to schedule


lines information at item level. This is the header segment for schedule lines at item level. It contains the order ID and item number. This segment is used for storing the schedule line
numbers, as an item with multiple quantities can be assigned multiple schedule lines, each with their respective schedule line numbers.

...$E101CRMXIF_SCHEDLIN

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_SCHEDLIN_XT $E101CRMXIF_SCHEDLIN. It is


the main segment containing schedule line information at item level. As it is used for storing the different schedule lines, the schedule line number is made into the segment key.

...$E101CRMXIF_SCHEDLIN_F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E101CRMXIF_SCHEDLIN_XT


$E101CRMXIF_SCHEDLIN$E101CRMXIF_SCHEDLIN_F. It is a child segment of E101CRMXIF_SCHEDLIN. This segment contains the elds with ag values. All the elds which
are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP CRM.

....$E102CRMXIF_SALES_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E102CRMXIF_SALES_X. It corresponds to the header segment
for sales related information at item level. It contains the order ID and item number.

...$E102CRMXIF_SALES

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $ E101CRMXIF_BUSTRANS_ITEM$E102CRMXIF_SALES_X$E102CRMXIF_SALES. It is the main


segment containing sales information at item level. The only use of this segment is for passing the rejection reason. The rejection reason is determined by a custom Spring expression.

...$E102CRMXIF_ SALES _F

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS $


E101CRMXIF_BUSTRANS_ITEM$E102CRMXIF_SALES_X$E102CRMXIF_SALES$E102CRMXIF_SALES_F. It is the child segment of E102CRMXIF_SALES. This segment
contains the elds with ag values. All the elds which are present in its parent segment should be marked with the ag value ʻX’, otherwise their values will not be accepted in SAP CRM.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 11/74
3/5/2020
…$E101CRMXIF_IST_ITA3_X

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_BUSTRANS_ITEM$ E101CRMXIF_IST_ITA3_X. It corresponds to the header
segment for product group related information at item level. It contains the order ID and item number.

…$E101CRMXIF_IST_ITA3

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_BUSTRANS_ITEM$ E101CRMXIF_IST_ITA3_X$ E101CRMXIF_IST_ITA3. This


is the main segment containing product group information at item level. This segment is used only for passing the group name the item belongs to. The selection type is determined in
SAP Commerce and passed over to this segment.

…$E102CRMXIF_APPOINTMENT_XT

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_BUSTRANS_ITEM$ E102CRMXIF_APPOINTMENT_XT. It represents the


appointments segment. This is the header segment for appointments. It contains the order ID and Item number.

…$E102CRMXIF_APPOINTMENT

The full name is CRMXIF_ORDER_SAVE_U07$ E101CRMXIF_BUSTRANS$ E101CRMXIF_BUSTRANS_ITEM$ E102CRMXIF_APPOINTMENT_XT$


E102CRMXIF_APPOINTMENT. It is the main segment containing contract information at item level. This segment is used only to pass on the contract duration and start date
information for the item. Ther are multiple instances for every item, each with a different appointment type.

Spring Beans Provided

Name Alias Description

appointmentPublicationHandler Publication handler for creating multiple appointment types

sapcrmCompositionHandlerOrderItemNotification Overrides the composition handler to stop the item from having
no decrement process

Composition Handlers
The saphbcicrmorder extension provides the following custom composition handler to process the inbound ow:

HbciCompositionHandlerOrderItemNotification: Composition handler for RawCrmORDERS instances overriding the


DefaultCompositionHandlerOrderItemNotification provided by sapcrmorder.

The process of generating item numbers for B2C scenarios has been modi ed in the current SAP Commerce Billing release. It now always starts from 1 instead of 0 (as was the case in
previous releases). Hence, saphbcicrmorder overrides this composition handler to suppress the decrement of item numbers for the order noti cation received from CRM to SAP
Commerce.

The corresponding overriding Spring bean is HbciCompositionHandlerOrderItemNotification.

Publication Handlers
The saphbcicrmorder extension provides the following custom publication handler to process the outbound ow:

AppointmentPublicationHandler

Helps create multiple E102CRMXIF_APPOINTMENT target segments by adding contract data to multiple segments with different appointment types but with similar set of data;

The corresponding overriding Spring bean is appointmentPublicationHandler.

Custom Spring Expressions for Publication


The saphbcicrmorder-target child extension de nes a dependency to sapcrmorder-target and reuses the existing classes de ned for the custom spring expressions which
are a part of it.

crmAbapDate

This converts a Java date stored as a string into the ABAP date format. The format pattern of the Java date representation can be freely de ned by injecting into the corresponding
Spring bean. By default, the pattern yyyy-MM-dd HH:mm:ss.S is used.

The corresponding Spring bean for the method executor is sapcrmJavaToAbapDateConverter.

sapCrmShippingCondition

This converts the SAP Commerce delivery mode code into the corresponding SAP shipping condition. This is done via the following lookup: Store name of order (expression parameter) --
> Read con guration key from canonical item SAPBaseStoreConfigurationMapping (pool name: expression parameter) --> Read canonical item DeliveryModeMapping via
composite key deliveryMode (expression parameter) + store con guration Key --> Return attribute sapCrmShippingCondition.

The corresponding Spring bean for the method executor is sapCrmShippingConditionLookup.

 Note
No changes in these objects; The existing implementation from sapcrmorder is reused.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 12/74
3/5/2020
Con guration of the saphbcicrmorder Data Hub Extension
No additional con guration settings are required for saphbcicrmorder other than the ones provided by sapcrmorder Data Hub extension. (see con guration section of
sapcrmorder Data Hub extension.)

Feed and Pools


The feeds and pools provided by sapcrmorder Data Hub extension are reused and no new feeds and pools are created. If they do not exist, they are created automatically during server
startup.

See the "Feeds & Pools" section of the sapcrmorder Data Hub extension.

Related Information
sapcrmorder Data Hub Extension
sapcrmcustomer Data Hub Extension

Asynchronous Provider Order Management (B2C)


Overview of Asynchronous Provider Order Management
The following is an overview of the B2C integration scenarios covered by SAP Commerce Billing integration.

The following describes the asynchronous order management process in a B2C scenario:

1. Master data (products, bundles) is replicated from the SAP back end to SAP Commerce.

2. Customers can browse the product catalog or use the product search.

Pricing in product lists (such as the product catalog or the product search result) are list prices. These prices are replicated from CRM via a scheduled CronJob and stored as list
prices in SAP Commerce.

3. Customers choose products and/or personalize their bundle products. Customers add products or bundles to the cart.

4. Customers sign in to the online store. Customers can register themselves.

5. Customers go to the checkout, place the order, and receive an order con rmation. As soon as the order is placed in SAP Commerce, the order is replicated to CRM through the
Data Hub

6. Customers can search for orders created for their company within a speci c time period, and display the order details from the result list.

7. After the provider contract is created (after submitting the provider order in CRM), the SAP Commerce order is updated

8. Follow-up processes, such as delivery, usage and subscription based services, and billing are processed in SAP Commerce Billing in the SAP back end.

For contract-related process steps, see "Overview of Synchronous Provider Contract Management".

For Invoice Management related process steps, see “Invoice Management”.

Related Information

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 13/74
3/5/2020
Overview of Synchronous Provider Contract Management
Features in Invoice Management

Features in Asynchronous Provider Order Management


 Note
Asynchronous provider order management is placed on top of asynchronous order management.

Feature Description

Late logon Customers do not need to log on until place an order / check out the shopping cart.

Products Customers can add simple products to the cart.

Bundles Customers can add bundles to the cart, which they can then personalize.

Bundles can contain multiple products (simple tangible products, one-time services, subscription products);

2-tier hierarchies are supported (main item and sub-components);

A subscription item can be a main bundle item and/or a component;

Bundles can contain optional and alternative products which can be de ned during personalization;

Customers can start personalization from the following locations:

Catalog

Search result

Product detail page

During personalization, the following functions are available:

The full bundle structure with all dependent components is displayed.

The customer can choose between alternative components, select additional options, and change contract start dates and durations.

Bundle-speci c prices are supported.

Personalized bundles can be added to the cart.

Checks on item price validity and stock to determine whether or not a bundle can be added to the cart.

In Catalog and Search, the bundle itself is available, but not the bundle components.

 Note
Nested bundles (bundles within bundles) are not supported.

Pricing
Product list prices are shown in the catalog and the search result list.

Bundle-speci c prices are shown for bundles as part of the personalization and checkout process.

Multiple price dimensions are supported (for example, one time, monthly, yearly).

If multiple dimensions are used in the same bundle, the individual price components are converted into one dimension for the price summary (for example,
monthly).

Adding products to the cart


Customers can browse the product catalog in the online store, and add products to the cart. They can also search for products directly.

Bundles and their sub-items are displayed in the cart, during checkout, and in the order history.

Identical product items in the cart are always merged.

Bundles need to be personalized before they can be added to the cart.

Bundles are not merged.

Changing products in the


Customers can change quantities in the cart and delete items for simple products.
cart
Customers make changes to the personalization of bundles.

Actions in the cart For simple products, customers can change the quantities in the cart. For bundles (and their sub-items), the quantities cannot be changed.

For both bundles and simple products, customers can delete items (but not sub-items).

Customers can navigate to bundles personalization to adapt and update their bundles.

Navigation from and to cart When customers add products to the cart, navigate to the order history and return to the cart later within the same session, the cart is retained.

Payment methods in The only payment method supported is payment by payment card.
checkout
Customers can add a new payment card during checkout, or use an existing one.

For more information, see "Payment Card Integration (B2C)"

Delivery types in checkout All SAP back-end delivery types (called shipping conditions in the back end) are supported.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 14/74
3/5/2020

Feature Description

Alternative shipping
Customers can select an alternative shipping address in checkout.
addresses in checkout
Adding new addresses is supported with SAP CRM integration.

Order submission and


After submission of an order, an order con rmation (order details) is displayed.
con rmation
The order number is the SAP back end order number. It can be used to retrieve the order in the back end.

Order search and order


Customers can search for orders created within a period of time set in Backoffice Administration Cockpit and view the order details.
history in My Account
The result list is sorted by creation date and order number, in descending order. It displays the following information: SAP order number, creation date, order
status.

 Note
In the asynchronous B2C scenario, provider change orders are not shown in the order history.

Changes to the corresponding contract are displayed in the provider contracts.

Self Service in My Account The customer can add a new payment card, or replace an existing one.

Self Service: Invoice History


Invoice history

Customers are provided with a list of invoices (FI-CA).

Different sort criteria are supported (Invoice Number, Invoice Date, Date for Payment, Total Amount, Payment Method).

Invoice display

A selected invoice can be displayed as a PDF document).

 Note
Asynchronous provider order management is placed on top of asynchronous order management (CRM). As a result, all functions that are not supported in asynchronous order
management are also not supported in asynchronous provider order management.

Functions Not Supported with Synchronous Provider Order Management

System Non-Supported Functions

SAP Commerce
Asynchronous provider order management does not support synchronous pricing.

The mini cart total is not displayed next to the shopping cart link.

Related Information
Payment Card Integration (B2C)

Bundle-Speci c Pricing
SAP Commerce pricing has been enhanced to include bundle speci c price de nition and determination for a product.

Bundle speci c price for a product can be maintained either via impex import or by directly creating a price row in Backoffice.

The price of a product in a bundle is determined in the following priority order:

1. Bundle-speci c price for the product;

2. Standalone price for the product;

The following is an example of how bundle prices are determined:

Asynchronous Price Determination: Sample


Data

Product Bundle ID Price

PROD-001 $ 50

PROD-001 BUNDLE-A $ 30

The above-mentioned data displays the following prices:

Prices Displayed for Product Bundles

Views Product: On this Page: The Price Shown is:

PROD-001 Product Search Page $ 50

Product Details Page

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 15/74
3/5/2020

Views Product: On this Page: The Price Shown is:

PROD-001 Personalization screen for BUNDLE-A $ 30

Payment Card Integration B2C


In asynchronous scenarios, order management supports payment by payment cards. During the checkout process, a webshop customer has the option of either adding a new card to be
used for payment, or to use an existing card.

 Note
Payment card integration is supported in B2C scenarios only.

Paying With a New Payment Card During Checkout


The following diagram shows the steps involved in the process, as well as the interaction between SAP Commerce, the PSP, Data Hub and the CRM backend:

Paying With a Saved Card During Checkout


The following diagram shows the steps involved in the process, as well as the interaction between SAP Commerce, the PSP, Data Hub and the CRM backend:

Related Information
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 16/74
3/5/2020
Features in Payment Card Integration
Con guring Payment Card Integration
Structures and Extensions for Payment Card Integration

Con guring Asynchronous Provider Order Management


Several con guration steps are needed to enable asynchronous provider order management. You perform some steps in the SAP backend, and others in the SAP Commerce Backoffice
Administration Cockpit.

Con guring the SAP Commerce Administration Console for


Asynchronous Provider Orders
To set up asynchronous provider order management, make the following setting in the SAP Commerce Administration Console.

1. In the SAP Commerce Administration Console, go to section Con guration Properties.

2. For property site.pci.strategy, choose either HOP or SOP.

3. Save your setting.

Related Information
Con guring Payment Card Integration

Con guring the Backoffice Administration Cockpit for


Asynchronous Provider Orders
To set up asynchronous provider order management, make the following settings in Backoffice Administration Cockpit.

Setting Asynchronous Order Management


1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Synchronous Order Management tab.

3. In section Order Management, set Synchronous Order Management to False.

4. Save your settings.

Setting the Order Type


1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Common Settings tab.

3. In eld Order Type, enter the provider order type used in SAP Commerce Billing.

4. In elds Sales Organization, Distribution Channel, and Division, enter the CRM organizational units to be used to create the provider order.

5. Save your settings.

Setting up Pricing
1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Pricing tab and make the following entries in section SAP Pricing Procedure Con guration:

SAP Pricing Procedure: Enter the CRM Pricing Procedure to be used as part of provider order creation.

Synchronous Pricing for Catalog: Set to False for B2C scenarios.

Product Price: Enter how you want the product price to be displayed (Net value, Gross value).

3. Select the Asynchronous Order Management tab and make the following settings under Pricing Condition Types for Sales Orders:

Item Price: One-time item prices are replicated into the con gured CRM pricing condition type

Shipping Costs: Shipping costs are replicated into the con gured CRM freight condition type.

Condition Types for Recurring Item Prices: Recurring item prices are replicated into the con gured CRM pricing condition type.

4. Save your settings.

Setting Rate Plan and Bundle Identi cation


1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Hybris Billing tab and make the following entry in section Rate Plan Mapping:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 17/74
3/5/2020
Rate Plan Classi cation: Enter the SAP Commerce classi cation that corresponds to the CRM set type Cross Catalog Mapping. This assignment allows you to identify rate
plan products.

3. In section Bundle Mapping tab, make the following entry:

Bundle Categories: Enter one or more CRM product categories that are assigned to products that can be bundles,

4. Save your settings.

Shipping and Payment Cards


1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Common Settings tab and make the following entry in section Shipping:

Shipping Method Mapping: Map the relevant Hybris Shipping Methods to the SAP Shipping Values.

3. Save your settings.

Con guring SAP CRM for Bundles


Make sure that you have carried out the following steps in SAP CRM for the integration of bundles between SAP Commerce Billing and SAP Commerce.

Disabling Package Explosion


In order to avoid duplicate items in SAP Commerce, you need to use a transaction type in SAP CRM, that disables package explosion. To do this, either use a transaction type that does
not explode packages, or copy a suitable transaction type and disable Package Explosion in section Product Determination:

Activating Business Agreements (FI-CA)


Since business agreements are created in the CRM backend, you need to make the following setting in the CRM backend system:

1. In CRM customizing, choose Customer Relationship Management Master Data Business Partner Business Agreement De ne Basic Settings

2. Check that there is a setting FI-CA Active. If there is no such setting, choose New Entries and add a setting with Active Account 2 FI CA-Active in eld Active Account..

3. Save your entry.

Structures and Extensions for Asynchronous Order


Management
HBCI asynchronous order management uses extensions to consume asynchronous order management features in both the standard SAP Commerce B2C accelerator, and as part of
custom developments.

Various dependencies exist between the extensions, as illustrated in the diagram below. The colors used for the various boxes are explained as follows:

Yellow boxes represent extensions that belong to SAP Commerce Billing order management.

Orange boxes represent extensions that belong to SAP order management.

Light blue boxes contain SAP Commerce core extensions.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 18/74
3/5/2020

Related Information
Structures and Extensions for Asynchronous Order Management
saphbciorderexchangebackoffice Extension
saphbciordermgmtservices Extension (Asynchronous)
saphbciordermgmtfacades Extension (Asynchronous)
saphbcibusinessagreementaddon AddOn
saphbcibusinessagreementfacades
saphbcibusinessagreementservices

saphbciorderexchange Extension
The saporderexchange extension provides reusable functionality related outbound sales orders in asynchronous order management. The saphbciorderexchange extension is
an enhancement to sapcrmorderexchange.

HBCIDefaultOrderEntryContributor provides SAP Commerce Billing Integration speci c attributes to the order entry such as the following:

PARENT_ENTRY_NUMBER

CONTRACT_DURATION

CONTRACT_DURATION_UNIT

CONTRACT_START

SC_GROUP

SELTYPE

DefaultSalesConditionsContributor provides SAP Commerce Billing Integration speci c price-relevant data, such as recurring and non-recurring item prices depending on
your Backoffice condition type to duration unit mapping.

saphbciorderexchangebackoffice Extension
The saphbciorderexchangebackoffice extension adds the relevant SAP Commerce Billing Integration order exchange con guration parameters to Backoffice Administration
Cockpit.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 19/74
3/5/2020

saphbciordermgmtservices Extension (Asynchronous)


The saphbciordermgmtservices extension contains services that are used for integrating both synchronous and asynchronous order management for SAP Commerce Billing into
SAP Commerce applications.

Bundle Personalization
Asynchronous provider order management includes the personalization of bundles.

The sequence diagrams in this section and the following sections use the color coding described below:

Sequence Diagram Legend

When a webshop customer clicks on Personalize on a product search page for a bundle or rate plan product, the prepareBundleSelection method of
ProductBundleSelectionPageController.java is invoked. The following diagram describes the interaction between objects that handle the display of a bundle in
asynchronous as well synchronous order management scenarios.

Prepare Bundle Data

For each action performed on the personalization screen (for example, selection or deselection of a bundle item, selecting a contract start date or the contract duration of a rate plan
product), the prepareProductBundleSelection method of class ProductBundleSelectionPageController.java is invoked.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 20/74
3/5/2020
The following diagram describes the interaction between objects that handle the personalization of a bundle in asynchronous as well synchronous order management scenarios.

Personalize Bundle

In the B2C asynchronous order management scenario, the information displayed on the bundle personalization page is rendered by HBCIDefaultPersonalizeBundleService.

This class provides implementation for SAP Commerce Billing Integration product bundles for the asynchronous order management scenario. It manages updates on bundles. The bean
with ID sapHbciDefaultPersonalizeBundleService is de ned in saphbciordermgmtservices-spring.xml.

This bean is used by HBCIDelegateAddBundleToCartService.java (see bean de nition sapHbciDelegatePersonalizeBundleService) to call the
HBCIDefaultPersonalizeBundleService.java implementation.

The personalized bundle information is stored in the user session. This is achieved by storing personalized bundles with the bundle identi er as key in a map with scope SAP Session.

 Note
The personalized bundle information is held in session only during personalization. As soon as the bundle is added to the cart, or if user refreshes the screen, the bundle is reset to its
default values.

Pricing
Asynchronous provider order management includes bundle-speci c price de nition and determination for a product.

Pricing on Product Search Page

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 21/74
3/5/2020
The prices displayed for a product on the product search page (PSP) are rendered by Solr search. The default price to be displayed is determined as per the lter logic implemented in
Europe1PriceFactory:

If there is a standalone (not speci c to a bundle) price maintained for a product, it is displayed on the PSP.

If no price rows exist for the product, then no price is displayed and the product cannot be added to cart due to missing price.

This is checked in the beforeAddToCart hook method. The bean with ID sapHbciAddToCartMethodHook is de ned in saphbciordermgmtservices-spring.xml to add
the bean to the commerceAddToCartMethodHooks list.

This con guration ensures that whenever the addToCart(CommerceCartParameter) method of DefaultCommerceCartService is called, rst the beforeAddToCart
method in HBCIAddToCartMethodHook is executed

The bean with id sapHbciAddToCartMethodHook is de ned in saphbciordermgmtservices-spring.xml to add the bean to the commerceAddToCartMethodHooks
list.

This con guration ensures that whenever addToCart(CommerceCartParameter) method of DefaultCommerceCartService is called, rst the beforeAddToCart
method in HBCIAddToCartMethodHook is executed.

Pricing on Product Details Page


To lter bundle speci c price and display only standalone price, HBCIProductPricePopulator, a subclass of ProductPricePopulator is called instead of the default price
populator from commerce façade layer (ProductPricePopulator itself). In the populate method, a call to HBCIDefaultPriceService is made with ʻnull’ value as bundle
Identi er to return only standalone price in this scenario

Bundle Prices
If a product is added to cart as part of a bundle, the calculation must take into account the bundle-speci c price (if any) maintained for the product.

Inside the setPricingInfoForBundleItem method, a call to the getPriceRowForProduct method of HBCIDefaultPriceService is made using product model and
bundle identi er as parameters. When a matching price has been found for the product, this method returns a PriceRowModel object.

If a bundle identi er is provided as a parameter, the price rows found are ltered for bundle-speci c price.

If no bundle speci c price is found, the standalone or customer-speci c price is returned for the product.

If no matching price row exists, null is returned.

This SAP Commerce Billing Integration speci c logic is implemented in the findBasePrice method of the HBCIFindPricingWithCurrentPriceFactoryStrategy class.

FindPricingWithCurrentPriceFactoryStrategy provides implementation for price, taxes, and discounts resolver strategies to be used by
DefaultCalculationService (the default SAP implementation for cart calculation). SAP Commerce Billing Integration speci c implementation, such as class
HBCIFindPricingWithCurrentPriceFactoryStrategy, extends this default implementation. To ensure that the findBasePrice method of the SAP Commerce Billing
Integration speci c strategy implementation is called by DefaultCalculationService, the bean de nition with alias currentFactoryFindPricingStrategy (de ned in
order-spring.xml in the platform extension) is overwritten in the saphbciordermgmtservices-spring.xml le.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 22/74
3/5/2020

order-spring.xml

saphbciordermgmtservices-spring.xml

Extending the Bundle Price Logic


To implement or extend the price determination logic, create your own implementation of the interface HBCIPriceService and declare it as a spring bean with the name
sapHbciPriceService.

See the bean de nition in the saphbciordermgmtservices-spring.xml le for details:

The bean de nition is added to the saphbciordermgmtservices-spring.xml le:

Cart Management
Adding Bundles
When the Add to Cart button is clicked, the addBundleToCart method of HBCIDefaultAddBundleToCartService.java is invoked. The following diagram describes the
interaction between objects to handle addition of a bundle to cart in in an asynchronous order management scenario.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 23/74
3/5/2020

Adding a Bundle to a Cart (Asynchronous Scenario)

To extend or enhance the add to cart functionality following classes and respective bean de nitions in saphbciordermgmtservices-spring.xml need to be enhanced.

The bean with id sapHbciAddToCartMethodHook is de ned in saphbciordermgmtservices-spring.xml to add the bean to the commerceAddToCartMethodHooks list.

This con guration ensures that whenever addToCart(CommerceCartParameter) method of DefaultCommerceCartService is called, rst the beforeAddToCart
method in HBCIAddToCartMethodHook is executed

Removing Bundles
The following sequence diagram describes the interaction between objects when handling the removal of bundle from a cart.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 24/74
3/5/2020

Removing a Bundle from a Cart (Asynchronous Scenario)

It is possible to remove a bundle from a cart on the checkout page. Removing a bundle from a cart implies removing the parent entry as well as all child entries of the bundle from the
cart.

To extend or enhance the remove from cart functionality, the following classes and respective bean de nitions in saphbciordermgmtservices-spring.xml need to be
enhanced.

This con guration ensures that whenever the updateQuantityForCartEntry(CommerceCartParameter) method of DefaultCommerceCartService.java is called,
the afterUpdateCartEntry method in HBCIUpdateCartEntryHookImpl.java is executed afterwards.

Repersonalizing Bundles
The following sequence diagram describes the interaction between objects for personalization of bundle from cart in both asynchronous (ASOM) and synchronous (SOM) order
management scenarios.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 25/74
3/5/2020

Repersonalizing a Bundle in ASOM and SOM

saphbciordermgmtfacades Extension (Asynchronous)


The saphbciordermgmtfacades extension contains the facades that form the layer closest to the UI. They encapsulate the business logic speci c to the SAP Commerce Billing
integration scenario.

To lter bundle speci c price and display only standalone price, HBCIProductPricePopulator, a subclass of ProductPricePopulator is called instead of the default price
populator from commerce façade layer (ProductPricePopulator itself).

In the populate method, a call to HBCIDefaultPriceService is made with null value as bundle identi er to return only the standalone price in this scenario.

Synchronous Provider Order Management


Synchronous Provider Order Management integrates SAP CRM back end order management with SAP Commerce.

Calls to the cart, the checkout, or the order history are directly routed to the back end. Provider orders are not persisted in SAP Commerce.

Synchronous provider order management allows you to use a commerce solution based on SAP Commerce without having to remodel your SAP Commerce Billing process.

The SAP CRM back end is the leading system in the entire cart and order process. Requests to carts and provider orders are sent synchronously to the back end.

Master data, such as product data and customer data must be replicated to SAP Commerce.

The following diagram provides an overview of the work ow:

Overview of Synchronous Provider Order Management for B2B


Scenarios
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 26/74
3/5/2020
In synchronous provider order management, data and business processes reside in the SAP back end. Customer interaction happens mainly through SAP Commerce. Orders placed in
SAP Commerce are directly created in the SAP back end. They are not persisted in SAP Commerce. Pricing in cart and checkout comes directly from the SAP back end.

B2B scenarios focus on the following:

Running business processes consistently

Safeguarding heavy investments made in SAP Commerce Billing. For example, the implementation of complex pricing, product bundles and change processes.

The following describes the synchronous order management process in B2B scenario:

1. Master data is replicated from the SAP back end to SAP Commerce.

a. Customers log on to the online store. To nd products, they either browse the product catalog or use the product search.

b. Pricing in product lists (such as the product catalog or the product search result) are list prices. These prices are replicated from CRM via a scheduled CronJob and stored
as list prices in SAP Commerce.

 Note
Pricing in the product detail is synchronous. Price components are con gured and calculated in the SAP back end. The latest price components are called directly from
the back end and are displayed in the online store without any replication delay.

2. Customers choose products and/or personalize their bundle products. Customers add products or bundles to the cart. SAP back-end functionality is used for cart and checkout
(for example, the SAP Commerce functionality for pricing and bundles is bypassed completely). As soon as customers add products to the cart, an order is created in the back
end.

 Note
SAP Commerce functions (such as quotations, vouchers and promotions, budget allocation, cost center assignment, and approval work ow) are not available.

3. Customers go to the checkout, place the order, and receive an order con rmation. As soon as the order is placed in SAP Commerce, the back-end order is updated and saved.

4. Customers can search for orders created for their company within a speci c time period, and display the order details from the result list.

5. Follow-up processes, such as delivery, usage and subscription based services, and billing are processed in SAP Commerce Billing in the SAP back end.

6. For contract-related process steps, see "Overview of Synchronous Provider Contract Management".

Related Information
Overview of Synchronous Provider Contract Management

Features in Synchronous Provider Order Management


In synchronous provider order management, SAP Commerce functionality for cart and checkout is replaced completely with SAP CRM back end functionality.

 Note
Synchronous provider order management is placed on top of synchronous order management with SAP CRM reusing multiple features.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 27/74
3/5/2020

Feature Description

Early logon Customers must log on before they can add a product to the shopping cart. If you use out-of-the-box functionality (secureportaladdon extension), they must log on
before they can even enter the online store.

Products Customers can add simple products to the cart.

Pricing Customers are provided with the following pricing information:

In product lists, such as the catalog: Product list prices;

In product detail screens, during personalization, in the cart, or during checkout: Complex, customer-speci c prices;

Bundles Customers can add bundles to the cart, which they can then personalize.

Bundles can contain multiple products.

Bundles can contain optional and alternative products which can be de ned during personalization.

During personalization, the SAP back end calculates product prices in the bundle, including complex pricing logic.

Bundles can contain subitems and dynamically derived items calculated by the SAP backend.

Bundles can contain the following types of product:

simple tangible products

one time services

contract / subscription based products

 Note
Nested bundles (bundles within bundles) are not supported.

Adding products to the cart


Customers can browse the product catalog in the online store, and add products and bundles from the catalog to the cart. They can also search for products
directly.

Bundles and their subitems are displayed in the cart, during checkout, and in the order history.

Identical product items in the cart are always merged.

Bundles are not merged.

As soon as customers add a product to the cart, an order is created in the SAP back end. As soon as they place the order in the online store, the order in the
back end is updated and saved.

Pricing in cart and checkout


The following price information types are displayed separately in the cart: Total price on item level (net value without shipping costs), order subtotal (aggregated
from the item totals), shipping costs, taxes, order total.

Discounts are calculated on item total level but are not shown separately.

The pricing information given in the cart and checkout is determined dynamically based on multiple criteria. It fully renders complex pricing available in the SAP
back end.

Actions in the cart For simple products, customers can change the quantities in the cart. For bundles (and their subitems), the quantities cannot be changed.

For both bundles and simple products, customers can delete items (but not subitems).

Customers can navigate to bundles personalization to adapt and update their bundles.

Navigation from and to cart When customers add products to the cart, navigate to the order history and return to the cart later within the same session, the cart is retained.

Cart handling between For more information, see "Cart Handling in Synchronous Order Management".
sessions and with planned
downtimes

Payment methods in The only payment method supported is payment by invoice.


checkout

Purchase order number (PO Customers may enter a purchase order number.
no.)

Delivery types in checkout All SAP back-end delivery types (called shipping conditions in the back end) are supported.

Alternative shipping
Customers can select an alternative shipping address in checkout. The shipping addresses available in SAP Commerce include the address of the sold-to party
addresses in checkout
in the SAP back end, and the addresses of all ship-to parties belonging to the sold-to party. All addresses belong to one and the same B2B unit in SAP
Commerce and are retrieved from the SAP Commerce address book.

Changing existing addresses and adding new addresses is not supported with SAP integration.

Order submission and


After submission of an order, an order con rmation (order details) is displayed.
con rmation
The order number is the SAP back end order number. It can be used to retrieve the order in the back end.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 28/74
3/5/2020

Feature Description

Order search and order


Customers can search for orders created for their company, within a period of time set in Backoffice Administration Cockpit, and view the order details. The
history in My Account
result list covers all orders created either by themselves or by other company contacts (sold-to party in the SAP back end). The results are independent of the
channel through which the orders were created (back end, call center, online store, or other).

The result list is sorted by creation date and order number, in descending order. Customers can also sort by order number or PO number.

The result list displays the following information: SAP order number, PO number, creation date, order status.

 Note
Synchronous provider order management is placed on top of synchronous order management. As a result, all functions that are not supported in synchronous order management are
also not supported in synchronous provider order management.

Functions Not Supported with Synchronous Provider Order Management

System Non-Supported Functions

SAP Commerce
Vouchers and promotions

Budget allocation, cost center assignment, approval work ow

The mini cart total is not displayed next to the shopping cart link.

SAP CRM
Product hierarchies

Product variants

Con gurable products

Manual product substitution

Sales order split, update, cancellation

Replenishment orders

Payment methods other than invoice

Quotations

Related Information
Setting RFC Destinations and HTTP Destinations

Cart Handling in Synchronous Provider Order Management


Cart handling in synchronous provider order management is identical to that in synchronous order management.

Related Information
Cart Handling in Synchronous Order Management

Con guring Synchronous Provider Order Management


Several con guration steps are needed to enable synchronous provider order management. You perform some steps in the SAP backend, and others in the SAP Commerce Backoffice
Administration Cockpit.

Con guring the Backoffice Administration Cockpit for


Synchronous Provider Orders
To set up synchronous provider order management, make the following settings in Backoffice Administration Cockpit:

1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Common Settings tab.

3. In Order Type eld, enter the order type PRVO.

4. Go to your con guration element, and select the Hybris Billing tab.

In eld Rate Plan Classi cation, enter the SAP Commerce classi cation that corresponds to the CRM set type Cross Catalog Mapping. This assignment allows you
to identify rate plan products.

This works by taking the classi cation classes of the product which is being evaluated, and comparing them to the classi cation class that is con gured in the eld Rate
Plan Classi cation in Backoffice Administration Cockpit. If there is a match, then the product is a rate plan product.

In eld Bundle Categories, enter one or more CRM product categories that are assigned to products that can be bundles.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 29/74
3/5/2020
For Submit Order, choose either true or false:

For provider orders, any orders submitted in the shop UI are automatically released in the back end.

For provider contracts, any change orders created as a result of a change process are automatically released in the back end.

5. Save your entries.

To enter search parameters proceed as follows:

1. Select the Synchronous Order Management tab.

2. Go to the section Search for Orders and enter the followinmg

3. In the eld Max. Number of results, enter the maximum number of provider orders you want to select (0 = unlimited).

4. In the eld Creation Period (Number of Days), enter the time period you want to use to select provider orders. Only provider orders dated up to this number of days into the past
are selected from the CRM backend system.

Sorting the Synchronous Provider Order List


For performance reasons, the synchronous provider orders displayed are not sorted in a prede ned order.

This can lead to the following results:

You will not always see the most recent provider orders at the top of the list.

If, in the Backoffice (Tab Synchronous Order Management, section Search For Orders), you have speci ed a maximum number of results to be displayed, the most recently
created provider orders might be dropped from the results list.

To change the sorting of the provider orders so that the most recent provider orders are displayed at the top of the results list, implement SAP Note 1614769 and apply the solution
proposed for case 2: ʻRecords found when max. hits has been reached'.

 Note
Adding sort criteria can have an effect on the performance of the list display.

Mapping Messages from CRM


When a product is added to the cart, an order is created in the SAP CRM back end. Every time the cart is changed, the changes are sent to SAP CRM, and the order is validated. In these
validations, errors or warnings might occur, which will cause messages to be displayed in the SAP Commerce online store. Some of these error messages are speci c to the back end and
might not make sense for a customer in an online store.

The mapping of messages is de ned in messages.xml that belongs to the saphbcicommon extension. After a back end call, the messages coming from SAP CRM are checked
against the rules de ned in messages.xml to determine if the messages are supposed to be processed before being displayed on the UI. Examples of mapping rule de nitions are
explained in the sections “sapordermgmtbol Extension" and "Mapping Messages from SAP ERP”.

The mapping rules are de ned in XML format and apply to E (Error), W (Warning), I (Information), and S (Success) messages. If a message with severity A (Abort) is raised from the back
end, a runtime exception should be thrown to abort the current process.

You can de ne your own messages.xml in your customer extension and map messages according to your needs. A custom messages.xml can be loaded during runtime by de ning
your own rulesContainerFile in <yourextension>-spring.xml:

 Sample Code
<alias alias="sapCrmOrdermgmtMessageMappingRulesLoader" name="sapHBCIOrdermgmtDefaultMessageMappingRulesLoader" />
<bean id="sapHBCIOrdermgmtDefaultMessageMappingRulesLoader" parent="sapCrmOrdermgmtDefaultMessageMappingRulesLoader"
class="com.sap.hybris.hbci.model.transaction.salesdocument.backend.impl.messagemapping.HBCIMessageMappingCRMRulesLoaderImpl">
<property name="rulesContainerFile" value="saphbcimessagemapping/messages.xml" />
</bean>

De ning the Date and Time Format Used for Parsing

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 30/74
3/5/2020
To make sure that orders and contracts are selected correctly for display (for example in the order history), you need to parse the date and times used in SAP Commerce to those used
by the RFC (Remote Function Call) user in the SAP CRM back end.

Context
To specify the date and time format used in the CRM back end, you need to de ne the property saphbcicommon.search.datetimepattern in the local.properties le in
SAP Commerce:

Procedure
1. To see the date and time format used in the SAP CRM back end, call up transaction SU01, enter the RFC user and switch to the Default tab.

You can see the formats used in elds Date Format and Time Format (12/24h).

2. Open your project.properties le in extension saphbcicommon.

3. Copy the following lines from the le and paste them into the local.properties le.

 Sample Code

# Date/Time pattern used to parse Dates in the result of the order/contract search
#saphbcicommon.search.datetimepattern=dd.MM.yyyy HH:mm:ss

4. Take out the # at the beginning of the second line. If necessary, change the sample date time format dd.MM.yyyy HH:mm:ss to match the format used by the RFC user.

5. Save your changes.

De ning the Time Zone Used for Parsing


To make sure that orders and contracts are selected correctly for display (for example in the order history), you need to parse the date and times used in SAP Commerce to those used in
the CRM backend system. For this you need to check the time zone being used in the SAP CRM back end.

Context
Carry out the following procedure only if one of the following cases apply in the CRM backend system:

The personal time zone de ned for the RFC user is different to the time zone used in SAP Commerce.

In this case, you need to enter the personal time zone in property saphbcicommon.search.timezone in the local.properties le.

(To see the personal time zone, call up transaction SU01, enter the RFC user and switch to the Default tab.)

The RFC user does not have a personal time zone de ned, but the CRM back end system time zone is different to the time zone used in SAP Commerce.

In this case, you need to enter the system time zone in property saphbcicommon.search.timezone in the local.properties le.

(To see the system time zone, call up transaction STZAC.)

To specify that the CRM back end uses a different time zone, you need to de ne the property saphbcicommon.search.timezone in the local.properties le in SAP
Commerce.

Procedure
1. Open your project.properties le in extension saphbcicommon.

2. Copy the following lines from the le and paste them into the local.properties le.

 Sample Code

# Time-zone used to parse Dates in the result of the order/contract search


#saphbcicommon.search.timezone=CET

3. Take out the # at the beginning of the second line. If necessary, change the sample time zone CET to match the time zone used in the CRM back end.

4. Save your changes.

Structures and Extensions for Synchronous Order Management


Synchronous order management (SOM) for SAP Commerce Billing uses extensions to consume SOM features in both the standard Hybris B2B Accelerator, and as part of custom
developments. Various dependencies exist between the extensions.

The diagram below illustrates the extension dependencies. The colors used for the various boxes are explained as follows:

Yellow boxes represent extensions that belong to SAP Commerce Billing synchronous order management

Orange boxes represent extensions that belong to SAP synchronous order management

Green boxes represent functionality belonging to SAP back-end integration.

Light blue boxes contain Hybris core extensions.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 31/74
3/5/2020

How to Deploy
If you run SAP Commerce Billing order management within the Hybris B2B Accelerator, see saphbciordermgmtaddon AddOn.

You can also use parts of this functionality to build a custom online store that accesses SAP Commerce Billing synchronously. In this case, you can activate the extension
saphbciordermgmtservices without the facades and AddOn extension.

Related Information
saphbciordermgmtaddon AddOn
saphbciordermgmtservices Extension

saphbcicommon Extension
The saphbcicommon extension is the base extension for SAP Commerce Billing integration.

It is used by ordermanagement and contractmanagement. It can be reused by applications / synchronous scenarios. It contains, for example, model extensions such as attributes
speci c to SAP Commerce Billing Integration for SapConfiguration or AbstractOrderEntry.

saphbciordermgmtbol Extension
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 32/74
3/5/2020
The saphbciordermgmtbol extension provides the Business Object Layer (BOL) implementation for SAP Commerce Billing. The BOL implementation is required for the sales
process, business and back-end objects, and related interfaces and classes.

The extension consists of entities that represent the bundles, current cart, order, or order history search result in a user session. These objects are called BOL objects. They can be found
in saphbciordermgmtbol-bo-spring.xml. They have user session scope.

In addition, there are so-called back-end objects that establish the connection to the SAP CRM back end (see saphbciordermgmtbol-be-spring.xml). These back-end objects
have session scope as well.

All helper objects, mostly with scope prototype, are registered in saphbciordermgmtbol-spring.xml.

All of these objects can be extended using standard spring techniques:

1. Create a custom extension and create custom beans (most likely by subclassing the standard implementations).

2. Register the custom bean in a spring.xml le

3. Assign your custom bean to the alias registered for the standard implementation.

Activation
To integrate synchronous order management with SAP CRM, activate saphbciordermgmtbol. In this case, the extension needs to be declared in localextensions.xml.

Cart and Checkout Integration


Integration in SAP Commerce Billing uses RFC interfaces. The call order of the API function modules is as follows:

The backend strategies and mapper classes de ned by this extension are as follows:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 33/74
3/5/2020

The business objects de ned by this extension are as follows:

 Sample Code
<alias alias="sapOrdermgmtSalesdocHeader" name="sapHBCIOrdermgmtDefaultSalesdocHeader" />
<bean id="sapHBCIOrdermgmtDefaultSalesdocHeader" scope="prototype" parent="sapOrdermgmtDefaultSalesdocHeader"
class="com.sap.hybris.hbci.saphbciordermgmtbol.transaction.header.businessobject.impl.HBCIHeaderSalesDocument">
</bean>

<alias alias="sapOrdermgmtItem" name="sapHBCIOrdermgmtDefaultItem" />


<bean id="sapHBCIOrdermgmtDefaultItem" scope="prototype" parent="sapOrdermgmtDefaultItem"
class="com.sap.hybris.hbci.saphbciordermgmtbol.transaction.item.businessobject.impl.HBCIItemSalesDoc">
</bean>

Order History
This contains the implementation HBCISearchBackendCRM of the SearchBackend interface
de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.search.backend.interf.

The default implementation executes Remote Function Call (RFC) CRM_HYB_PROV_SEL to get a list of provider orders from the back end.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 34/74
3/5/2020
Method public SearchResultList getSearchResult (final SearchFilter searchFilter) throws a BackendException.

Bundle Integration
This contains the class TransientGetBundleDataProvider.java (which by default handles calls to the back end RFCs) to the function module
CRM_HYB_PROV_ORDER_SC_SIM_MNT. This function modules handles the bundle selection (creation of a new selection; adding/removing items; setting durations and start dates) and
returns a BundleDataModel. BundleDataModel is a data structure which is generated from the saphcimodel-beans.xml of the saphbcicommon extension and contains the
entire structure of the function module.

To alter this behavior following entry points can be used (all classes are de ned as spring beans and can be enhanced)

CrmHybProvOrderScSimMntStrategy.java (and its implementation CrmHybProvOrderScSimMntStrategyImpl.java)

Determines which RFC Interface to call in the back end.

Executes the call.

CrmHybProvOrderScSimMntMapper.java (and its implementation CrmHybProvOrderScSimMntMapperImpl.java)

Method read converts the JCo result into the structure which was de ned in saphbcicommon-beans.xml. This method is usually called after the execution of the RFC
call

Method write converts the above mentioned structure to JCo data before executing the RFC in the back end.

TransientGetBundleDataProvider.java (and its implementation TransientGetBundleDataProviderImpl.java)

Manages the JCo Connection.

Orchestrates the usage of the mapper (to manage the JCo data structures) and the call to the execution of the RFC call in
CrmHybProvOrderScSimMntStrategy.java.

Extension Points
You can use the following extension points to add your own implementation logic to bundle integration:

 Sample Code
<alias alias="sapHbciGetBundleBol" name="sapDefaultHbciGetBundleBol"/>
<bean id="sapDefaultHbciGetBundleBol"
class="com.sap.hybris.hbci.saphbciordermgmtbol.getbundledata.impl.TransientGetBundleDataProviderImpl" scope="sapSession" parent="sapCoreBac
<property name="moduleConfigurationAccess" ref="sapGetBundleDataAccess" />
<property name="defaultConnectionName" value="JCoStatefulServiceUser" />
<property name="bundleDataStrategy" ref="sapGetBundleDataStrategy"/>
<property name="defaultDestinationName" value="#{baseStoreService.getCurrentBaseStore().getSAPConfiguration().getSappricing_RFCDestination(
<property name="genericFactory" ref="sapCoreGenericFactory"/>
</bean>

<alias alias="sapGetBundleDataStrategy" name="defaultSapGetBundleDataStrategy" />


<bean id="defaultSapGetBundleDataStrategy" class="com.sap.hybris.hbci.saphbciordermgmtbol.getbundledata.strategy.impl.CrmHybProvOrderScSimMntSt
<property name="bundleSelMapper" ref="sapHbciGetBundleDataMapper" />
</bean>

<alias alias="sapHbciGetBundleDataMapper" name="defaultSapHbciGetBundleDataMapper" />


<bean id="defaultSapHbciGetBundleDataMapper" class="com.sap.hybris.hbci.saphbciordermgmtbol.getbundledata.mapper.impl.CrmHybProvOrderScSimMntMa
</bean>

saphbciordermgmtservices Extension
The saphbciordermgmtservices extension contains services that are used for integrating synchronous order management for SAP Commerce Billing into SAP Commerce
applications.

It tries to hide the structure of the Business Object Layer (BOL) and back-end access layer (part of extension saphbciordermgmtbol). It provides a simple interface to cart,
checkout, and order handling that is close to standard SAP Commerce terminology and can easily be consumed from standard or custom-built facades. It contains the mapping between
the BOL representation of entities (such as cart or order) and the SAP Commerce representation (such as CartData, OrderData or OrderEntryData).

Cart and Checkout Integration


The following diagram shows the responsibility of classes in sapordermgmtservices.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 35/74
3/5/2020

The cart management sequence is as follows:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 36/74
3/5/2020

Mapping of SAP Provider Order Statuses to SAP Commerce Statuses


The Order History displays the lifecycle status of the provider order from the CRM back end. The following CRM lifecycle statuses are mapped.

CRM Lifecycle Status SearchResult.overallStatus (see OrderHistoryData.condensedStatus (see Resource Key


HBCISearchBackendCRM) HBCIDefaultOrderHistoryPopulatorCRM)

I1002 (Open) SaphbciordermgmtbolConstants.STATUS_ID_OPEN OrderStatus.OPEN (lower case) sap.custom.order.status.open

I1003 (In Process) SaphbciordermgmtbolConstants.STATUS_ID_IN_PROCESS OrderStatus.IN_PROCESS (lower case) sap.custom.order.status.in_process

I1004 (Released) SaphbciordermgmtbolConstants.STATUS_ID_RELEASED OrderStatus.RELEASED (lower case) sap.custom.order.status.released

I1005 (Completed) SaphbciordermgmtbolConstants.STATUS_ID_COMPLETED OrderStatus.COMPLETED (lower case) sap.custom.order.status.completed

The Order Details also displays the lifecycle status of the provider order from the CRM back end. The status is mapped as follows:

CRM Lifecycle Status HBCIHeaderSalesDocument.lifecycleStatus OrderData.condensedStatus (see Resource Key


(see HBCIHeaderMapper) HBCIDefaultOrderPopulatorCRM)

I1002 (Open) LifecycleStatus.OPEN OrderStatus.OPEN (lower case) sap.custom.order.status.open

I1003 (In Process) LifecycleStatus.IN_PROCESS OrderStatus.IN_PROCESS (lower case)


sap.custom.order.status.in_process

I1004 (Released) LifecycleStatus.RELEASED OrderStatus.RELEASED (lower case) sap.custom.order.status.released

I1005(Completed) LifecycleStatus.COMPLETED OrderStatus.COMPLETED (lower case) sap.custom.order.status.completed

Bundle Integration

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 37/74
3/5/2020
The process contains the entry points to the bundle selection process. Every class is de ned as a spring bean and can be enhanced by altering the saphbciordermgmtservices-
spring.xml:

HBCIGetBundleDataService.java (and its implementation HBCIGetBundleDataServiceImpl.java)

This service contains all the functionality needed to select a bundle or a rate plan:

getBundleData is used to start a new selection. It requires only a product ID and returns the initial state of the selection.

addRemoveComponentFromSelection adds or removes an item from the selection. It requires the orderGuid (which is created by the back end during the
getBundleData call) and some other information on the item to be selected (product GUID, instance ID of the item in the current selection, instance ID of its parent
item and (if there is one) the group it belongs to).

To select a date or duration, the addRemoveComponentFromSelection method is also used. The only added information it requires is the desired timeframe.

 Note
Select the item rst, then the speci c time frame.

 Note
During selection the HBCIGetBundleDataService.java accesses some information which is usually maintained in the SAP Commerce Order Management Cockpit or in
the Backoffice Administration Cockpit, such as:

Currency

Language

ERPCutomerID

SAP Transaction Type

Some additional product data (description, graphics, …)

SalesOrg, Division

Distribution channel

SalesOrg Responsible

HBCIAddBundleToCartService.java (and its implementation HBCIAddBundleToCartServiceImpl.java)

This service starts a process to add a bundle to the current cart. It only requires the orderGuid of the selected bundle.

Read the current state of the selection from the backend by using the provided orderGuid.

Determine which items are selected.

Build (SAP Commerce) items based on the selection.

Add the items to the cart using the SAP Commerce CartService.addItemsToCart method.

Release the order in the back end.

The cart sequence is as follows:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 38/74
3/5/2020

Extension Points
You can use the following extension points to add your own implementation logic to bundle integration:

 Sample Code
<alias name="sapDefaultGetBundleDataService" alias="sapHbciGetBundleDataService" />
<bean id="sapDefaultGetBundleDataService"
class="com.sap.hybris.hbci.getbundledataservice.impl.HBCIGetBundleDataServiceImpl">
<property name="genericFactory" ref="sapCoreGenericFactory" />
<property name="providerBeanId" value="sapHbciGetBundleBol" />
<property name="bolCartFacade" ref="sapOrdermgmtBolCartFacade" />
<property name="baseStoreService" ref="baseStoreService" />
<property name="flexibleSearchService" ref="flexibleSearchService" />
<property name="userService" ref="userService" />
<property name="i18nService" ref="i18nService" />
<property name="commonI18NService" ref="commonI18NService" />
<property name="moduleConfigurationAccess" ref="sapHbciOrdermgmtservicesConfigurationAccess" />
</bean>
<alias name="sapDefaultAddBundleToCartService" alias="sapHbciAddBundleToCartService" />
<bean id="sapDefaultAddBundleToCartService"
class="com.sap.hybris.hbci.addtocartservice.impl.HBCIAddBundleToCartServiceImpl">
<property name="bundleDataService" ref="sapHbciGetBundleDataService" />
<property name="cartService" ref="sapOrdermgmtCartService" />
<property name="genericFactory" ref="sapCoreGenericFactory" />
<property name="commerceCartService" ref="commerceCartService" />
<property name="cartRestorationService" ref="sapOrdermgmtCartRestorationService" />
<property name="productConfigurationService" ref="sapOrdermgmtProductConfigurationService" />
<property name="productService" ref="productService" />
<property name="modelService" ref="modelService" />
</bean>

saphbciordermgmtfacades Extension
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 39/74
3/5/2020
The saphbciordermgmtfacades extension contains the facades that form the layer closest to the UI. They encapsulate the business logic speci c to the SAP Commerce Billing
integration scenario.

The interaction with the facades is executed through UI controllers. While the facades are responsible for the orchestration of the services, the conversion between the Business Object
Layer (BOL) and SAP Commerce is in the responsibility of the services.

Cart and Checkout Integration


A cart that has not been submitted should be saved on every user interaction, and be available for the user in a later session. This cannot be done in the SAP CRM back end, since SAP
CRM does not have a persistent cart representation. A facade (with corresponding service) has therefore been created, that takes care of accessing the standard SAP Commerce cart,
copying the current SAP Commerce Billing integration state to it, and restoring the cart from the SAP Commerce database representation on session start. So in parallel to updating the
cart synchronously in SAP CRM, important cart entry attributes such as the entryNumber, product ID, quantity and parentEntryNumber are persisted in the SAP
Commerce persistence.

Bundle Integration
This process is handled by the BundleDetailsFacade.java (and its implementation BundleDetailsImpl.java). Its main purpose is to act as a wrapper to the
saphbciordermgmtservices bundle integration processes. The most important functions in this context are:

getBundleData: Starts a new bundle selection;

selectItem: Selects an item in the current bundle selection;

deselectItem: Deselects an item in the current bundle selection;

selectDateForItem: Selects a date and duration for an already selected item;

addBundleToCart: Ends the bundle selection process and adds the selected bundle to the cart;

removeBundleFromCart: Removes a bundle from the cart; This process is used during the update bundle from cart scenario. On updating the selection, the old bundle will be
removed and the new one added.

In addition to acting as a wrapper, the BundleDetailsFacade.java handles the conversion of the RFC-related bundle data structure to a UI-related structure called BundleData
(which is de ned in the saphbciordermgmtfacades-beans.xml). To achieve this, multiple populators are used:

HBCIBundleDataMessageDataPopulator.java: Prepares error messages to be shown on the UI;

HBCIBundleDataPopulator.java: Main populator; Converts the data retrieved from the backend.

HBCIBundleProductDataPopulator.java: Gathers additional product data from the local SAP Commerce database (description, graphics…);

Extension Points
You can use the following extension points to add your own implementation logic to bundle integration:

 Sample Code
<alias name="sapDefaultHbciBundleDataFacade" alias="sapHbciBundleDataFacade" />
<bean id="sapDefaultHbciBundleDataFacade"
class="com.sap.hybris.hbci.saphbciordermgmtfacades.bundledetails.impl.BundleDetailsFacadeImpl">
<property name="bundleDataService" ref="sapHbciGetBundleDataService" />
<property name="bundleDataPopulator" ref="bundleDataPopulator" />
<property name="bundleProductDataPopulator" ref="bundleProductDataPopulator" />
<property name="bundleMessageDataPopulator" ref="sapHBCIBundleDataMessageDataPopulator" />
<property name="genericFactory" ref="sapCoreGenericFactory" />
<property name="addBundleToCartService" ref="sapHbciAddBundleToCartService" />
<property name="cartFacade" ref="cartFacade" />
<property name="cartRestorationFacade" ref="sapOrdermgmtCartRestorationFacade" />
<property name="cartService" ref="sapOrdermgmtCartService" />
</bean>

<bean id="bundleDataPopulator"
class="com.sap.hybris.hbci.saphbciordermgmtfacades.bundledetails.converters.populator.HBCIBundleDataPopulator">
<property name="priceFactory" ref="priceDataFactory" />
<property name="baseStoreService" ref="baseStoreService" />
</bean>
<bean id="bundleProductDataPopulator"
class="com.sap.hybris.hbci.saphbciordermgmtfacades.bundledetails.converters.populator.HBCIBundleProductDataPopulator">
<property name="productFacade" ref="productFacade" />
</bean>

saphbciordermgmtaddon AddOn
The saphbciordermgmtaddon AddOn is a template which extends a target storefront with order management functionality that is speci c to SAP Commerce Billing integration order
management.

The AddOn depends technically hereby on content which is provided by the ysapordermgmtb2baddon and the b2bacceleratoraddon to the target storefront.

 Note
The AddOn’s user interface does not necessarily enhance the dependent AddOns' user interface, rather it partly replaces them. The saphbciordermgmtaddon AddOn focuses
exclusively on HBCI functionality. Certain features of the dependent AddOns (like, for example, stock availability of hardware products or promotions) are not supported in the cart
and checkout process by the saphbciordermgmtaddon AddOn’s user interface

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 40/74
3/5/2020
If you are installing SAP Commerce Billing for non-production (for example evaluation or demo) purposes, the target storefront is the yacceleratorstorefront for the power tools
store. (See also "Installing the Integration Package").

AddOn De nition

Name saphbciordermgmtaddon

Description This AddOn is a template which extends a target storefront with SAP Commerce Billing order
management speci c functionality.

Directory bin/ext-integration/hbci/saphbciordermgmtaddon

Requires
ysapordermgmtb2baddon

b2bacceleratoraddon

saphbciordermgmtfacades

Adjustments to the Target Storefront


The saphbciordermgmtaddon AddOn makes adjustments to the following aspects in order to create the target storefront:

New UI where you can personalize product bundles and rate plan products.

Changes to the appearance of the following pages (provided by the AddOns ysapordermgmtb2baddon and b2bacceleratoraddon.

Product (search) list in catalog

Product details

Mini cart popup

Cart and checkout

Order con rmation

Order details from order history

Prices are shown as net or gross prices, depending on the con guration of the Base Store.

Product Bundle Personalization


The product bundle personalization page enables the user to personalize product bundles and rate plan products. A bundle has to be personalized before it can be added to the cart. The
personalization page is realized as the JSP page.

Once a product bundle or rate plan product is placed in the cart, it can be personalized (that is, updated) again from within the cart (see Section Cart and Checkout below.)

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 41/74
3/5/2020

Product (Search) List and Grid in Catalog


The product (search) grid in the catalog shows a Personalize button for product bundles and rate plan products. Products which don't require personalization can directly be added to
the cart. The Personalize button is technically realized as a CMS action.

 Note
Products that do not require personalization can be added directly to the cart.

Product Details
Product bundles and rate plan products can also be personalized from the product details page.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 42/74
3/5/2020

Mini Cart Popup


The mini cart shows the main bundle product, but not the dependent products (that is, the products selected during personalization). You can, however, view all selected items (including
dependent products) in the standard cart.

Cart and Checkout


The cart page and checkout process pages are adjusted to exclusively support SAP Commerce Billing products. On the cart page the user can do the following:

Change the quantity of the hardware products;

Change the personalization of bundles and rate plan products;

Remove items;

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 43/74
3/5/2020

Order Con rmation / Order Details from Order History


Similarly to the cart & checkout process, the order con rmation page and the order details page (accessible from the order history) are adjusted to exclusively support SAP Commerce
Billing.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 44/74
3/5/2020

Contents
This section provides references for developers to the most interesting les, le locations and con guration of the saphbciordermgmtaddon.

This AddOn access SAP Commerce Billing integration bundle functionality via the saphbciordermgmtfacades extension by its product bundle selection page controller and product
bundle selection rest controller.

Page controllers from other extensions are not touched. Presenting adjusted pages instead of the original ones in the user’s browser is done by intercepting the HBCI Before View
Handler (see the saphbciordermgmtaddon-web-spring.xml for con guration details).

The AddOn directory is: (<dir>): bin\ext-integration\hbci\saphbciordermgmtaddon.

Content Pages Locations

JSP les

 Sample Code

<dir>\acceleratoraddon\web\webroot\WEB-INF\views\responsive\pages
\account
\cart
\checkout\multi
\error
\layout
\product
<dir>\acceleratoraddon\web\webroot\WEB-INF\views\responsive\fragments
\cart
<dir>\acceleratoraddon\web\webroot\WEB-INF\views\responsive\cms

Tag les:

 Sample Code

<dir>\acceleratoraddon\web\webroot\WEB-INF\tags\responsive
\bundle

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 45/74
3/5/2020
\cart
\checkout\multi
\order
\product

Language-dependent texts

<dir>\acceleratoraddon\web\webroot\WEB-INF\messages

Cascading Style Sheets

<dir>\acceleratoraddon\web\webroot\_ui\responsive\common\css

(in particular saphbciordermgmtaddon.css and hbci-bootstrap.css)

JavaScript les

<dir>\acceleratoraddon\web\webroot\_ui\responsive\common\js

(in particular saphbciordermgmtaddon.js)

Page Controllers

<dir>\acceleratoraddon\web\src

com.sap.hybris.hbci.saphbciordermgmtaddon.controllers.pages.ProductBundleSelectionPageController

com.sap.hybris.hbci.saphbciordermgmtaddon.controllers.pages.ProductBundleSelectionRestController

Interceptor

<dir>\src

com.sap.hybris.hbci.saphbciaddon.interceptor.HBCIBeforeViewHandler

Con guration

CMS action for the Personalize button (DefineProductBundleAction), action renderer, page controllers, before view handler and view map.

<dir>\resources\saphbciordermgmtaddon-item.xml

<dir>\resources\saphbciordermgmtaddon\web\spring\saphbcicontractmgmtaddon-web-spring.xml

ImpEx Files

The following ImpEx le contains the assignments of the CMS Action for Personalize button (DefineProductBundleAction) to the corresponding components to be displayed on
content pages. This ImpEx le also provides a new page template (ProductBundleSelectionPageTemplate) that sets the full width of the page.

<dir>\resources\saphbciordermgmtaddon\import\contentCatalogs\powertoolsContentCatalog

cms-content.impex

ImpEx Import Classes & Con guration

 Sample Code

<dir>\src
com.sap.hybris.hbci.saphbciaddon.initialdata.setup.InitialDataSystemSetup
com.sap.hybris.hbci.saphbciaddon.services.dataimport.impl.HbciAddOnSampleDataImportService
<dir>\resources\saphbcicontractmgmtaddon-spring.xml

Customizing by Modi cation


The saphbciordermgmtaddon AddOn contains several les which are intended to replace the corresponding les in the target storefront to round up the storefront appearance. If
the installation recipe for non-production purposes was used for an out-of-the-box installation, then the following les are replaced by copying in the yacceleratorstorefront.

<from> \bin\ext-
integration\hbci\saphbciordermgmtaddon\acceleratoraddon\web\webroot

<to> \bin\ext-template\yacceleratorstorefront\web\webroot

CMS JSP les

<from> & <to>\WEB-INF\views\responsive\cms\addtocartaction.jsp

<from> & <to> \WEB-INF\views\responsive\cms\listaddtocartaction.jsp

Tag les

<from>& <to> \WEB-INF\tags\responsive\product\productListerItemPrice.tag

<from> & <to> WEB-INF\tags\desktop\product\productPricePanel.tag

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 46/74
3/5/2020
<from>\WEB-INF\tags\responsive\product\productAddToCartPanel.tag

<to>\WEB-INF\tags\addons\b2bacceleratoraddon\responsive\product \productAddToCartPanel.tag

JavaScript les

<from> & <to> \_ui\responsive\common\js\acc.autocomplete.js

<from>\_ui\responsive\common\js\cms\defineproductbundleaction.js

<to>\_ui\responsive\common\js\cms\

This le is a saphbciordermgmtaddon speci c dummy le to prevent "JavaScript le not found" error in the browser.

Further Con guration

For a contract start the requested contract start date is sent by the user’s browser to the product bundle selection page controller. The expected (by the controller) string format of this
receiving date is de ned in the following con guration le:

<dir>\project.properties

The default date format is as follows:

saphbciordermgmtaddon.form.input.date.dateformat=dd.MM.yyyy

In addition, saphbciordermgmtaddon requires the following JavaScript les to be present on storefront to avoid error messages:

jquery-ui.min.js

bootstrap.min.js

jquery.blockUI.min.js

Installing the Addon


If you are installing SAP Commerce Billing for non-production (for example evaluation or demo) purposes, the target storefront is the yacceleratorstorefront for the power tools
store (See also "Installing the Integration Package" ).

 Sample Code
<mystorefrontextensionname>.additionalWebSpringConfigs.myaddon=classpath:/myaddon/web/spring/myaddon-web-spring.xml

Manual Installation
To manually install the saphbciordermgmtaddon AddOn (as opposed to out-of-the-box installation), carry out the following steps:

1. Ensure that AddOn saphbciordermgmtaddon along with its required extensions is added to your localextensions.xml le.

2. Install the AddOn to your storefront:

ant addoninstall -Daddonnames="saphbciordermgmtaddon" -DaddonStorefront.<your storefront>="<your storefront>"

3. Run ant clean all.

4. Start the SAP Commerce server and perform a platform update with the following options selected:

Update running system

Localize types

Project data settings:

saphbciordermgmtaddon

Import & Synchronize Content Catalog = yes

Modi cations Checklist


The modi cations that this add-on makes to the accelerator are as follows:

ImpEx Con guration Scripts

Core Data Listeners

Model Layer

Model Interceptors

Cockpit Con guration

Cockpit Beans

Validation Rules

Service Layer

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 47/74
3/5/2020
Facade DTO

Facade Layer

CMS Components

Page Templates

JavaScript

CSS

Page Controllers

Tags

TLD

Filters

MVC Interceptors

Spring Security

Message Resources

Contents
This section provides references for developers to the most interesting les, le locations and con gurations of the saphbciordermgmtaddon AddOn.

This AddOn accesses SAP Commerce Billing “bundle” functionality via the saphbciordermgmtfacades extension by its product bundle selection page controller and product
bundle selection rest controller.

Page controllers from other extensions are not touched. Presenting adjusted pages instead of the original ones in the user’s browser is done by intercepting the HBCI Before View
Handler (see the saphbciordermgmtaddon-web-spring.xml for con guration details).

The AddOn directory is: (<dir>): bin\ext-integration\hbci\saphbciordermgmtaddon.

JSP les:

<dir>\acceleratoraddon\web\webroot\WEB-INF\views\desktop\pages

<dir>\acceleratoraddon\web\webroot\WEB-INF\views\desktop\fragments

dir>\acceleratoraddon\web\webroot\WEB-INF\views\desktop\cms

(and the corresponding subfolders)

Tag les:

<dir>\acceleratoraddon\web\webroot\WEB-INF\tags\desktop

(and the corresponding subfolders)

Language-dependent texts:

<dir>\acceleratoraddon\web\webroot\WEB-INF\messages

Cascading Style Sheets:

<dir>\acceleratoraddon\web\webroot\_ui\desktop\common\css

(in particular saphbciordermgmtaddon.css and hbci-bootstrap.css)

JavaScript les:

<dir>\acceleratoraddon\web\webroot\_ui\desktop\common\js

in particular saphbciordermgmtaddon.js)

Page Controllers
<dir>\acceleratoraddon\web\src

com.sap.hybris.hbci.saphbciordermgmtaddon.controllers.pages.ProductBundleSelectionPageController

com.sap.hybris.hbci.saphbciordermgmtaddon.controllers.pages.ProductBundleSelectionRestController

Interceptor
<dir>\src

com.sap.hybris.hbci.saphbciordermgmtaddon.interceptor.HBCIBeforeViewHandler

Con guration
CMS action for Personalize button (DefineProductBundleAction), action renderer, page controllers, before view handler and view map.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 48/74
3/5/2020
<dir>\resources\saphbciordermgmtaddon-item.xml

<dir>\resources\saphbciordermgmtaddon\web\spring\saphbcicontractmgmtaddon-web-spring.xml

Customizing through (Direct) Modi cation


The AddOn saphbciordermgmtaddon contains several les which are intended to replace corresponding les in the target storefront to round up the store front appearance.

If the installation recipe for non-production purposes was used for an out-of-the-box installation, then the following les are replaced by copying in the yacceleratorstorefront:

<from> \bin\ext-
integration\hbci\saphbciordermgmtaddon\acceleratoraddon\web\webroot

<to> \bin\ext-template\yacceleratorstorefront\web\webroot

CMS JSP les

<from> & <to> \WEB-INF\views\desktop\cms\addtocartaction.jsp

<from> & <to> \WEB-INF\views\desktop\cms\listaddtocartaction.jsp

<from> & <to> \WEB-INF\views\desktop\cms\minicartcomponent.jsp

Tag les

<from>& <to> \WEB-INF\tags\desktop\product\productListerItemPrice.tag

<from>& <to> \WEB-INF\tags\desktop\product\productListerItemPrice.tag

<from> & <to> WEB-INF\tags\desktop\product\productPricePanel.tag

<from>\WEB-INF\tags\desktop\product\productAddToCartPanel.tag

<to>\WEB-INF\tags\addons\b2bacceleratoraddon\desktop\product \productAddToCartPanel.tag

JavaScript les

<from> & <to> \_ui\desktop\common\js\acc.autocomplete.js

from>\_ui\desktop\common\js\cms\defineproductbundleaction.js

<to>\_ui\desktop\common\js\cms\

This le is a saphbciordermgmtaddon speci c dummy le to prevent a JavaScript le not found error in the browser.

Related Information
Installing the Integration Package

Synchronous Provider Contract Management


Customers can search for contracts created for their company and view the contract items.

Contract Management is a synchronous process.

Customers can carry out the following actions as part of contract management:

Navigate into contract details;

Choose between different change processes such as termination or extension;

Maintain the change process parameters;

Directly con rm the change process without adding the change order to the cart;

Overview of Synchronous Provider Contract Management


The integration of provider contracts in SAP Commerce begins with the search for contract items. The result list contains all items which represent the last time-slice of a contract. The
user can select one of the items in the result list to display the contract details.

Each line item represents a speci c time period of a contract. The current contract is always represented by the most recently de ned time period.

The integration of provider contracts in SAP Commerce begins with the search for the contract item that corresponds to the most recent time period.

In SAP Commerce, a user can select a contract and display the contract details.

If a contract is still active in the back end, a user can choose to terminate it or extend it by triggering the corresponding change process from the Contract Detail page:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 49/74
3/5/2020
A termination displays a new screen on which the user can enter a Requested End Date. After the user con rms the change request, a contract change order is created and saved
in the back end. In SAP Commerce, the change order can be found and displayed from the Order History. In the Order Details view a change order is marked with the text
CHANGE ORDER.

If the change order is automatically released, a new contract item is created. The new contract item can now be displayed in SAP Commerce.

An extension displays a new screen on which the user can enter an Extension Period. After the user con rms the change request, a contract change order is created and saved in
the back end. In SAP Commerce, the change order can be found and displayed from the Order History. In the Order Details view a change order is marked with the text CHANGE
ORDER.

If the change order is automatically released, a new contract item is created. The new contract item can now be displayed in SAP Commerce.

Provider Order Change Process

Features in Synchronous Provider Contract Management


Synchronous provider contract management integrates SAP CRM back-end provider contracts management withSAP Commerce.

The following table provides the features in synchronous provider contract management

Feature List

Feature Description

Searching contracts Customers can search for contracts created for their company (within a time period de ned in
Backoffice Administration Cockpit), and view the contract items.

Displaying contracts Customers can navigate into Contract Details.

Executing a change process Customers can start change processes from Contract Details. They can choose between
processes such as contract extension or contract termination.

Change process: Termination Customers can start this process by choosing Terminate in Contract Details. They can enter a
requested contract end date. Con rm sends the change order to the back end, where the contract
change is processed.

Change process: Extension Customers can start this process by choosing Extend in Contract Details. They can choose a
contract extension period. Con rm sends the change order to the back end, where the contract
change is processed.

Displaying Change Orders Customers can see their change orders in Order History.

Con guring Synchronous Provider Contract Management


Several con guration steps are needed to enable synchronous contract management. You perform some steps in the SAP backend, and others in the SAP Commerce Backoffice
Administration Cockpit.

Con guring the Backoffice Administration Cockpit for Provider


Contract Management
To set up synchronous contract management, make the following settings in Backoffice Administration Cockpit:

1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element, and select the Hybris Billing tab.

a. In the eld Contract Transaction Type, set the required contract transaction type.

b. In the eld MAX ContractHits, enter the maximum number of provider contracts you want to select (0 = unlimited).

c. In the eld Contract date Range(number of days), enter the time period you want to use to select invoices. Only provider contracts dated up to this number of days into
the past are selected from the CRM backend system.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 50/74
3/5/2020
3. Save your entries.

Sorting the Provider Contract List


For performance reasons, the provider contracts displayed are not sorted in a prede ned order.

This can lead to the following results:

You will not always see the most recent provider contracts at the top of the list.

If, in the Backoffice (Tab Hybris Billing, section Process Control), you have speci ed a maximum number of results to be displayed, the most recently created provider contracts
might be dropped from the results list.

To change the sorting of the provider contracts so that the most recent provider contracts are displayed at the top of the results list, implement SAP Note 1614769 and apply the
solution proposed for case 2: ʻRecords found when max. hits has been reached'.

 Note
Adding sort criteria can have an effect on the performance of the list display.

De ning the Time Zone Used for Terminating Contracts


Sample coding is available for terminating contracts. If you use it, you need to check the time zones of the systems involved.

Context
Carry out the following steps only if:

You want to use the sample coding provided for terminating contracts.

The time zone of the date type CANCREQUEST in SAP CRM is different to the time zone used in SAP Commerce.

Procedure
1. Open your project.properties le in extension saphbcicontractmgmtservices.

2. Copy the following lines from the le and paste them into the local.properties le.

 Sample Code

# Time-zone used to format the Requested Contract End Date from the Termination Contract change process UI
# before it is sent to the CRM back-end.
# This time-zone has to match the time-zone, which is configured in CRM for the CANCREQUEST (Cancellation Request)
# date type.
# If this property is not given, the time-zone from the hybris I18N Service is used
#saphbcicontractmgmtservices.changeproc.cancel.datetype.cancrequest.timezone=CET

3. Take out the # at the beginning of the last line (#saphbcicontractmgmtservices.changeproc.cancel.datetype.cancrequest.timezone=CET).

4. Change the sample time zone CET to match the time zone used in the date type CANCREQUEST in SAP CRM.

5. Save your changes.

Structures and Extensions for Synchronous Contract


Management
Synchronous contract management and change processes in SAP Commerce Billing Integration use extensions to consume contract management features in both the standard SAP
Commerce B2B accelerator, and as part of custom development.

Dependencies between the extensions are illustrated in the diagram following. The colors used for the various boxes have the following meaning:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 51/74
3/5/2020
Yellow boxes represent extensions that belong to HBCI synchronous contract management and change processes

Orange boxes represent extensions that belong to SAP synchronous contract management

Green boxes represent functionality belonging to SAP back-end integration.

Light blue boxes contain SAP Commerce core extensions.

saphbcicontractmgmtbol Extension
The saphbcicontractmgmtbol extension contains HBCI-speci c implementation for synchronous contract management. It provides implementation for functions such as contract
search, reading contract details, and executing contract change processes.

This implementation forwards the calls from the HBCI-speci c service layer to back end objects, which execute Remote Function Modules (RFCs) to retrieve provider contracts from the
SAP back-end (CRM) system and to change provider contracts in the SAP back-end (CRM) system.

Activation
Activate the saphbcicontractmgmtbol extension to integrate the synchronous management of provider contracts with SAP CRM. For this integration scenario, the extension needs
to be declared in localextensions.xml.

Contract History
This contains the implementation SearchBackendImpl of the SearchBackend interface
com.sap.hybris.hbci.saphbcicontractmgmtbol.transaction.contract.search.backend.

The default implementation executes Remote Function Call (RFC) CRM_HYB_PROV_SEL to get a list of provider contracts from the back end.

Method public SearchResultList getSearchResult (final SearchFilter searchFilter) throws a BackendException.

Contract Details
This contains the implementation ContractBackendImpl of the ContractBackend abstract class
com.sap.hybris.hbci.saphbcicontractmgmtbol.transaction.contract.backend.

The default implementation executes Remote Function Call (RFC) CRM_HYB_PROV_ORDER_GET to get a list of provider contracts from the back end.

Method public void readItemFromBackend(final ContractItem contractItem) throws a BackendException.

Contract Change Processes


This contains implementation CrmHybProvContChangeStrategyImp of the CrmHybProvContChangeStrategy interface
com.sap.hybris.hbci.saphbcicontractmgmtbol.contractchange.strategy.

The default implementation executes Remote Function Call (RFC) CRM_HYB_PROV_CONT_CHANGE to execute a change process on a provider contract in the back end.

Method public void execute(TransientContractChangeProvider provider, JCoConnection conn) throws a BackendException.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 52/74
3/5/2020

saphbcicontractmgmtservices Extension
Extension saphbcicontractmgmtservices includes service interfaces for provider contracts, which are used to delegate the calls from the facade layer to the Business Object
Layer (BOL).

Activation
Activate the saphbcicontractmgmtservices extension to integrate synchronous management of provider contracts with SAP CRM. In this case, the extension needs to be
declared in localextensions.xml.

Technical / Implementation Information


The extension contains implementation ContractServiceImpl of the ContractService interface "com.sap.hybris.hbci.saphbcicontractmgmtservices.contract".

public List<SearchResult> performSearch(SearchFilter searchFilter, PageableData pageableData);

public ContractItem getDetail(String itemGuid, String headerGuid);

public ContractChangeModel executeExtension(String mainItemGuid, String headerGuid, BigDecimal contractExtensionDuration,


String extensionDurationUnit, boolean simulate);

public ContractChangeModel executeCancellation(String mainItemGuid, String headerGuid, Date requestedContractEndDate,


boolean simulate);

saphbcicontractmgmtfacades Extension
Extension saphbcicontractmgmtfacades contains SAP Commerce integration speci c façade interfaces for synchronous contract management. Their implementations include
logic to populate the contract DTO from data of the contract business object and other SAP Commerce objects.

Activation
Activate saphbcicontractmgmtfacades extension to integrate synchronous management of provider contracts with SAP CRM. In this case, the extension needs to be declared in
localextensions.xml.

Technical / Implementation Information


The extension contains implementation ContractFacadeImpl of ContractFacade interface com.sap.hybris.hbci.saphbcicontractmgmtfacades.contract and
the following default populators:

DefaultContractHistoryPopulator populates the ContractHistoryData DTO with data from the SearchResult object.

DefaultContractItemDataPopulator populates the ContractItemData DTO with data from the ContractItem object.

DefaultContractChangeModelOrderDataPopulator populates the OrderData DTO with data of the change order from the ContractChangeModel object.

saphbcicontractmgmtaddon AddOn
The saphbcicontractmgmtaddon AddOn is a template, which extends a target storefront with SAP Commerce Billing integration-speci c functionality for provider contract
management. It complements the functionality provided by the saphbciordermgmtaddon AddOn.

The AddOn enhances the My Account area of the target storefront. It also provides new UIs for provider contract history and provider contract details, as well as UIs for extending or
terminating provider contracts.

In case of SAP Commerce Billing installations for non-production (for example, evaluation or demo) purposes, the yacceleratorstorefront for the power tools store is the out-of-
the-box target storefront (see "Installing the Integration Package").

 Note
A SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure that you limit your implementation to the features
de ned in your contract license. In case of doubt, please contact your SAP Commerce sales representative.

AddOn De nition

Name saphbcicontractmgmtaddon

Description This AddOn is a template which extends a target storefront with HBCI provider order management
speci c functionality.

Directory bin/ext-integration/hbci/saphbcicontractmgmtaddon

Requires
acceleratorstorefrontcommons

saphbcicontractmgmtfacades

Adjustments to the Target Storefront


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 53/74
3/5/2020
The saphbcicontractmgmtaddon AddOn adjusts the following aspects of the target storefront

Enhancement of the My Account area for provider contract management

New UIs:

Provider contracts history

Provider contracts details

Provider contract extension

Provider contract termination

My Account Area

The saphbcicontractmgmtaddon adds a corresponding new subsection Provider Contracts to the My Account area. This new subsection contains a Manage provider contracts
link. The provider contracts history page is accessible via both these links.

Note that the saphbcicontractmgmtaddon AddOn does not provide or check any speci c authorization requirements for accessing provider contracts. An authenticated B2B user
with permission to enter the My Account area implicitly also has permission to access and manage provider contracts of the corresponding B2B unit.

Provider Contracts History

The contracts history page displays all the user's provider contracts (that is, the provider contracts that are assigned to the same B2B unit as the user). In order to see details for a
speci c provider contract, the user needs to click on the contract number.

Provider Contracts Details

The provider contract details page displays a speci c provider contract. There is exactly one contract item associated with a provider contract. If a provider contract is active and the
contract (item) is not canceled, then the user can choose to extend or terminate it.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 54/74
3/5/2020

Provider Contract Extension

The provider contract extension page enables the user to extend a speci c provider contract.

The SAP Commerce system receives the following information for the contract (item) in question from the CRM back end (synchronous communication):

The default extension period

A simulation result of a contract extension with this default extension period.

The result is displayed on the contract extension page.

The end user can either:

Immediately con rm the proposed (default) extension period proposed

Request a different extension period by choosing one from the period drop down list and clicking Apply. This triggers a new simulation in the CRM back end with the selected
extension period. The end user can then choose to either con rm, or to leave the page.

Provider Contract Termination

The provider contract termination page enables the user to terminate a speci c provider contract.

The SAP Commerce system receives the following information for the contract (item) in question from the CRM back end (synchronous communication):

The default requested contract end date for the contract item

A simulation result of a contract termination with this default date

The result is displayed on the contract extension page.

The end user can either:

Immediately con rm the proposed (default) contract termination date.

Request a different termination date and clicking Apply. This triggers a new simulation in the CRM back end with the selected termination date. The end user can then choose to
either con rm, or to leave the page.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 55/74
3/5/2020

Contents
This section provides references for developers to the most interesting les, le locations and con gurations of the saphbcicontractmgmtaddon AddOn.

The AddOn accesses SAP Commerce Billingg contract order management functionality via the saphbcicontractmgmtfacades extension by its account provider contract page
controller.

AddOn directory (<dir>): bin\ext-integration\hbci\saphbcicontractmgmtaddon

Content Page Locations

JSP les

<dir>\acceleratoraddon\web\webroot\WEB-INF\views\responsive\pages\account

Tag les

<dir>\acceleratoraddon\web\webroot\WEB-INF\tags\responsive\account

Language-dependent texts

• <dir>\acceleratoraddon\web\webroot\WEB-INF\messages

Cascading Style Sheets

<dir>\acceleratoraddon\web\webroot\_ui\responsive\common\css\ saphbcicontractmgmtaddon.css

Page Controllers and Validators

 Sample Code

<dir>\acceleratoraddon\web\src

com.sap.hybris.hbci.contract.addon.controllers.pages.AccountProviderContractPageController

com.sap.hybris.hbci.contract.addon.forms.validation.ExtensionPeriodValidator

com.sap.hybris.hbci.contract.addon.forms.validation.TerminationValidator

<dir>\resources\saphbcicontractmgmtaddon\web\spring\saphbcicontractmgmtaddon-web-spring.xml

ImpEx Files

The following ImpEx les contain the AddOn-speci c My Account area con gurations as well as the assignment of the content pages to the account page template:

<dir>\resources\saphbcicontractmgmtaddon\import\contentCatalogs\powertoolsContentCatalog

cms-content.imp

cms-content_de.impex, cms-content_en.impex, cms-content_ja.impex, cms-content_zh.impex

ImpEx Import Classes and Con guration

 Sample Code
<dir>\src com.sap.hybris.hbci.saphbcicontractmgmtaddon.initialdata.setup.InitialDataSystemSetup
com.sap.hybris.hbci.saphbcicontractmgmtaddon.services.dataimport.impl.HbciContractAddOnSampleDataImportService <dir>\resources\saphbcicontractmgmtaddon-spring.xml

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 56/74
3/5/2020
Further Con guration

For a provider contract termination, the requested contract end date is sent by the user’s browser to the account provider contract controller. The string format expected (by the
controller) of this receiving date is de ned in the following con guration le:

<dir>\project.properties

The default format is: saphbcicontractmgmtaddon.form.input.date.dateformat=MMMMM dd, yyyy

Installing the AddOn Manually


To manually install saphbciordermgmtaddon (as opposed to out-of-the-box installation), carry out the following steps:

1. 1.Ensure that saphbcicontractmgmtaddon along with its required extensions is added to your localextensions.xml le.

2. Install the Addon to your storefront:

ant addoninstall -Daddonnames="saphbcicontractmgmtaddon" -DaddonStorefront.<your storefront>="<your storefront>"

3. Run ant clean all.

4. Start the SAP Commerce server and perform a platform update with the following options selected:

Update running system

Localize types

Project data settings:

saphbcicontractmgmtaddon

Import & Synchronize Content Catalog = yes

<mystorefrontextensionname>.additionalWebSpringConfigs.myaddon=classpath:/myaddon/web/spring/myaddon-web-spring.xml

Modi cation Checklist


The modi cations that this AddOn makes to the accelerator are as follows:

ImpEx Con guration Scripts

Core Data Listeners

Model Layer

Model Interceptors

Cockpit Con guration

Cockpit Beans

Validation Rules

Service Layer

Facade DTO

Facade Layer

CMS Components

Page Templates

JavaScript

CSS

Page Controllers

Tags

TLD

Filters

MVC Interceptors

Spring Security

Message Resources

 Note
With respect to JavaScript there are two small snippets contained in providerContractExtension.jsp and providerContractTermination.jsp to trigger a speci c
form submit (con rmation), respectively.

Related Information
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 57/74
3/5/2020
Installing the Integration Package

Self-Services
With SAP Commerce Billing the customer can go into My Account to con gure certain aspects of the payment procedure and invoice management.

The following self-services are available:

Invoice management (B2B and B2C)

Customers can search for invoices created for them in the component SAP Convergent Invoicing and view the invoice pdf.

Customers can carry out the following actions as part of synchronous invoice management:

Display a list of invoices

Display an individual invoice pdf

Payment card integration (B2C)

Related Information
Con guring Invoice Management
Payment Card Integration (B2C)

Payment Card Integration (B2C)


In B2C scenarios, order management supports payment by payment cards. A webshop customer now has the option of either adding a new card to their account, or replacing an existing
card.

 Note
The integration of a Payment Service Provider is not part of SAP Commerce Billing integration. It is mandatory to integrate a Payment Service Provider as part of an implementation
project. For testing purpose, mock services are available in ECP.

Related Information
Accelerator Payment Mock
CyberSource Con guration
Mocked Con guration
Checkout PCI Strategies
SAP CRM: Con guring Master Data Replication
B2C Scenario: Consumer Replication
Con guring Basic Settings for Data Replication
SAP CRM: Business Agreement
sapbusinessagreement Data Hub Extension

Features in Payment Card Integration


In B2C scenarios, webshop customers can manage payment card information as part of their account details.

Adding a New Payment Card in My Account


When a customer enters new payment card information under My Account in the SAP Commerce storefront, this information is persisted on the business partner and payment card
master. A business agreement is created, which is assigned in a 1:1 relation to the payment card.

The payment card information is transferred to a Payment Service Provider (PSP). SAP Commerce receives a token, which is transferred to the backend. The payment card number is not
stored in the CRM backend.

During the tokenization process the card is validated.

The following diagram shows the steps involved in the process, as well as the interaction between SAP Commerce, the PSP, Data Hub and the CRM backend:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 58/74
3/5/2020

Replacing a Payment Card in My Account


A customer also has the option of replacing the payment card information under My Account in the SAP Commerce storefront.

This option can be used to:

Change card for existing contracts, that changes will be valid for all future processes like authorization or settlement processes for this business agreement;

Replace the existing card with a new card;

As with the 'add new card' scenario, the payment card information is transferred to a Payment Service Provider (PSP). SAP Commerce receives a (new) token, which is transferred to the
backend. The payment card number is not stored in the CRM backend.

During the tokenization process the card is validated.

Con guring Payment Card Integration


You need to make a number of con guration settings/decisions in order to implement payment card integration.

Choose the B2C scenario in the SAP Commerce Backoffice Administration Cockpit.

Decide whether to use hosted order pages (HOPs) or Silent Order Posts (SOPs).

Set up the integration with a Payment Service Provider (PSP).

Setting the Channel B2C


You set the B2C channel here:

1. In Backoffice Administration Cockpit, choose Base Commerce Base Store .

2. Choose the store in question. On the Properties tab, go to the Websites section and double-click on the site in question.

3. In eld Channel, enter B2C.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 59/74
3/5/2020

4. Save your entries.

Hosted Order Pages (HOPs) versus Silent Order Post (SOPs)


Depending on the preferred Payment Card Industry (PCI) strategy, a SAP Commerce webshop can run with, for example, HOP or SOP integration:

With Hosted Order Page (HOP) integration, a secure page hosted by a third-party payment provider is used for collecting a customer's card details. Here, the payment card screen
is part of the PSP network.

With Silent Order Post (SOP) integration, a payment details form is provided that POSTs to an external service for creating the subscription. Here, the payment card elds are
integrated in the checkout process screens.

Both scenarios are covered in the following processes.

To nd out more about PCI strategies and the Accelerator Payment Mock, see the following related topics:

Accelerator Payment Mock

CyberSource Con guration

Mocked Con guration

Checkout PCI Strategies

Setting up Integration with a Payment Service Provider


SAP Commerce includes an out-of-the box payment service provider (PSP) integration with a mock service. When you have chosen the actual PSP to be used in the webshop, you need to
set up the integration.

The following is an example of the steps involved:

1. Set the PCI strategy for the PSP with the applicable property (in this example, hosted order pages are being used):

site.pci.strategy=HOP

2. Set additional PSP-relevant properties:

hop.post.url=<Gateway url>

hop.cybersource.merchantID=<ID provided by PSP>

hop.cybersource.sharedSecret=<Salt key provided by PSP>

3. To implement subscription request creation, carry out the following steps:

a. Create populators by inheriting AbstractRequestPopulator. Implement logic to ll elds required by the PSP.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 60/74
3/5/2020
b. Override the spring bean paymentDataConverter with custom populators for creating the subscription request.

4. To implement PSP response integration, carry out the following steps:

a. Create populators by inheriting AbstractResultPopulator. Interpret the elds sent by PSP into CreateSubscriptionResult.

b. Override the spring bean createSubscriptionResultConverter with custom populators.

Structures and Extensions for Payment Card Integration


The following extensions are used for payment card integration.

saphbcibusinessagreementservices
Extension saphbcibusinessagreementservices contains SAP Commerce Billing Commerce integration speci c services for update payment card scenarios.

Activation
Activate saphbcibusinessagreementservices to enhance the credit card scenarios. To use the extension, you need to be declare it in localextensions.xml.

Technical / Implementation Information


This extension contains the following classes which are used to enhance the services:

HbciPaymentService from DefaultAcceleratorPaymentService

Validates and calls strategy to update the credit card;

DefaultHbciCustomerExportService

Sends the address and credit card data to CRM;

HbciCreditCardPaymentInfoCreateStrategy inherited from DefaultCreditCardPaymentInfoCreateStrategy

Updates an existing card with new details;

saphbcibusinessagreementfacades
Extension saphbcibusinessagreementfacades contains SAP Commerce Integration speci c facade for updating payment card. Their implementations include logic to populate
the payment subscription DTOs.

Activation
Activate saphbcibusinessagreementfacades to enhance the payment card scenarios. To use the extension, you need to declared it in localextensions.xml.

Technical / Implementation Information


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 61/74
3/5/2020
This extension contains DefaultHbciPaymentFacade which is inherited from DefaultPaymentFacade. The class adds the following functionality:

Update an existing payment card in both HOP or SOP scenario

For SOP scenarios: Prepare card types

Send the customer to backend CRM

saphbcibusinessagreementaddon AddOn
The saphbcibusinessagreementaddon AddOn is a template which extends a target storefront with payment options functionality that is speci c to SAP Commerce Billing
integration.

The AddOn enhances the MyAccount area of the target store front with add or change payment options. It also provides new UIs for the checkout step Payment & Billing Address.

AddOn saphbcibusinessagreementaddon is technically dependent on the following extensions:

sapbusinessagreementaddon

acceleratorstorefrontcommons

saphbcibusinessagreementfacades

If you are installing SAP Commerce Billing for non-production purposes (for example evaluation or demo), the target storefront is yacceleratorstorefront for the electronics
store.

Adjustments to the Target Storefront


The saphbcibusinessagreementaddon AddOn adjusts the following aspects of the target storefront:

Enhancement of Payment Details under the My Account area for adding and editing credit cards.

Enhancement of the Payment & Billing Address step of checkout, so the webshop customer can select an existing card during checkout in a hosted order page (HOP) scenario.

New UIs:

Payment Options

SOP page in Payment Details

Payment method checkout step

Payment Details

The saphbcibusinessagreementaddon AddOn adds buttons Add Payment and Update Payment. Depending on system settings the user is then directed to payment card
maintenance either SOP or HOP based on the PCI strategy.

A user can add a new credit card or update an existing credit card.

 Note
There is a limitation that a default card cannot be updated if multiple cards exist for an account.

The saphbcibusinessagreementaddon AddOn also provides the UI with the functionality needed to maintain a payment card with SOP as a part of the mock service.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 62/74
3/5/2020

A user can also select an existing address to easily populate the billing address as show below.

Payment & Billing Address in Checkout

The saphbcibusinessagreementaddon AddOn enhances the Payment & Billing Address step the checkout to enable the webshop customer to reuse a payment card which is
stored under their account even in a HOP PCI strategy.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 63/74
3/5/2020

Content Page Locations


JSP les

<dir>\acceleratoraddon\web\webroot\WEB-INF\views\responsive\pages\account

<dir>\acceleratoraddon\web\webroot\WEB-INF\views\responsive\pages\checkout\multi

Language-dependent texts

<dir>\acceleratoraddon\web\webroot\WEB-INF\messages

Page Controllers and Validators


com.sap.hybris.hbci.businessagreement.addon.controllers.pages.AccountPaymentDetailsPageController

AccountPaymentDetailsPageController handles following scenarios:

Display of the HOP page when Add Payment or Update Payment is clicked.

Display of the SOP page when Add Payment or Update Payment is clicked.

Handling of the PSP response result either in HOP and SOP.

com.sap.hybris.hbci.businessagreement.addon.controllers.pages.checkout.steps.PaymentMethodCheckoutStepBuAgController

This controller is a replica of PaymentMethodCheckoutStepController with two enhanced methods:

Method enterStep: Used to display the UI for selecting an existing payment card or adding a new one.

Method displayHopPage: Used to display the HOP page of the product search page.

com.sap.hybris.hbci.businessagreement.addon.validators.SilentOrderFormValidator

This validator addresses the mass assignment vulnerability of SOP form.

ImpEx Files
The following ImpEx les contain the AddOn-speci c Payment Details enhancement:

saphbcibusinessagreementaddon/resources/saphbcibusinessagreementaddon/import/contentCatalogs/electronicsContentCatalog/cms-
content.impex

saphbcibusinessagreementaddon/resources/saphbcibusinessagreementaddon/import/contentCatalogs/electronicsContentCatalog/cms-
responsive-content.impex

Javascript Files
The following Javascript le contains the AddOn-speci c Payment Details enhancement:

saphbcibusinessagreementaddon.js

Con guration
The following le contains con guration:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 64/74
3/5/2020
resources/saphbcibusinessagreementaddon/web/spring/multi-step-checkout-config.xml

The checkout steps are altered to display the card selection screen for the HOP PCI strategy.

Installing the AddOn Manually


To manually install saphbcibusinessagreementaddon (as opposed to out-of-the-box installation), carry out the following steps:

1. Ensure that the saphbcibusinessagreementaddon AddOn along with its required extensions are added to your localextensions.xml le.

2. Install the AddOn to your B2C storefront:

ant addoninstall -Daddonnames=" saphbcibusinessagreementaddon" -DaddonStorefront.<your storefront>="<your storefront>"

Run ant clean all.

Start the SAP Commerce server and perform a platform update with checkboxes marked as shown.

Related Information
Payment Card Integration (B2C)

Invoice Management
The invoice self-service allows web shop users to display their invoice history and to display individual invoices in Portable Document Format (PDF).

 Note
Invoice management is exclusively integrated with invoice management of SAP Convergent Invoicing together with SAP FI-CA.

In SAP Convergent Invoicing, the invoicing documents are printed, as for other print processes, in Contract Accounts Receivable and Payable – with the Print Workbench. Invoicing
documents can be stored in an optical archive.

Only invoices stored in this way can be accessed and displayed in SAP Commerce.

Features in Invoice Management


Both the display of the order history and the display of individual invoices as PDFs are available as self-services in B2B and B2C scenarios.

B2C: Logged-on users retrieve their own invoices synchronously.

B2B: Logged-on users synchronously retrieve invoices issued to the root B2B unit they belong.

Link to Invoice History


The My Account area includes a link to the Invoice History.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 65/74
3/5/2020

Invoice History Link in Reference Electronics Store (B2C Site)

Displaying the Invoice History


The invoice history page shows invoices that are synchronously retrieved from an ERP backend system. The retrieved invoices are paged and the following information per invoice is
displayed: invoice number, invoice date (when the invoice was issued), due date, payment method, total amount, net amount, and tax amount.

Out of the box, invoices on the invoice history page can be sorted by invoice number, invoice date, due date, payment method or total amount.

Invoice History (B2C Site)

Displaying an Invoice as a PDF


Each invoice of the invoice history list can be displayed as PDF. As prerequisite, an invoice PDF must exist in the corresponding ERP backend system for the invoice in focus. The PDF is
requested by clicking on the invoice number or the Display action at the end of the line.

Link to Invoice PDF

If the invoice PDF does not (yet) exist, the customer is informed accordingly.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 66/74
3/5/2020

Invoice is Not Available

Con guring Invoice Management


In the SAP Commerce Backoffice Administration Cockpit, con guration settings for the invoice self-services are provided by the saphbciinvoicemgmtbackoffice extension. The
con guration options are integrated into the SAP Base Store Con guration:

1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Invoice tab.

3. In eld RFC Con guration, enter the RFC destination of the system that runs the component SAP Convergent Invoicing where your invoices are managed.

4. In section Search for Invoice, enter the following:

In eld Creation Period (Number of Days), enter the time period you want to use to select invoices. Only invoices dated up to this number of days into the past are
selected from the ERP backend system.

In eld Max. Number of Results, enter the maximum number of invoices you want to select (0 = unlimited).

5. Choose ERP as Back-End Type.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 67/74
3/5/2020

6. Save your entries.

Determining the Correct Sold-To Party


For the invoice selection in the SAP ERP back-end system a sold-to party identi er is required. The determination of the sold-to party is different for B2C and B2B scenarios:

In B2C scenarios, the sold-to party is the currently logged-on user as customer.

In B2B scenarios, the sold-to party is the root B2B unit of the user currently logged on. This B2B unit is determined by the SAP partner service of SAP Commerce extension
sapordermgmtb2bservices (which is one of the extensions required by saphbciinvoicemgmtservices).

The scenario (B2C or B2B) itself is determined by the SAP Commerce platform’s base site service, more precisely by the channel (which must be B2C or B2B) of the current base site of
the logged-on user’s session. Therefore, you need to maintain the correct channel indicator for a site in the Backoffice Administration Cockpit:

1. In Backoffice Administration Cockpit, choose SAP Integration SAP Base Store Con guration .

2. Go to your con guration element and select the Properties tab.

3. There you specify the correct scenario type in eld Channel.

Structures and Extensions for Invoice Management


Both synchronous and asynchronous order management use extensions to provide the function of displaying an invoice history and displaying individual invoices in Portable Document
Format (PDF).

The invoice self-service comprises the following extensions:

saphbciinvoicemgmtaddon

saphbciinvoicemgmtfacades

This extension provides the access point for the saphbciinvoicemgmtaddon’s page controller.

saphbciinvoicemgmtservices

This extension provides the sorting logic and delegates invoice selection and paging.

saphbciinvoicemgmtbol

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 68/74
3/5/2020
This extension integrates with the SAP ERP backend system for invoice selection.

saphbcicommon

This extension provides paging logic.

saphbciinvoicemgmtbackoffice

Dependencies between the extensions are illustrated in the diagram following. The colors used for the various boxes have the following meaning:

Yellow boxes represent extensions that belong to HBCI invoice management

Orange boxes represent extensions that belong to SAP Commerce CRM.

Light blue boxes contain SAP Commerce core extensions.

Invoice Management Extensions

Related Information
saphbciinvoicemgmtaddon AddOn
saphbciinvoicemgmtfacades Extension
saphbciinvoicemgmtservices Extension
saphbciinvoicemgmtbol Extension
saphbcicommon Extension
saphbciinvoicemgmtbackoffice Extension

saphbciinvoicemgmtbol Extension
The Business Object Layer (BOL) and backend implementation considers the back-office con gurations described in the saphbciinvoicemgmtbackoffice extension and fetches
invoices from a corresponding SAP ERP back-end system.

The following gure shows this implementation which consists mainly of InvoiceManagementImpl (the business object of BOL and backend integration) and
InvoiceManagementERPImpl (the back-end object of BOL).

BOL Layer

The InvoiceManagementERPImpl class implements access to the following remote function modules (from function group FKKINV_CRM_FCC):

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 69/74
3/5/2020
FKK_INV_CRM_INVDOC_SEL

FKK_INV_CRM_INVDOC_GET_PDF

An instance of InvoiceManagementImpl keeps invoices that were once retrieved for further access (see "saphbciinvoicemgmtbackoffice Extension"). This holds until the
user session is expired or the instance receives a refresh indicator from the service layer

Item Type Enhancement


The following attributes are enhanced for item type SAPCon guration:

sapHbciInvoiceMgmtRFCDestination

sapHbciInvoiceMgmtMaxHits

sapHbciInvoiceMgmtPeriodOfDays

See also saphbciinvoicemgmtbol/resources/saphbciinvoicemgmtbol-items.xml.

The back-office con gurations described in "Con guring Invoice Management" are based on these item type attributes as well as the Spring con gurations below.

Spring Con guration Files for BOL


saphbciinvoicemgmtbol/resources/saphbciinvoicemgmtbol-bo-spring.xml

 Source Code
<alias alias="sapHbciInvoiceManagementBO" name="sapHbciDefaultInvoiceManagementBO" />
<bean id="sapHbciDefaultInvoiceManagementBO" parent="sapCoreBusinessObject" scope="sapSession"
class="com.sap.hybris.hbci.saphbciinvoicemgmtbol.invoice.impl.InvoiceManagementImpl">
<property name="moduleConfigurationAccess" ref="sapHbciInvoiceManagementConfigurationAccess" />
<property name="backendType" value="#{baseStoreService.getCurrentBaseStore().getSAPConfiguration().getSapHbciInvoiceMgmtRFCDestination()?
</bean>

saphbciinvoicemgmtbol/resources/saphbciinvoicemgmtbol-be-spring.xml

 Source Code
<alias alias="sapHbciInvoiceManagementBeERP" name="sapHbciDefaultInvoiceManagementBeERP" />
<bean id="sapHbciDefaultInvoiceManagementBeERP" parent="sapCoreBackendObjectJCo" scope="sapSession"
class="com.sap.hybris.hbci.saphbciinvoicemgmtbol.invoice.backend.impl.InvoiceManagementERPImpl">
<property name="moduleConfigurationAccess" ref="sapHbciInvoiceManagementConfigurationAccess" />
<!-- defaultConnectionName: JCoStateless inherited from parent sapCoreBackendObjectJCo -->
<property name="defaultDestinationName" value="#{baseStoreService.getCurrentBaseStore().getSAPConfiguration().getSapHbciInvoiceMgmtRFCDes
<property name="periodOfDays" value="#{baseStoreService.getCurrentBaseStore().getSAPConfiguration().getSapHbciInvoiceMgmtPeriodOfDays()}"
<property name="maxHits" value="#{baseStoreService.getCurrentBaseStore().getSAPConfiguration().getSapHbciInvoiceMgmtMaxHits()}" />
</bean>

saphbciinvoicemgmtbol/resources/saphbciinvoicemgmtbol-config-spring.xml

 Source Code
<alias alias="sapHbciInvoiceManagementConfigurationAccess" name="sapHbciInvoiceManagementModuleConfiguration" />
<bean id="sapHbciInvoiceManagementModuleConfiguration" parent="sapCoreModuleConfigurationAccess">
<property name="moduleId" value="sapHbciInvoiceMgmt" />
</bean>

Related Information
saphbciinvoicemgmtbackoffice Extension
Con guring Invoice Management

saphbciinvoicemgmtservices Extension
The saphbciinvoicemgmtservices extension provides a sorting logic for paged invoice history and delegates the invoice retrieval to the saphbciinvoicemgmtbol extension
(and nally to an SAP ERP backend system).

Paging is outsourced to the saphbcicommon extension and fully reusable for other paged list scenarios as the type of elements to be paged is exchangeable (implemented by Java
generics).

For an invoice as a PDF, the service layer routes a byte array which represents the PDF fetched from an SAP ERP backend system.

The paging of retrieved invoices (i.e. InvoiceTransientModel instances) is handled by the DefaultPagedSearchService implementation. It requires a
SortCodeComparator and pageable data (received from the invoice history page controller through façade layer).

The following is pageable data:

Number of invoices per page

Current page to be displayed

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 70/74
3/5/2020
Selected sort code (for example, sort descending by invoice number)

With this information, SearchPageData (introduced in commerceservices extension) are created for InvoiceTransientModel instances which represent the paged invoice
history.

The SortCodeComparator implementation is provided by HBCIInvoiceComparator.

The following sort codes are supported:

invoice number (descending)

invoice type (ascending); This is not shown on the user interface by the accelerator.

billing date (descending)

due date (descending)

gross amount (descending)

net amount (descending)

tax amount (descending)

payment method text (ascending)

The availability of these sort codes for the user interface is con gurable in saphbciinvoicemgmtservices-spring.xml le in list
saphbciDefaultInvoiceHistorySortCodes.

With the out of the box con guration, invoices on the invoice history page can be sorted by the following:

invoice number

invoice date

due date

payment method

total amount

The HBCIDefaultBolInvoiceFacade collects various information from other services before the invoice retrieval is requested via the saphbciinvoicemgmtbol extension’s
InvoiceManagement interface:

BaseSiteService: Determines the B2C or B2B scenario for the current user session;

UserService: Determines the current user (and its customer ID for B2C scenario);

SapPartnerService: Retrieves the user’s root B2B unit in the B2B scenario;

CommonI18NService: Determines the language for language-dependent back-end texts;

GenericFactory: Retrieves the InvoiceManagement Backend Object Layer (BOL) implementation;

saphbciinvoicemgmtfacades Extension
The saphbciinvoicemgmtfacades extension provides the functional access point for the saphbciinvoicemgmtaddon extenion’s InvoiceHistoryPageController.

This page controller (derived from AbstractSearchPageController) accesses invoice self-service functionality via the HBCIInvoiceFacade interface. The gure below
visualizes this association and depicts further relationships and dependencies.

The HBCIDefaultInvoiceFacade implementation retrieves a paged invoice history or a dedicated invoice PDF from the HBCIInvoiceService interface (in
saphbciinvoicemgmtservices extension).

For a paged invoice history, the service returns InvoiceTransientModel (generated from saphbcicommon-beans.xml) instances which need to be converted into
InvoiceHistoryData (generated from saphbciinvoicemgmtfacades-beans.xml) instances.

The HBCIDefaultInvoiceHistoryPopulator supports this conversion which is triggered via the PagedSearchService interface (in saphbcicommon). The
populator itself requires the PriceDataFactory (from commercefacades) for InvoiceHistoryData population.

saphbciinvoicemgmtaddon AddOn
The saphbciinvoicemgmtaddon extension contains sample content catalogs for power tools store as reference B2B accelerator site and electronics store as reference B2C
accelerator site.

The target storefronts enhanced by the AddOn are yb2bacceleratorstorefront for power tools store and yacceleratorstorefront for electronics store, respectively.

The saphbciinvoicemgmtaddon extension adjusts the following aspects of the target storefront:

Enhancement of the My Account area to access the invoice self-service via a corresponding Invoice History entry;

A new Invoice History page;

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 71/74
3/5/2020
Display of invoices in portable document format (PDF);

AddOn De nition

Name saphbciinvoicemgmtaddon

Description This AddOn is a template which extends a target storefront with HBCI self-service functionality.

Directory bin/ext-integration/hbci/saphbciinvoicemgmtaddon

Requires
acceleratorstorefrontcommons

addonsupport

saphbciinvoicemgmtfacades

Contents
This section provides references for developers to the most interesting les, le locations and con gurations of the saphbciinvoicemgmtaddon extension.

AddOn Base Directory

Invoice history page

<addon-dir>/acceleratoraddon/web/webroot/

WEB-INF/views/responsive/pages/account/invoiceHistory.jsp

<addon-dir>/acceleratoraddon/web/webroot/

WEB-INF/tags/responsive/invoiceTable.tag

Resource les folder for language-dependent texts

<addon-dir>/acceleratoraddon/web/webroot/WEB-INF/tags/messages

Invoice self-service speci c less le

<addon-dir>/acceleratoraddon/web/webroot/

WEB-INF/_ui-src/responsive/less/saphbciinvoicemgmtaddon.less

Invoice self-service speci c JavaScript

<addon-dir>/acceleratoraddon/web/webroot/

_ui/responsive/common/js/saphbciinvoicemgmtaddon.js

Page controller

<addon-dir>/acceleratoraddon/web/src/com/sap/hybris/hbci/

saphbciinvoicemgmtaddon/controllers/pages/InvoiceHistoryPageController.java

Sample content catalogs (ImpEx les)

<addon-dir>/resources/saphbciinvoicemgmtaddon/import

/contentCatalogs/electronicsContentCatalog

<addon-dir>/resources/saphbciinvoicemgmtaddon/import

/contentCatalogs/powertoolsContentCatalog

Sample content catalog importer classes

<addon-dir>/src/com/sap/hybris/hbci/saphbciinvoicemgmtaddon/

initialdata/setup/InitialDataSystemSetup.java

<addon-dir>/src/com/sap/hybris/hbci/saphbciinvoicemgmtaddon/

services/dataimport/impl/HBCIAddOnSampleDataImportService.java

Con guration les

< as store front template.>/project.properties.template

<<addon-dir>/resources/saphbciinvoicemgmtaddon-spring.xml

<addon-dir>/resources/saphbciinvoicemgmtaddon/web/spring

saphbciinvoicemgmtaddon-web-spring.xml

Modi cation Check List


saphbciinvoicemgmtaddon contains the following modi cations for the B2B and B2C accelerator:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 72/74
3/5/2020
ImpEx Con guration Scripts

Core Data Listeners

Model Layer

Model Interceptors

Cockpit Con guration

Cockpit Beans

Validation Rules

Service Layer

Facade DTO

Facade Layer

CMS Components

Page Templates

JavaScript

CSS

Page Controllers

Tags

TLD

Filters

MVC Interceptors

Spring Security

Message Resources

Installing the AddOn


The out of the box installation of SAP Commerce Billing Integration (for non-production purposes) with recipe sap_hbci_b2b_b2c installs the invoice self-service add-on to both
accelerator target storefronts yacceleratorstorefront and yb2bacceleratorstorefront while using yacceleratorstorefront

To manually install saphbciinvoicemgmtaddon, carry out the following steps:

1. Ensure that all invoice self-service extensions (saphbciinvoicemgmtaddon, saphbciinvoicemgmtfacades, saphbciinvoicemgmtservices,


saphbciinvoicemgmtbol, saphbcicommon, and saphbciinvoicemgmtbackoffice) along with their required extensions are contained in your
localextensions.xml le.

2. Install saphbciinvoicemgmtaddon to your storefront:

ant addoninstall -Daddonnames="saphbciinvoicemgmtaddon"DaddonStorefront.<your storefront template name>="<your storefront>"

 Sample Code
ant addoninstall -Daddonnames="saphbciinvoicemgmtaddon"
-DaddonStorefront.yacceleratorstorefront="yacceleratorstorefront, yb2bacceleratorstorefront"

3. Run ant clean all.

4. Start the SAP Commerce server and perform a platform update with the following options selected:

Update running system

Localize types

Project data settings:

saphbciinvoicemgmtaddon

Import & Synchronize Content Catalog = yes

 Note
Out of the box, the AddOn contains content catalogs for a power tools store and an electronics store.

saphbciinvoicemgmtbackoffice Extension
Backoffice Administration Cockpit con gurations for invoice self-services are provided by the saphbciinvoicemgmtbackoffice extension.

For information on the con guration steps needed in the Backoffice Administration Cockpit, see "Con guring Invoice Management".

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 73/74
3/5/2020
Related Information
Con guring Invoice Management

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=d7a5c661c9f64a08bc42d20e1e… 74/74

Das könnte Ihnen auch gefallen