Академический Документы
Профессиональный Документы
Культура Документы
PUBLIC
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.
Related Information
Service Request Management
Complaints Management
Service Contract Management
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 1/54
3/5/2020
Service Order Management
Single Sign-On to Assisted Service Module
Product Registration
Process Flow
3. Customer creates a service ticket. For information on how to create a ticket, see the Creating a Support Ticket section in crmcustomerticketingaddon
AddOn.
Alternatively, customers can call a service agent in SAP CRM Interaction Center to create a service request on their behalf.
Note
If the customer service agents in SAP CRM need to access the customer cart or related details on the storefront, the single sign-on feature allows them a
seamless login to the Assisted Service Module.
4. The service ticket is replicated to SAP CRM as a service request. If the service request is created in SAP CRM, then the request is replicated from SAP CRM
to SAP Commerce. Any updates made to the service request in SAP CRM or SAP Commerce is replicated between the two systems.
For information on ticket replication, see Understanding the Replication of Service Requests.
5. If needed, a service order is created in SAP CRM as a follow-up activity of the service ticket, which gets resolved eventually.
For more information on service order process ow, see Service Order Management.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 2/54
3/5/2020
Data flow between SAP CRM and SAP Commerce via Data Hub with the service ticket flow highlighted
Related Information
Tickets
A service ticket created by the customer in SAP Commerce storefront is replicated from SAP Commerce to SAP CRM.
A status change or any other updates to the service request in SAP CRM is replicated to SAP Commerce.
A service request created by the Customer Service Agent in SAP CRM is replicated to SAP Commerce.
A status change or any other updates to the service ticket in SAP Commerce is replicated to SAP CRM.
Note
If the service ticket is related to an order, make sure that the customer attribute is maintained in the ticket, as it is mandatory for service request creation in SAP
CRM.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 3/54
3/5/2020
Service ticket created in SAP Commerce is replicated to SAP CRM as a service request. Any updates to the service ticket in SAP Commerce is also replicated to
SAP CRM.
Any updates to the service request in SAP CRM is replicated back to SAP Commerce. A service request created by the Customer Service Agent in SAP CRM is
replicated to SAP Commerce.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 4/54
3/5/2020
Setting Description
Service Request Type Transaction type of the service request from SAP CRM
Mapping Details
Service ticket replication between SAP CRM and SAP Commerce requires the mapping of status and data.
A customer service ticket created in SAP Commerce belongs to any of the following categories:
Complaint
Problem
Enquiry
For category mapping, the respective category code, catalog type, and code group should be maintained in both SAP and SAP CRM.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 5/54
3/5/2020
Catalog type ZR
Z002 Complaint
Z005 Problem
Z006 Enquiry
For information on creating categorization schema in SAP CRM, see Multilevel Categorization.
When a service request updated in SAP CRM is replicated back to SAP Commerce, only the following elds are replicated:
Subject
Message
Associated To
Category
Priority
Reference Objects – Refers to any associated service order, installed base or its components
Status Mapping
A service ticket created in SAP starts with the NEW status. When the ticket is being acted upon, the status is changed to OPEN, and when the issue is resolved the
status is changed to CLOSED. The status of the replicated service request in SAP CRM is summarized in the following table:
New New
Open In Process
Closed Completed
CsTicketEventEmailCon g Maintains e-mail con guration details like the e-mail template
CsTicketRelatedObject Any referred object in ticket. The reference object may be a service order, installed base, or installed base component. The ObjectType
represents the type of object referred such as installedBaseId. The types are con gured in the properties le.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 6/54
3/5/2020
$E101CRMXIF_STATUS_XT$E101CRMXIF_STATUS
$E101CRMXIF_PARTNER_XT$E101CRMXIF_PARTNER
Order Object_id
$E101CRMXIF_ACTIVITY_X$E101CRMXIF_ACTIVITY
$E101CRMXIF_TEXT_XT$E101CRMXIF_TEXT$E101CRMXIF_TLINE
IDOCTYP CRMXIF_ORDER
_SAVE_U04
MESTYP CRMXIF_ORDER
_SAVE_M
PROCESS_TYPE SRVR
$E101CRMXIF_PARTNER_XT$E101CRMXIF_PARTNER
PARTNER_PFT X
$E101CRMXIF_ORGMAN_X$E101CRMXIF_ORGMAN
SALES_ORG_RESP O 50020093
DIS_CHANNEL 10
SERVICE_ORG O 50000007
SERVICE_ORG_RESP O 50000007
SERV_ORG_SHORT PC4UService
SER_ORGRESP_SHT PC4UService
$E101CRMXIF_STATUS_XT$E101CRMXIF_STATUS
$E101CRMXIF_TEXT_XT$E101CRMXIF_TEXT
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 7/54
3/5/2020
The Ticket Replicated status in Backoffice, under Ticket System Tickets Administration tab, indicates the replication status of the ticket. The status is set to
false by default, and changes automatically to true, once the ticket is replicated to SAP CRM.
Service ticket integration with SAP CRM requires the following extensions:
crmcustomerticketingaddon AddOn
Procedure
1. Create a new customer or log in as an existing one on the SAP Commerce storefront.
3. Hover over the Add New option and select the ticket type from the list of options available.
4. In the Reason Category eld, specify the reason for creating the ticket. Reason categories are maintained in multiple levels and you can select these
categories sequentially.
Multi-level category selection allows the ticket to be assigned to the relevant department/agent easily. The options that appear for Reason Category 2 will
be based on the selection you make for Reason Category 1 and so on. You cannot skip a category and move to the next one.
5. Enter a subject for the ticket and select the required priority.
The category of the ticket is pre- lled, based on the selection during ticket creation.
6. If you have a cart or an order that this ticket relates to, select the cart or the order from the Associated To dropdown list.
Thank you for your customer support request. Your message has been sent to one of our Customer Service Agents who will co
Note
The document upload functionality is not supported in this addon since it is built on top of customerticketingaddon. This functionality is out of
the scope for CRM replication.
sapcrmticketsystem Extension
The sapcrmticketsystem extension provides the data model and business logic for replicating the customer service tickets for B2C customers to and from the
back-end system. The back-end system may be SAP CRM or SAP ERP.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 8/54
3/5/2020
Tickets are typically created through tools such as the customer service module (CSM), and represent contacts with customers of Web store. With the SAP CRM
integration, it is assumed that CSM will be replaced by the Interaction Center module in SAP CRM. The customer can now create a ticket for himself from the
storefront with the help of customerticketingaddon AddOn. The sapcrmticketsystem extension provides the functionality for sending any ticket
created in SAP Commerce to the back-end system, or creates a ticket in SAP Commerce after receiving a request from the back-end system. The replication
process is triggered as soon as the ticket is created or updated in SAP Commerce or SAP CRM.
Note
A SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure that you limit your implementation
to features as de ned in your license contract. In case of doubt, contact your SAP CRM sales representative.
Data Model
The sapcrmticketsystem extension adds an additional eld to CsTicketModel de ned in the ticketsystem extension. The eld
isTicketReplicated determines whether the ticket has been replicated to SAP CRM successfully or not. If true, the ticket has been replicated to SAP CRM
successfully. Also, if a ticket is replicated from SAP CRM to SAP Commerce, this eld is set to true.
A new Item Type CsTicketRelatedObject is de ned. It refers to the related objects with service request. The referred object may be a service order, installed
base, or installed base component.
ObjectType – The object type may be installedBaseId or componentId. It is con gured in the project properties le of the extension.
ObjectGuid – The object GUID received from the back end system.
The Csticket has one to many cardinality relation with CsTicketRelatedObject named CsTicket2CsTicketRelatedObject.
Services
All services for the sapcrmticketsystem extension are de ned in the Spring con guration le sapcrmticketsystem-spring.xml.
CsTicketExportService
This service provides a mechanism to export the newly created or updated ticket to Data Hub. It prepares a map containing the ticket attributes and their values to
create a CSV le, and then sends it to Data Hub. You may override or extend this service to implement the additional data that you may want to send to SAP CRM
system such as attachments, media, and so on.
<bean id="defaultCsTicketExportService"
class="com.sap.hybris.crm.sapcrmticketsystem.outbound.CsTicketExportService">
</bean>
SapDefaultTicketService
This service extends DefaultTicketService to add the getTicketsForIbase API for fetching list of service tickets associated with an IBase from
database.
<bean id="sapDefaultTicketService"
class="com.sap.hybris.crm.sapcrmticketsystem.service.impl.SapDefaultTicketService"
parent="defaultTicketService" scope="tenant">
</bean>
SapDefaultTicketBusinessService
This service is used for triggering the export whenever a ticket has been created or updated. This service overrides TicketBusinessService, to include the
call to CsTicketExportService whenever any operation is performed on a ticket.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c417… 9/54
3/5/2020
<bean id="sapDefaultTicketBusinessService"
class="com.sap.hybris.crm.sapcrmticketsystem.service.SapDefaultTicketBusinessService"
parent="defaultTicketBusinessService" scope="tenant">
</bean>
DataHubCsTicketEventTranslator
This translator creates a ticket event and saves it in the ticket whenever data is received from SAP back-end via Data Hub. This is done to save the ticket comments
in CsTicketEvent coming from SAP CRM. If the ticket received does not exist in SAP Commerce, the event is created only if ticket data has notes in it.
The translators have corresponding helper classes containing the business logic of the translation process. Helper class for
DataHubCsTicketEventTranslator is DataHubInboundCsTicketEventHelper.
<bean id="defaultSapDataHubInboundCsTicketEventHelper"
class="com.sap.hybris.crm.sapcrmticketsystem.inbound.impl.DefaultDataHubInboundCsTicketEventHelper">
</bean>
DataHubCustomerTranslator
This translator looks for the customer corresponding to the customer ID received in the ticket from Data Hub. If the customer exists, an instance of userModel is
saved in the ticket. This is done because the customers are replicated in SAP CRM with customerID present in CustomerModel, and CsTicketModel
contains reference of UserModel.
<bean id="defaultSapDataHubInboundCustomerHelper"
class="com.sap.hybris.crm.sapcrmticketsystem.inbound.impl.DefaultDataHubInboundCustomerHelper">
</bean>
DefaultCsTicketValidateInterceptor
This interceptor checks the availability of customer in SAP Commerce. If the replication of service ticket is triggered from SAP CRM through Data Hub, but the
customer associated with the service ticket is not present in SAP Commerce, then you may choose one of the following options:
Allow the service ticket to be replicated to SAP Commerce without the customer. In this case, the service ticket is available in Backoffice with customer eld
as null.
Stop the replication of service ticket by setting the following property to <true>.
sapcrmticketsystem.customer.required = true
You can set this property to <false> to allow the replication of service ticket.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 10/54
3/5/2020
KeyGenerator
The TicketId con guration is done by overriding csTciketCodeGenerator bean de ned in ticketsystem-spring.xml. This TicketId con guration
is mapped to SAP CRM ticket ID by maintaining the same con guration there.
<bean id="CsTicketPrepareInterceptor"
class="de.hybris.platform.ticket.interceptors.CsTicketPrepareInterceptor" scope="tenant">
<property name="initialTicketState">
</property>
</bean>
<bean id="defaultSapCsTicketCodeGenerator"
</bean>
sapcrmb2bticketsystem Extension
The sapcrmb2bticketsystem extension provides reusable functions for inbound and outbound processing of service tickets for B2B customer.
The sapcrmb2bticketsystem extension is an enhancement to sapcrmticketsystem extension. Within the sapcrmb2bticketsystem extension, the
bean sapDefaultTicketService is rede ned to support service ticket functionality for B2B customers.
Dependencies
The sapcrmb2bticketsystem extension depends on the following extension:
sapcrmticketsystem: Provides basic functions for the inbound and outbound mapping enhanced via this extension.
Features
For more information about features, see sapcrmticketsystem Extension.
B2B-Speci c Enhancements
As this extension enhances sapcrmticketsystem, the default interceptors, services, and contributors from sapcrmticketsystem are also used for the B2B
scenario. The sapcrmb2bticketsystem extension additionally contains CsTicketB2bExportService which extends CsTicketExportService.
Services
All services for the sapcrmb2bticketsystem extension are de ned in the spring con guration le sapcrmb2bticketsystem-spring.xml.
CsTicketB2bExportService
This service provides a mechanism to export the newly created or updated ticket to Data Hub. It prepares a map containing the ticket attributes and their values to
create a CSV le, and then sends it to Data Hub. You may override or extend this service to implement the additional data, such as attachments, media, and so on,
that you may want to send to SAP CRM system.
<bean id="defaultCsTicketB2bExportService"
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 11/54
3/5/2020
class="com.sap.hybris.crm.sapcrmb2bticketsystem.outbound.CsTicketB2bExportService"
parent=”defaultCsTicketExportService”>
</bean>
Related Information
sapcrmticketsystem Extension
crmcustomerticketingfacades Extension
The crmcustomerticketingfacades extension provides populators, façade and constants required to work with service requests and complaints.
SapCrmTicketFacade
Below is the list of few important methods exposed in this façade:
Populators
DefaultCrmTicketPopulator – populates ticket TicketData with data from CsTicketModel for service ticket/complaint's detail page
DefaultCrmTicketListPopulator – populates TicketsData with data from CsTicketModel for service ticket/complaint's listing page
Related Information
sapcrmticketsystem Extension
sapcrmcategoryschema Extension
The sapcrmcategoryschema extension provides new item types, populators, façades and services required to work with the category schema used in service
requests and complaints.
Item Types
The following item types are added as part of this extension:
CategorySchema
The CategorySchema item type holds the category schema information. Each item of CategorySchema holds the information below, along with other details:
CategorizationCategory
CategorizationCategory holds information of individual category in CategorySchema. The list of attributes of CategorizationCategory are:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 12/54
3/5/2020
Populators
CategorizationCategoryPopulator – this class is used for populating CategoryData with values from CategorizationCategoryModel.
Façades
SapCrmCategoriesFacade – this façade exposes the following methods:
getDefaultCategories – gives the list of subject categories based on the catgeory level, schema type, and date
getSubCategoriesForCode – gives the list of all sub(child) categories for the category code
Services
SapCrmCategoriesService – the list of a few important methods exposed in this service are:
getDefaultCategoriesByLevel – gives the list of subject categories based on the catgeory level and ticket/complaint creation date
getSchemaIDForAttribute – gives category schema ID con gured in Base Store Con guration
Related Information
crmcustomerticketingaddon AddOn
crmcustomerticketingaddon AddOn
The crmcustomerticketingaddon AddOn introduces to the storefront the functionality of listing, creating new, and updating existing support tickets.
AddOn De nition
Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your implementation to
the features de ned in your contract license. In case of doubt, contact your sales representative.
Name crmcustomerticketingaddon
Description Introduces to the storefront the functionality of listing, creating new, and updating existing support tickets.
Requires
addonsupport Extension
customerticketingaddon AddOn
sapcrmticketsystem Extension
commerceservices Extension
Market
Channel Responsive
Controllers
Controller Description
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 13/54
3/5/2020
Controller Description
AccountCrmSupportTicketsPageController Handles displaying the list of support tickets on the Support Tickets page. The list is populated with TicketData
objects returned by the TicketFacade. For more information, see the customerticketingfacades Extension document.
Note
By default, the list of returned tickets is sorted by the Time Modi ed attribute. On the storefront, you can also select
to sort the list by the Ticket ID attribute. For more information, see the Pagination section of the ticketsystem
Extension.
AccountSupportTicketWSController Handles the request sent for updating the related object like serviceorder.
ImpEx
The Support Tickets page and all its subpages and other CMS components are imported into SAP Commerce Accelerator using an ImpEx script, as shown in the
following example from the cms-content.impex le:
$contentCatalog=powertoolsContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default='Staged'])[
$contentCatalogName=Powertools Content Catalog
$productCatalog=powertoolsProductCatalog
$productCatalogName=Powertools Product Catalog
$productCV=catalogVersion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:St
$picture=media(code, $contentCV);
$image=image(code, $contentCV);
$media=media(code, $contentCV);
$page=page(uid, $contentCV);
$contentPage=contentPage(uid, $contentCV);
$product=product(code, $productCV)
$category=category(code, $productCV)
$jarResourceCms=jar:com.sap.hybris.crm.crmcustomerticketingaddon.constants.CrmcustomerticketingaddonConstants&/crmcustomerticket
$addonExtensionName=crmcustomerticketingaddon
INSERT_UPDATE JspIncludeComponent;$contentCV[unique=true];uid[unique=true];name;page;&componentRef
;;AccountSupportTicketsHistoryComponent;Account Support Tickets Component;/WEB-INF/views/addons/$addonExtensionName/responsive/p
;;AccountCRMAddSupportTicketComponent;Account AddSupport Ticket Component;/WEB-INF/views/addons/$addonExtensionName/responsive/p
;;AccountCRMUpdateSupportTicketComponent;Account UpdateSupport Ticket Component;/WEB-INF/views/addons/$addonExtensionName/respon
;;CrmSupportTicketRightComponent;Crm Support Ticket Right Component;/WEB-INF/views/addons/$addonExtensionName/responsive/pages/a
For localization purposes, the CMS components are imported separately for every storefronts.
Subject String The subject of the ticket. Its length cannot exceed 255 characters.
Message String The body of the ticket. Its length cannot be less than 1 character.
Associated Dropdown The cart or the order the ticket is associated to. Only available when a customer has a cart or an order.
To
Category Dropdown The category of the ticket. Available categories include Enquiry, Complaint, and Problem. These labels visible on the storefront can be changed by
editing the base_en.properties le.
Priority Dropdown The Priority of the ticket. Available Priority include Low, Medium, and High. These labels visible on the storefront can be changed by editing the
base_en.properties le.
Message History
The Message History page displays the history of information sent between the customer and the customer support agent. The messages sent by the customer
are aligned to the left, while the messages send by the customer support agent are aligned to the right.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 14/54
3/5/2020
Technically, displaying and aligning the messages correctly is done by a for-each loop within the accountUpdateSupportTicketPage.jsp le:
<c:choose>
<c:when test="${not empty ticketData.messageHistory}">
<tr>
<td class="supportTicketBR">
<div class="control-group">
<div class="controls">
<textarea readonly="readonly" >${fn:escapeXml(ticketData.messageHistory)}</textarea>
</div>
</div>
</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach items="${ticketData.messagesHistory}" var="messageData">
<tr>
<td class="supportTicketBR">
<div class="control-group">
<c:choose>
<c:when test="${messageData.author eq 'Customer Service'}">
<c:set var="cssClass" value="controls right" scope="page"/>
</c:when>
<c:otherwise>
<c:set var="cssClass" value="controls left" scope="page"/>
</c:otherwise>
</c:choose>
</div>
<div class="row customer-ticketing-body">
<div class="col-md-8 col-xs-10">
<c:forEach var="ticketRelatedObjectData"
items="${ticketData.relatedObjects}" varStatus="loopCounter">
<label
for="text.account.supporttickets.createTicket.${ticketRelatedObjectData.objectType}"
class="control-label"><spring:message
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 15/54
3/5/2020
code="text.account.supporttickets.createTicket.${ticketRelatedObjectData.objectT
text="${ticketRelatedObjectData.objectType}" /> </label>
<c:choose>
<c:when test="${not empty ticketRelatedObjectData.objectGuid}">
<c:url
value="${ticketRelatedObjectData.objectUrl}${ticketRelatedObjectData.obj
var="relObjecturl" />
<a href="${relObjecturl}"><p class="form-control-static">${ticketRelatedObjectDa
</c:when>
<c:otherwise>
<c:url
value="${ticketRelatedObjectData.objectUrl}${ticketRelatedObjectData.obj
var="relObjecturl" />
<a href="${relObjecturl}"><p class="form-control-static">${ticketRelatedObjectDa
</c:otherwise>
</c:choose>
</c:forEach>
</div>
</div>
</c:if>
CMS Components
The CMS components added by the crmcustomerticketingaddon AddOn using the ImpEx scripts support localization. For more information, see
Localization of ImpEx Using Build Time Generation. This AddOn changes/adds the following CMS components:
AccountSupportTicketHistoryNavigationComponent for navigating to the Support Ticket listing pages from the My Account Page
AccountSupportTicketsHistoryComponent, AccountCRMAddSupportTicketComponent,
AccountCRMUpdateSupportTicketComponent, and CrmSupportTicketRightComponent for resolving the actual JSPs to render the results.
How to Install
1. Add the crmcustomerticketingaddon AddOn to your localextensions.xml le, ensuring the listed required extensions are also included.
Note
Storefront Name
If you have renamed your storefront extension, you need to include some web spring con guration to your local.properties le:
<mystorefrontextensionname>.additionalWebSpringConfigs.myaddon=classpath:/myaddon/web/spring/myaddon-web-spring.xml
On Microsoft Windows systems, open the setantenv.bat le. Do not close the command window.
On Unix-related systems (such as Linux or Mac OS), run setantenv.sh by entering setantenv.sh. Do not close the command window.
When the installation is successful, the BUILD SUCCESSFUL noti cation is displayed in the command prompt.
4. Initialize or update the server. If performing an update, make sure the following options are selected:
Localize types
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 16/54
3/5/2020
Complaints Management
A complaint is an expression of dissatisfaction that a customer makes in relation to a service, product, or a billing document.
The process begins when the customer is dissatis ed with the usage of a service or product and wants to create a complaint.
For more information on how to create a complaint, see Creating a Complaint in SAP Commerce.
3. The complaint is replicated to SAP CRM. Any updates made to the complaint in SAP CRM or SAP Commerce is replicated between the two systems. For
more information, see Replicating Complaints.
Under SAP Integration SAP Base Store Con gurations Service Management , in the Complaint Con guration section, make the following settings:
Setting Description
Complaint Type Transaction type of the complaint request from SAP CRM
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 17/54
3/5/2020
Setting Description
Complaint Catalog Type Enter the value for the complaint category, for example <ZY>. This would be required
to retrieve the catalog type, for example Enquiry, Complaint, or Problem, from SAP
CRM.
Complaint Category Code Group Enter the complaint schema code group, for example <ZCOMPL>. This would be
required to retrieve the reason category code group from SAP CRM.
Mapping Details
Complaints replication between SAP CRM and SAP Commerce requires the mapping of status and data.
A customer complaint created in SAP Commerce belongs to any of the category imported from the SAP CRM system during initial setup
(customization.impex). For category mapping, the respective category code, catalog type, and code group should be maintained in both SAP Commerce and
SAP CRM.
Catalog type ZY
For information on creating categorization schema in SAP CRM, see Multilevel Categorization.
When a complaint updated in SAP CRM is replicated to SAP Commerce, only the following elds are replicated:
Subject
Message
Associated To
Category
Priority
Reference Objects – Refers to any associated service order, installed base or its components
Status Mapping
A complaint created in SAP Commerce starts with the NEW status. When the complaint is being acted upon, the status is changed to OPEN, and when the issue is
resolved the status is changed to CLOSED. The status of the replicated complaint in SAP CRM is summarized in the following table:
New New
Open In Process
Closed Completed
SAP Commerce Complaint Attribute SAP CRM Segment SAP CRM Field
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 18/54
3/5/2020
SAP Commerce Complaint Attribute SAP CRM Segment SAP CRM Field
Order Object_id
CRMXIF_ORDER_SAVE_U07$E101CRMXIF_BUSTRANS OBJECT_TYPE
PROCESS_TYPE CRMC
CRMXIF_ORDER_SAVE_U07$E101CRMXIF_BUSTRANS SALES_ORG
$E101CRMXIF_ORGMAN_X$E101CRMXIF_ORGMAN
SALES_ORG_RESP
DIS_CHANNEL
SERVICE_ORG
SERVICE_ORG_RESP
SERV_ORG_SHORT
SER_ORGRESP_SHT
CRMXIF_ORDER_SAVE_U07$E101CRMXIF_BUSTRANS$E101CRMXIF_STATUS_XT USER_STAT_PROC
$E101CRMXIF_STATUS
CRMXIF_ORDER_SAVE_U07$E101CRMXIF_BUSTRANS TEXT_ID
$E101CRMXIF_TEXT_XT$E101CRMXIF_TEXT
Replicating Complaints
Once the complaint is created in SAP Commerce, it is replicated automatically through Data Hub to SAP CRM, where a corresponding complaint is created.
SAPCRMCOMPLAINT_OUTBOUND_POOL.SapCrmSystem, SAPCRMCOMPLAINT_INBOUND_POOL.HybrisCore in
sapcoreconfiguration.autopublish.targetsystemsbypools
The Ticket Replicated status in Backoffice, under Ticket System Tickets Administration tab, indicates the replication status of the ticket/complaint. The status
is set to false by default, and changes automatically to true, once the ticket is replicated to SAP CRM.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 19/54
3/5/2020
sapcrmcomplaint (Data Hub extension)
crmcustomerticketingaddon AddOn
Procedure
1. In CRM customizing (SPRO), navigate to Customer Relationship Management Basic Functions Text Management De ne Text Determination
Procedure .
Note
The following is a sample con guration, and is customizable.
3. Select Text Determination Procedure as COMP001, maintained for complaint transaction type.
5. Create a Log text type S005, if not already maintained, with sequence 0005 and enter the value R in the Changes column, as shown in the diagram.
6. For Complaint Text type C001 and Recomm. Solution text type C003, enter the value P in the Changes column to display them as log.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 20/54
3/5/2020
Procedure
1. Log in to the SAP Commerce storefront.
Reason Category — Choose the complaints category. You can lter down the category to choose the speci c one.
Associated Order (optional) — Choose the associated order to which the complaint is associated
Associated Entries (optional) — Select the item entries to which the complaint is associated
Note
The Associated Order and Associated Entries elds appear only if there are any completed orders.
5. Click Submit.
The complaint is created and is listed in the Support Tickets/Complaints listing page. The status of the newly created complaint is set to Open.
sapcrmcomplaintexchange Extension
The sapcrmcomplaintexchange extension provides the data model and business logic for replicating the complaints to SAP CRM.
The B2C customer can create a complaint from the SAP Commerce storefront with the help of crmcustomerticketingaddon AddOn. The
sapcrmcomplaintexchange extension provides the functionality for sending any complaint created in SAP Commerce to the SAP CRM back end system.The
replication process is triggered as soon as the complaint is created or updated in SAP Commerce. The complaint, when updated from SAP CRM, will be replicated
to SAP Commerce.
Data Model
The sapcrmcomplaintexchange extension adds additional elds to CsTicketModel de ned in the ticketsystem extension. The
associatedOrderEntries eld determines the order entries for which the complaint is raised. This is an optional eld as the complaint may or may not be
associated to an order .
The eld isTicketReplicated determines whether the complaint is replicated to SAP CRM successfully or not. If the value of the eld is set to True, the
complaint is replicated to SAP CRM successfully.
The eld reasonCategory determines the category of complaint and will be replicated to SAP CRM system.
The eld reasonCategoryLevel determines the level of reason category that is associated to the complaint.
Services
All services for the sapcrmcomplaintexchange extension are de ned in the Spring con guration le sapcrmcomplaintexchange-spring.xml.
ComplaintExportService
This service provides a mechanism to export the newly created or updated complaint to Data Hub. It prepares a map containing the complaint attributes and their
values to create a CSV le, and then sends it to Data Hub. You may override or extend this service to implement the additional data, such as attachments, media,
and so on, that you may want to send to SAP CRM.
SapDefaultComplaintBussinessService
This service is used for triggering the export whenever a complaint is created or updated. This service overrides DefaultTicketBusinessService, to include
the call to ComplaintExportService whenever any operation is performed on a complaint.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 21/54
3/5/2020
Key Generator
The complaintId con guration is done by overriding CsTicketPrepareInterceptor. If CsTicketModel that is created is of "complaint" type, then
sapComplaintCodeGenerator is used to create TicketId in CsTicketModel. Otherwise, defaultkeygenrator is used. The TicketId
con guration is mapped to SAP CRM complaint ID by maintaining the same con guration.
Populator
CrmComplaintPopulator
sapcrmb2bcomplaintexchange Extension
The sapcrmb2bcomplaintexchange extension provides reusable functions for inbound and outbound processing of service complaints for B2B customer.
Dependencies
The sapcrmb2bcomplaintexchange extension depends on the following extension:
sapcrmcomplaintexchange: Provides basic functions for the inbound and outbound mapping enhanced via this extension.
Features
For more information about features, see sapcrmcomplaintexchange extension.
B2B-Speci c Enhancements
As this extension enhances sapcrmcomplaintexchange, the default interceptors, services, and contributors from sapcrmcomplaintexchange are also
used for the B2B scenario. The sapcrmb2bcomplaintexchange extension additionally contains DefaultComplaintB2bExportService which extends
defaultComplaintExportService.
Services
All services for the sapcrmb2bcomplaintexchange extension are de ned in the spring con guration le sapcrmb2bcomplaintexchange-
spring.xml.
ComplaintB2bExportService
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 22/54
3/5/2020
This service provides a mechanism to export the newly created or updated complaint to Data Hub. It prepares a map containing the complaint attributes and their
values to create a CSV le, and then sends it to Data Hub. You may override or extend this service to implement the additional data, such as attachments, media,
and so on, that you may want to send to SAP CRM system.
<bean id="defaultComplaintB2bExportService"
class="com.sap.hybris.crm.sapcrmb2bcomplaintexchange.outbound.ComplaintB2bExportService"
parent=”defaultComplaintExportService”>
</bean>
Related Information
sapcrmcomplaint Data Hub Extension
The assisted service module (ASM) enables employees to provide real-time customer sales and service support using the same storefront that their customers
use, both physically in-store, and virtually online. For example, when a customer gets stuck with a purchase request or with account administration, they can
contact customer sales and service support personnel and give them their cart ID or account name. The customer service agent uses ASM to nd and access the
customer’s cart or account, and provide sales or account administration support.
If the customer calls the service agent in SAP CRM Interaction Center, to get support with a purchase request or with account administration, the customer service
agent in SAP CRM may need to access the customer cart or related details on the storefront. The service agent can launch ASM from the Interaction Center by
clicking the Start Commerce Session button. A service agent gets created in ASM and the ʻasagent’ role is assigned to the service agent. The Single Sign-On (SSO)
feature provides the customer service agent a seamless login to ASM.
Note
The single sign-on feature to launch SAP Commerce from SAP CRM is available only if you access the Interaction Center using the Web UI.
Scenarios
For a registered customer, if the customer ID is received from the interaction center, then that customer will automatically be picked by SAP Commerce ASM. If the
customer ID is not received, the agent enters the customer ID and starts the session for the customer.
If the customer is not a registered customer, then the agent either gets the cart ID from the customer (if customer already has product in cart), or creates a new
cart for the customer. If the agent creates an order on behalf of the customer, then the agent must register the customer before starting checkout process or must
perform the checkout as a guest customer.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 23/54
3/5/2020
To register a customer on SAP Commerce storefront:
1. The agent gets the rst name, surname, and the email address of the customer and creates a new account by clicking the Create New Account button in
ASM.
3. The system creates a customer account without any password. The customer can use the forgot password functionality to request for a new password.
Improved and quicker customer service offering using the already existing storefront implementation
Allows the sales and service of much more complex products and services online
Higher conversion rates and revenue by reducing customer's abandoned shopping cart rates, by ability to help customers complete their online purchase
journey
Reduces initial and ongoing development, maintenance, and training costs compared to other customer service solutions
Improves customer satisfaction by increasing transparency and the overall user experience
Single Sign-On
Single sign-on can be enabled using Security Assertion Markup Language (SAML) which is an XML-based open standard for exchanging authentication and
authorization data between SAML authority, that is, an identity provider (IdP) and a SAML consumer, that is, a service provider. An IdP creates, maintains, and
manages identity information for principals (users, services, or systems) and provides principal authentication to other service providers (applications) within a
federation or distributed network.
A standard SAML implementation is based on a prede ned system of trust where a user is authenticated by the IdP initially, and only the user’s identity is passed
between the service providers. The trust relationship is built using certi cates that have been previously distributed between the IdP and the service providers.
These certi cates are used to sign the communication between the IdP and service providers.
Prerequisites
To con gure SAP Netweaver as the Identity provider, ensure that IDMFederation.SCA is deployed on AS JAVA. If not, deploy the SCA on AS JAVA and restart
the system. For more information on installing the federation software, see Downloading and Installing the Federation Software.
The samlsinglesignon extension allows you to connect SAP Commerce with external identity provider (IDP) systems. Before starting with the tasks in
this section, familiarize yourself with the samlsinglesignon Extension.
Note
The following instructions are speci c to con guring SAP Netweaver as the identity provider. You could also use other IdPs to maintain the trust relationship.
Procedure
1. Con gure SAP Netweaver as SAML 2.0 identity provider, and generate a keypair for encryption and signing on behalf of the identity provider.
2. Export the certi cate and metadata of the IdP to con gure the service providers to trust the IdP.
3. On the IdP, con gure a trust relationship with SAP CRM as the service provider.
5. Establish a trust relationship between SAP CRM and SAP Netweaver as the IdP.
7. Establish a trust relationship between SAP Commerce and SAP Netweaver as the IdP.
8. On the IdP, con gure a trust relationship with SAP Commerce as the service provider.
When customer service agents access the Interaction Center, they will be redirected to the login page on the identity provider. The trust relationship
between the IdP and the service providers help authenticate the user credentials, and the user can log in to the service providers without any additional
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 24/54
3/5/2020
logins.
Note
If you use secureportaladdon for early login or for registration purposes, for ASM customer emulation, change the property <property
name="agentSessionAttribute" value="as_agent_id"/> to <property name="agentSessionAttribute" value="ASM"/> in the secureportaladdon-
web-spring.xml le.
Prerequisites
To con gure SAP Netweaver as the Identity provider, ensure that IDMFederation.SCA is deployed on AS JAVA. If not, deploy the SCA on AS JAVA and restart the
system. For more information on installing the federation software, see Downloading and Installing the Federation Software.
Procedure
1. Open http(s)://<java server host>:<port>/nwa.
2. Log in as a user with administrative rights for the SAML2 user interface.
If you are con guring SAML for the rst time, then you will get the message System is not configured to support SAML 2.0. Click Enable
SAML 2.0 Support to enable SAML 2.0 support.
5. On the Initial Settings page, provide a unique name for the identity provider and set the operational mode to identity provider, and click Next.
6. On the General Settings page, click the Browse button next to Encryption Keypair eld to generate a keypair for encryption and signature on behalf of the
identity provider.
7. In the Select Keystore Entry window, click Create and enter the details such as entry name, validity of the keypair and click Next.
8. On the Subject Properties page, enter country name and common name, and click Finish.
9. On the General Settings page, click OK, and then click Next.
Procedure
1. Navigate to the Con guration tab on the IdP and click Authentication and Single Sign-On.
3. In the Metadata Download window, click Browse to select the keystore entry for download.
4. Click Export Entry, and in the Export Entry to File window select PKCS#8 Key Pair as the export format.
5. Click the Download option for the X.509 Certi cate File.
6. Click Close and then click OK in the Select Keystore Entry window.
Procedure
1. Navigate to the Con guration tab on the IdP and click Authentication and Single Sign-On.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 25/54
3/5/2020
2. On the SAML 2.0 tab, click Trusted Providers.
4. On the Select Metadata page, click Browse to select the SAP CRM metadata le.
5. On the Metadata Veri cation page, click Browse to select the signing certi cate for the SAP CRM system.
8. Specify the Name ID format for the communication with the service provider by selecting the provider from the list of trusted providers and clicking Edit.
9. On the Identity Federation tab, click Add and select the name format from the dropdown list.
Procedure
1. On the SAP CRM system, start the SAML 2.0 con guration application (transaction SAML2).
If you have never con gured your system for SAML 2.0, the system displays a message that the client is not con gured for SAML 2.0.
4. Continue through the con guration wizard and enter data as required.
This procedure only covers enabling SAML 2.0. Once the service provider is enabled, you can con gure the bindings supported by the service provider, trust
an identity provider, con gure identity federation, and protect resources with SAML.
Procedure
1. On the SAML 2.0 Con guration page, navigate to the Trusted Providers tab.
3. On the Select Metadata page, click Choose File to select the metadata le of the IdP.
4. On the Metadata Veri cation page, click Choose File to select the certi cate to verify the metadata.
5. On the Provider Name page, provide an alias name for the IdP.
8. Specify the Name ID format for the communication with the service provider by selecting the provider from the list of trusted providers and clicking Edit.
9. On the Identity Federation tab, click Add and select E-mail from the list of name Id formats.
12. Navigate to the Local Provider tab, click Metadata and then click the Download Metadata button in the SAML 2.0 Metadata window, to con gure trust with
the IdP.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 26/54
3/5/2020
Procedure
1. Go to the SAP Commerce download page and download SAP Commerce.
On the SAP Commerce command prompt, change current directory to installer directory and run the ASM recipe by executing the command
install.bat/install.sh -r <asm recipe>. For more information on ASM, see Assisted Service Module.
2. Navigate to the {HYBRIS_HOME}/hybris/config folder and open localextensions.xml for edit with any text editor, and add the
samlsinglesignon extension entry as <extension name='samlsinglesignon' />
6. Start SAP Commerce Server with recipe by executing install.bat -r <asm recipe> start.
Procedure
1. To import the IdP certi cate to samlKeystore le, navigate to the java bin directory and run the command keytool -importkeystore -
srckeystore PATH_TO_CERTIFICATE\crm_hybris.p12 –srcstoretype pkcs12 -destkeystore samlKeystore.jks -
deststoretype JKS.
This will generate a samlKeystore.jks le, which holds the certi cate information.
2. Copy the generated samlKeystore.jks file to the saml single sign on extension under COMMERCE_SUITE_PATH/hybris/bin/ext-
commerce/samlsinglesignon/resources/security.
5. In the bean with ID <keyManager>, replace default value of <sso.keystore.privatekey.alias> and <sso.keystore.default.certi cate.alias> with the alias of the
certi cate in the samlKeystore.jks.
6. In bean with ID <metadata> update property <signingKey> value with IdP signing key, and add the property <sso.cookie.name=samlPassThroughToken> to
the local.properties le.
7. Start the SAP Commerce server and then access the URL https://<host>:<ssl_port>/samlsinglesignon/saml/metadata, to generate
metadata for SAP Commerce.
8. Update the binding URL in the metadata le from <localhost> to SAP Commerce system IP address.
9. Update <sso.redirect.url> property in local.properties le with system IP address. For example, sso.redirect.url=https://<host>:
<ssl_port>/.
10. Update <sso.entity.id> property in local.properties le to the value as de ned in the metadata le uploaded on IdP.
Procedure
1. Navigate to the Con guration tab on the IdP and click Authentication and Single Sign-On.
4. On the Select Metadata page, click Browse to select the SAP Commerce metadata le.
8. Specify the Name ID format for the communication with the service provider by selecting the provider from the list of trusted providers and clicking Edit.
9. On the Identity Federation tab, click Add and select the name format from the dropdown list.
Note
The service contracts can be viewed and renewed in SAP Commerce storefront, you cannot make any modi cations to the contract. You can also renew and
terminate the service contract at an item level.
In SAP CRM, service contracts are outline agreements with business partners, which de ne services offered for a particular period. They represent long-term
service agreements with customers in relation to the content and scope of services guaranteed within speci c tolerance limits for certain parameters, for example,
within a prede ned timeframe.
In a service contract, you specify detailed information that has been agreed upon with the service recipient, such as:
Routine tasks for devices that you have sold or rented to the customer
During the validity period of the service contract, you can use the service contract for the following:
To determine whether a service request made by the customer is covered by the service contract
To trigger follow-up activities before the validity period of the service contract runs out
Related Information
Service Contract
In Backoffice, under SAP Integration SAP Base Store Con gurations Service Management , con gure the following settings for service contract display:
Setting Description
Service Contract RFC Destination Specify the RFC destination of the SAP CRM system to retrieve the service contract
details. This value overrides the RFC setting on the Core Data tab.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 28/54
3/5/2020
Setting Description
Maximum Number of Results Maximum number of contracts to be retrieved from SAP CRM.
The following two types of statuses can be con gured in CRM backend:
User Status
User status is the status mapping coming from CRM backend as part of initial data upload (Customizing Impex). User statuses are not con gured by default in CRM
backend. In such scenarios, fallback status is used, that is system status which are always con gured for any backend type. These type of status are generally used
for the display.
System Status
System statuses are statuses which are set by system whenever some modi cation is done in the contract. List of possible system statuses are now part of
servicecontractaddon/resources/import/data/common folder which is imported at the time of system update/initialization as a part of project data
update. These statuses are used for con guration and pre-con rmation check in Renewal/Termination of service contracts and also for display when user statuses
are not con gured in the CRM backend.
userPro le: userPro le is a con guration attached with every status code. Same status code are con gured with different user pro les.
description: localized text for status code such as Released for E0003.
The standard con gurations for service contract is de ned in the building block. Check the con guration guide under
http://help.sap.com/bp_crmv12007/CRM_DE/BBLibrary/html/C26_EN_DE.htm
Date pro le and Status pro le must be con gured as per the standard documentation.
Change process BLEX and TERM must be con gured as per the standard.
In SAP Commerce storefront, you can view and renew the service contract. You can also renew and terminate the service contract at an item level. The Service
Contracts page in the My Account section lists all the contracts:
For B2B, the service contracts for that B2B unit is listed.
For B2C, the contracts associated only with that logged in customer is listed.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 29/54
3/5/2020
A service contract contains a header and an items list. Items can be either Service Products or Service Packages.
The following details from the service contract can be viewed in SAP Commerce storefront:
Prerequisites
Released.
Procedure
1. Log in to the SAP Commerce storefront.
The list of service contracts for the logged in account appears.To renew a service contract or an item level service contract, the status must be
4. Click the Renew button corresponding to the service contract that you want to renew.
As part of the service contract renewal process, the following actions take place:
Note
The new contract is created based on the existing contract details. For example, let us assume the start date of the existing contract is July 01, 2015 and
the end date of the contract is June 30, 2016. In this case, the contract runs for a period of 12 months. So, the newly created contract will start on July 01,
2016 and end on June 30, 2017, and will run for a period of 12 months.
5. To renew the service contracts at an item level, click the Renew button corresponding to the item.
A new contract item is added to the existing contract with a new contract period. The duration of the new contract item remains the same as the existing
contract item. The status of the new contract item is set to Open.
Prerequisites
To terminate a service contract at an item level, the status of the item must be Released. You cannot terminate the service contract, if the contract has not started
or if the contract has ended.
Procedure
1. Log in to the SAP Commerce storefront.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 30/54
3/5/2020
The list of service contracts for the logged in account appears.
3. Click the service contract for which you want to do an item level termination.
4. Click the Terminate button corresponding to the item for which you want to terminate the service contract.
The service contract for the item is terminated. The end date of the contract is changed to the current date on which the contract is terminated.
The following graphic illustrates the high-level architecture of service contract display on SAP Commerce storefront:
The sapservicecontractaddon AddOn assists the display of service contracts that are fetched from SAP CRM. The sapservicecontractbol is
responsible for managing connection, making GENIL and RFC calls to SAP CRM. The sapservicecontractservices extension provides the back-end
services and the sapservicecontractfacades extension provides facades to view and perform operations on service contracts.
To enable service contract on SAP Commerce storefront, following extensions are required:
sapservicecontractaddon AddOn
sapservicecontractfacades extension
sapservicecontractservices extension
sapservicecontractbol extension
sapservicecontractaddon AddOn
The sapservicecontractaddon AddOn introduces the functionality of displaying, renewing, and terminating service contracts that are fetched from SAP
CRM, to the SAP Commerce storefront.
AddOn De nition
Name sapservicecontractaddon
Description Introduces to the storefront, the functionality of displaying, renewing, and terminating service contracts from the SAP CRM back-end.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 31/54
3/5/2020
Requires
addonsupport extension
sapservicecontractfacades extension
acceleratorstorefrontcommons extension
Author SAP
Market
Controllers
Controller Description
AccountServiceContractsPageController Handles displaying the list of service contracts on service contract listing page, and displaying contract details on service
contract detail page. It also handles displaying of renewal of service contracts, and renewal and termination of service
contract items. The list is populated with ServiceContractData objects returned by the ServiceContractFacade.
For more information, see the sapservicecontractfacades extension document.
System Setup
ServiceContractAddonSystemSetup: Service contract implementation of DefaultAddonSystemSupportSetup for import of service contract
speci c core data and sample data at the time of system initialization and update.
ImpEx
The Service Contract listing page and detail page are imported into SAP Commerce Accelerator using an ImpEx script.
SAP status mapping for possible system statuses are imported using the following impex le as part of essential data:
statuses.impex
CMS Components
This AddOn changes/adds the following CMS components:
Service Contract Detail Page to display service contract details with product items.
AccountServiceContractsNavigationComponent for navigating to the Service Contract listing pages from My Account Page for B2C and B2B
Desktop channel.
AccountServiceContractsNavigationComponent for navigating to the Service Contract listing pages from home page navigation for B2C
Responsive channel.
AccountContractDetailsHeadlineComponent, AccountContractDetailsItemsComponent,
AccountContractDetailsTotalsComponent, AccountContractDetailsGeneralDataComponent for resolving the actual JSPs to render
the results for B2C and B2B Desktop channel.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 32/54
3/5/2020
AccountContractDetailsHeadlineComponent, AccountContractDetailsTotalsComponent,
AccountContractDetailsItemsComponent, AccountContractDetailsActionsComponent,
AccountContractDetailsGeneralDataComponent for resolving the actual JSPs to render the results for B2C Responsive channel.
Procedure
1. Add sapservicecontractaddon to your localextensions.xml, ensuring that the listed required extensions are also included.
On Microsoft Windows systems, open the setantenv.bat le. Do not close the command window.
On Unix-related systems (such as Linux or Mac OS), run setantenv.sh by entering ./setantenv.sh. Do not close the command window.
When the installation is successful, the BUILD SUCCESSFUL noti cation is displayed in the command prompt.
4. Initialize or update the server. If performing an update, make sure that the following options are selected:
Localize type
a. Log in to the CMS cockpit http://<server-ip-address>:<port>/cmscockpit/ using the username cmsmanager and password 1234.
b. In left navigation pane, under websites, select the staged content catalog and then select Account Page. Click the Edit icon next to Body Content
Slot for My Account Homepage.
c. In the editor area on the right side, add a service contract component in the Editorial section.
d. In the pop-up window, select Account Service Contracts Navigation Component-staged version, and click Done.
f. Click the Edit icon next to Side Content Slot for My Account Homepage. In editor area on right side, click the Edit icon next to Navigation Node.
g. In the pop-up window, navigate to Hierarchy Links section and add the Service Contracts - ELE-S link.
h. Synchronize the content catalog version in the Backoffice, and check the My Account page on the storefront. The new component and link for service
contracts appear.
sapservicecontractfacades Extension
The sapservicecontractfacades extension provides the facade suite to access service and BOL (business object layer) layer to handle requests related to
service contracts for B2C scenarios.
Overview
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 33/54
3/5/2020
The sapservicecontractfacades extension uses service and BOL layer to create Data Object (POJO) response which can be used by storefront. The
extension provides response adjusted to meet the sapservicecontractaddon requirement.
Data Model
Note
The classes in blue color are SAP Commerce out of the box classes.
Facade Layer
All beans for the sapservicecontractfacades extension are de ned in the sapservicecontractfacades-spring.xml spring con guration le.
ServiceContractFacade
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 34/54
3/5/2020
This is the facade layer which uses the services and the BOL layers to ful ll storefront requirement related to service contract. The ServiceContractFacade
interface provides generic methods used for various operations related to service contracts, including:
getPagedServiceContractData( nal PageableData pageableData) Get the list of contracts by calling service layer API
getPagedSynchronizedContractData( nal PageableData pageableData) Get the list of contracts by making call to BOL layer API
getServiceContractDataForIBase(String iBaseID) Get the list of contracts related to an IBase by making call to BOL layer API
getSynchronizedServiceContractDetails( nal String contractId) Get the contract details for a given contract ID by making call to BOL layer API
renewContract( nal String guid) Renew contract for a given GUID by calling BOL layer API
renewItem( nal String contractGuid, nal String itemGuid) Renew contract item for a given contract GUID and item GUID by calling service layer
API
terminateContractItem( nal String contractGuid, nal String itemGuid) Terminate the contract item for a given contract GUID and item GUID by calling
service layer API
Populators
Name Description
DefaultServiceContractPopulator Populates the elds of ServiceContractData objects with information taken from
ServiceContractModel objects.
sapservicecontractfacadesb2b Extension
The sapservicecontractfacadesb2b extension provides the facade suite to access service and BOL (business object layer) layer to handle requests related
to service contracts for B2B speci c scenario.
The sapservicecontractfacadesb2b extension is an enhancement to sapservicecontractfacades. This extension uses B2B speci c service and
BOL layer to create Data Object (POJO) response which can be used by B2B storefront. The extension provides response adjusted to meet the
sapservicecontractaddon requirement which is speci c for B2B scenarios.
Dependencies
The sapservicecontractfacadesb2b extension depends on the following extension:
Features
For more information about features, see sapservicecontractfacades extension.
B2B-Speci c Enhancements
As this extension enhances sapservicecontractfacades extension, the default converters and populators from sapservicecontractfacades are
also used for the B2B scenario. The mapping is enhanced for fetching and storing B2B speci c data of the customer, if the customer is an instance of B2B
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 35/54
3/5/2020
customer model. For this, new B2B populators are merged with other B2C populators in the converter bean from the sapservicecontractfacades
extension.
Populators
Name Description
DefaultB2BServiceContractPopulator Populates the B2B related elds (B2B unit) of ServiceContractData objects with
information taken from ServiceContractModel objects.
Related Information
sapservicecontractfacades Extension
sapservicecontractaddon AddOn
sapservicecontractbol Extension
The sapservicecontractbol extension provides the back-end services to interact with SAP CRM to fetch, renew, and terminate service contracts.
Overview
The sapservicecontractbol extension makes RFC calls and uses GenIL API to interact with SAP CRM to fetch, renew, and terminate service contracts. The
extension provides implementation to ful ll service contract related requests coming from the sapservicecontractfacades extension. This extension uses
DTOs to transfer results of RFC calls and GENIL API to the façade layer.
SapServiceContractBackendBusinessObject is the starting point for calling SAP CRM to get the service contract.
Method Description
SearchResultList getServiceContractsForCustomer(String UID, PageableData Get all service Contracts From CRM backend for current customer
pageableData, nal boolean reload)
getServiceContractsForIBase( nal String uid, nal String iBaseID) Get the service contracts related to an IBase from CRM backend for current customer
ServiceContractSearchResult getServiceContractDetails(String contractId) Get the contract details for the given contract ID
String renewContract(String guid) Renew service contract for given contract guid
String terminateContractItem( nal String contractGuid, nal String itemGuid) Terminate service contract item for given contract guid and item guid
String renewItem( nal String contractGuid, nal String itemGuid) Renew service contract item for given contract guid and item guid
This class uses SapCRMServiceContractBackend to manage the connection between SAP CRM and SAP Commerce and to call the API to fetch, renew, and
terminate service contracts based on various search parameters.
Method Description
SearchResultList getContracts( nal String uId, nal String queryParam) Get contracts for the given customer ID
getContractsForIBase( nal String uid, nal String iBaseID) Get contracts for an IBase by making call to CRM backend
ServiceContractSearchResult getContractsforContractId( nal String contractId) Get the contract details for the given contract ID
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 36/54
3/5/2020
Method Description
String renewContract(String guid) Renew service contract for the given contract GUID
String terminateContractItem( nal String contractGuid) Terminate service contract item for given contract GUID and item GUID
String renewItem( nal String contractGuid, nal String itemGuid) Renew service contract item for given contract GUID and item GUID
public List<SortData> getSearchSort() Get the sort options for the pageable data
This class is responsible for connection handling between SAP CRM and SAP Commerce. It contains methods to fetch the list of contracts, renew, and terminate
the service contracts and to check status of back-end connection. This class makes use of JCoManagedConnectionFactory to establish connection.
BOL layer uses following pojo’s to handle and transfer results of GENIL and RFC calls:
ServiceContractGenilContainer DefaultServiceContractGenilContainer DTO to hold all the contract data coming from BOL layer
ServiceContractSearchResult DefaultServiceContractSearchResult DTO to store service contract details coming from SAP
CRM
ServiceContractItemResult DefaultServiceContractItemResult DTO to store service contract item details coming from
SAP CRM
The comparator class overrides Compare(obj O1,obj O2) for the UI based sorting of the result on various parameters such as Start Date, End Date, Contract
ID, Status, Net Value, and so on.
The SapServiceContractFactory class uses the GenericFactory instance to return the bean of SapServiceContractBackendBusinessObject
using the getBean method as genericFactory.getBean("sapCrmbackendBusinessObject").
sapservicecontractservices Extension
The sapservicecontractservices extension provides the back-end services to handle requests related to service contracts for B2C scenarios, coming from
the sapservicecontractfacades extension and uses the DAO layer to interact with database.
Overview
The sapservicecontractservices extension provides services and data modelling to perform various operations related to service contract such as fetch,
renew, and terminate. The sapservicecontractfacades extension uses this services to ful ll storefront requirement.
Services
All beans for the sapservicecontractservices extension are de ned in the sapservicecontractservices-spring.xml spring con guration le.
ContractService
This service provides a mechanism to handle service contracts. Service contract model can be changed and extended in the sapservicecontractservices-
items.xml le.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 37/54
3/5/2020
Method Description
String getUid( nal CustomerModel customer) Get UID for B2C customer
SearchPageData<ServiceContractModel> getAllContracts(CustomerModel customer, Get contracts for a given B2C customer asynchronously according to paging data
nal PageableData pageableData)
List<ServiceContractModel> getContracts(CustomerModel customer) Get all contracts for a given B2C customer asynchronously
SearchResultList getServiceContractsForCustomerFromBol(PageableData Get all contracts from CRM backend for current customer
pageableData, nal boolean reload, nal CustomerModel customer)
String terminateContractFromBol( nal String contractGuid, nal String itemGuid) Terminate contract item with given contract GUID and Item GUID
String renewContractItemfromBol( nal String contractGuid, nal String itemGuid) Renew contract item with given contract GUID and Item GUID
The default implementation of ContractService is DefaultContractService. You may override or extend this service in order to implement your own
rules to work with service contracts.
Method Description
SearchPageData<ServiceContractModel> getAllContractsForCustomer( nal Get contracts for customer with SearchPageData Information
CustomerModel customer, nal PageableData pageableData)
DefaultServiceContractDao is the default implementation of ServiceContractDao. Many of the methods in DefaultServiceContractDao make
use of the PagedFlexibleSearchService.
sapservicecontractservicesb2b Extension
The sapservicecontractservicesb2b extension provides the back-end services to handle requests related to B2B speci c service contract data coming
from the sapservicecontractfacadesb2b extension and also extends the dao layer to interact with database for fetching service contracts for the B2B
customer.
Overview
The sapservicecontractservicesb2b extension provides services to perform various operations related to service contract such as fetching service
contract for the B2B unit and so on. The sapservicecontractfacadesb2b extension uses this services to ful ll storefront requirement.
Services
All beans for the sapservicecontractservicesb2b extension are de ned in the sapservicecontractservicesb2b-spring.xml spring
con guration le.
B2BContractService
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 38/54
3/5/2020
This service overrides the DefaultContractService and provides a mechanism to handle service contracts for B2B customers. Service contract model can
be changed and extended in the sapservicecontractservices-items.xml le.
Method Description
String getUid( nal CustomerModel customer) Gets UID for a given B2B customer; otherwise, calls parent method.
List<ServiceContractModel> getContracts(CustomerModel customer) Gets all contracts for a given B2B customer asynchronously; otherwise, calls parent
method.
SearchPageData<ServiceContractModel> getAllContracts(CustomerModel customer, Gets contracts for a given B2B customer asynchronously according to paging data;
nal PageableData pageableData) otherwise, calls parent method.
Method Description
SearchPageData<ServiceContractModel> getAllContractsForUnit( nal B2BUnitModel Gets contracts for a given B2B unit with SearchPageData Information.
unit, nal PageableData pageableData)
List<ServiceContractModel> getServiceContractsForUnit( nal B2BUnitModel unit) Gets contracts for a given B2B unit.
Note
To enable the service order functionality, you must activate the switch CRM_SERVICE_ASSIGNMENT_XIF under the business function
CRM_SERVICE_ASSIGNMENT.
The service order created in SAP CRM is replicated automatically to SAP Commerce and is made available on SAP Commerce storefront for viewing. This helps the
customers to follow-up on the status of the service ticket that is created in SAP Commerce.
Note
The service orders can only be viewed on SAP Commerce storefront. You cannot make any modi cations to the service order.
Process Flow
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 39/54
3/5/2020
3. Service agent creates a service order in SAP CRM as a follow-up activity of the service ticket.
4. The service order is replicated to SAP Commerce and is made available in SAP Commerce storefront.
5. The customer can view the status of the service order on the SAP Commerce storefront, and also see any associated service contract or service request.
6. If needed, service order scheduling is created in SAP CRM once the service order is released. The scheduling information is replicated to SAP Commerce.
7. The service agent attends to the customer at the scheduled time to resolve the queries.
8. Once the issue is resolved, the service agent closes the service order by setting the status to “Completed”.
Note
This process ow is for a service order created as a follow-up activity of a service ticket. Similar process ows can be triggered as a follow-up activity of a service
quotation, service contract, or standalone.
For more information on service order management and con gurations in SAP CRM, see Service Order Management in SAP Help Portal.
Service Scheduling
Service scheduling is triggered as part of a service order. Once the service order is created and approved (released) by the service agent, a service schedule is
created. The service schedule is used for resolving the customer queries via site visit, phone call, email, and so on. Once the status of the service schedule is set to
"Completed" in SAP CRM, the service order is closed by setting the status to “Completed”.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 40/54
3/5/2020
Note
The resource planner must manually set the status to Informed so that assignments can be transferred. For more information, see Service Employee
Assignments.
For more information on service scheduling and con gurations in SAP CRM, see Service Resource Planning.
In Backoffice, under SAP Integration SAP Base Store Con gurations Service Management , enter SRVO as the service order process type for service order
display.
Mapping Details
The statuses and attributes in SAP CRM are mapped to SAP Commerce. The statuses in SAP Commerce are same as in SAP CRM.
IDoc Type: CRMXIF_ORDER_SAVE_M01 (service order without scheduling information) / CRMXIF_ORDER_SAVE_U07 (service order with scheduling
information)
SAP Commerce Service Order Attribute SAP CRM Segment SAP CRM Field
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 41/54
3/5/2020
SAP Commerce Service Order Attribute SAP CRM Segment SAP CRM Field
SAP Commerce Service Order Entry SAP CRM Segment SAP CRM Field
Attribute
The values for catalog version is mapped to Sales Organization and Division. These values are con gured in Backoffice under SAP Global Con guration, and are
uploaded to Data Hub while performing system con guration.
All the products in the service order must be replicated before the service order is replicated. In the service order entry, the catalog and version of the product is
determined by the setup done during product replication.
The catalog ID and version of the product in the service order is referenced with the online version of the catalog that is associated with the sales organization and
distribution channel.
In the following screenshot, all the products of sales organization "O 560061093" and distribution channel “01” would be associated with the “Online” version of
Powertools Product Catalog.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 42/54
3/5/2020
Procedure
1. Log in to SAP Commerce.
3. Click the service order for which you want to view the details.
Service order ID
The resource assignment (scheduling) details for each service item. (Date and Time of the visit)
sapserviceorderservices Extension
The sapserviceorderservices extension contains services used for retrieving service orders from SAP Commerce database and making them available in
SAP Commerce. This extension provides two functionalities such as service order history (returns list of SearchPageData<ServiceOrderHistoryData>)
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 43/54
3/5/2020
and service orders details (returns ServiceOrderData).
Activation
To activate sapserviceorderservices extension, declare it in the localextensions.xml le. This extension also requires the commerceservices
and commercefacades extensions in the extensioninfo.xml le.
Spring De nition
</bean>
</bean>
The list of item types is de ned in the sapserviceorderservices-items.xml le for the service order extension.
Sort
The list of sort information can be provided from the below bean de nition.
The bean de nition maps the sort code with actual sort eld present in the service order model. This bean can be overridden with required sort value mapping.
Filter
You can pass list of lters at the time of fetching the list of orders. ServiceOrderFilterData contains lter key, value, and operator. The lter key is the
attribute quali er of service order type, and the lter value is the user input for that lter key. The order history service takes the list of
ServiceOrderFilterData to lter the order history data.
<bean class="com.sap.hybris.crm.sapserviceorderservices.data.ServiceOrderFilterData">
<property name="filterKey" type="String"/>
<property name="filterValue" type="String"/>
<property name="filterOperator" type="String"/>
</bean>
For example, if you want to lter out order history where service order type is order, you have to ll the ServiceOrderFilterData as below:
lterKey = “serviceOrderType”
lterValue= “order”
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 44/54
3/5/2020
lterOperator = “=”
Pagination
Pagination holds the information of current page, number of pages and total result count that can be shown in the SAP Commerce storefront.
Order Details
The order details function takes the input of order code and returns ServiceOrderData and it uses the serviceOrderDetailsConverter to populate
service order model data to ServiceOrderData.
To restrict the service order visibility, we have not implicitly passed the user information or unit information (B2B) to the service order services. This can be done
using search restriction on type service order as below.
Sample Code
B2B
INSERT_UPDATE
SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;b2bserviceorder_restriction;Restrict B2BUserGroup visibility for service orders;
({item:Unit} IN (?session.branch) OR ({item:Unit} is NULL AND {item:User}=?session.user));b2bgroup;ServiceOrder;true;true;
Sample Code
B2C
INSERT_UPDATE
SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;b2cserviceorder_restriction;Restrict Cutomer Group visibility for service orders;
({item:User}=?session.user);customergroup;ServiceOrder;true;true;
The above content can be imported using impex in your extension. This is not added as part of serviceorderservices extension.
sapcrmserviceorderaddon Addon
The sapcrmserviceorderaddon AddOn added the functionality of showing the list of service orders that are associated with customer (B2B and B2C) and
showing the details of each service order with scheduling information into the storefront.
AddOn De nition
A SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your implementation to the
features de ned in your contract license. In case of doubt, contact your sales representative.
Name sapcrmserviceorderaddon
Description Introduces the functionality of showing service order history and individual service
order details
acceleratorstorefrontcommons AddOn
sapserviceorderservices Extension
Controllers
Controller Description
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 45/54
3/5/2020
Controller Description
ServiceOrderController Handles displaying the list of service orders on the Service Order History page. The list
is populated with SearchPageData <ServiceOrderHistoryData> objects
returned by sapserviceorderservices and handles Service Order Details page.
The service order details page populates ServiceOrderData object returned by the
sapserviceorderservices Extension.For more information, see the
sapserviceorderservices Extension document.
Note
By default, the list of returned service orders is sorted by the code attribute. On the
storefront, you can also sort the list by the custom sort attribute which can be
con gured by bean. Pagination and ltering can be applied to the order history list.
For more information about pagination and ltering, see the
sapserviceorderservices Extension document. For order details and order history,
search restrictions can be applied to restrict the result. For more details, see the
sapserviceorderservices Extension document.
ImpEx
The service order history and details pages and all its subpages are imported into Commerce Accelerator using an ImpEx script:
Sample Code
cms-content.impex
To restrict the service order visibility, the user information or unit information (B2B) is not passed to the service order services. The visibility of the service orders
can be restricted using search restriction as below:
Sample Code
B2B
INSERT_UPDATE
SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;b2bserviceorder_restriction;Restrict B2BUserGroup visibility for service orders;
({item:Unit} IN (?session.branch) OR ({item:Unit} is NULL AND {item:User}=?session.user));b2bgroup;ServiceOrder;true;true;
Sample Code
B2C
INSERT_UPDATE
SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;b2cserviceorder_restriction;Restrict Cutomer Group visibility for service orders;
({item:User}=?session.user);customergroup;ServiceOrder;true;true;
This above content be imported using impex in your extension. This is added as part of this adddon extension.
CMS Components
This AddOn changes/adds the following CMS components:
ServiceOrderLink for navigating to the Service Order listing pages from My Account Page
ServiceOrderDetailsHeadlineComponent,ServiceOrderDetailsInfoComponent,ServiceOrderDetailShippingInfoComponent
and ServiceOrderDetailItemsComponent for resolving the actual JSPs to render the service order details
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 46/54
3/5/2020
AccountServiceOrderHistoryComponent for resolving the actual JSPs to render the service order history
1. Add the sapcrmserviceorderaddon AddOn to your localextensions.xml le, ensuring the following extensions are also included:
acceleratorstorefrontcommons
addonsupport
sapserviceorderservices
2. Before installation, modify the sapcrmserviceorderaddon.content.import.applicationtype property to install the AddOn in B2B or B2C
scenario or in both. Currently, this property is set as sapcrmserviceorderaddon.content.import.applicationtype=b2c,b2b to install this
AddOn in B2B or B2C storefront.
Note
The serviceOrderInitialDataSystemSetup le is added to import B2B or B2C speci c content. This le can be overridden based on custom
storefront.
4. Do the following:
On Microsoft Windows systems, execute setantenv.bat. Do not close the command window.
On Unix-related systems (such as Linux or Mac OS), execute setantenv.sh. Do not close the command window.
5. Install the sapcrmserviceorderaddon AddOn to your storefront extensions based on the yacceleratorstorefront template with the following
ant command:
When the installation is successful, the BUILD SUCCESSFUL noti cation is displayed in the command prompt.
Product Registration
Customers can register the products of their interest or the products that they have purchased, on the B2C storefront.
The product need not be purchased on the storefront to register it. Registering a product provides you access to product related information and updates, special
offers, promotions or other e-mail marketing communications, product support resources as well as warranty details.
Note
To register a product, the B2C customer must be registered on SAP CRM as well as SAP Commerce systems. The product to be registered must also be
replicated from SAP CRM to SAP Commerce.
Procedure
1. In Backoffice Administration Cockpit, navigate to SAP Integration RFC Destination , and create an RFC Destination for the SAP CRM back-end system.
2. On the SAP Base Store Con guration Product Con guration tab, specify the RFC destination for product registration.
If not speci ed, the RFC destination de ned on the Core Data tab will be used.
3. On the SAP Global Con guration Product Replication tab, add the sales area data for the B2C storefront.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 47/54
3/5/2020
Procedure
1. On the B2C storefront navigate to My Account Product Registration .
Product Registration page lists the products that have already been registered for the customer.
3. In the Product Details eld, enter product ID, product name or any other details relevant for the product.
4. Click Submit.
The product gets registered and it shows up in the list of registered products. An error message appears if the product is not available on the SAP CRM
system.
During product registration an RFC call is made to the back-end system, and the details of the registered product along with the sales area details of the
registered customer are recorded.
Note
Product Registration page is a template, and can be extended to add more elds, restrictions or validations as required.
Procedure
1. On the B2C storefront navigate to My Account Product Registration .
2. Click a row in the list to view the details of the registered product.
Product Details – details of the registered product like the product name and product code
General Details – details of the registration like the registration number, date of registration, and validity
Warranty Details – warranty information is displayed only if the sales area data is maintained
To activate the extensions, declare them in the localextensions.xml le. The extensions and AddOns for product registration are as follows:
productregistrationaddon AddOn
productregistrationservices Extension
productregistrationfacades Extension
sapcrmproductregistrationbol Extension
productregistrationaddon AddOn
The productregistrationaddon extension introduces to the storefront the functionality of registering new products, listing the registered products, and
viewing the details of existing product registrations.
AddOn De nition
Name productregistrationaddon
Description Introduces to the storefront the functionality of registering new products, listing the
registered products, and viewing the details of existing product registrations
Requires
addonsupport Extension
acceleratorcms Extension
acceleratorstorefrontcommons Extension
productregistrationfacades Extension
sapcorejco
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 48/54
3/5/2020
Controllers
Controller Description
ProductRegistrationPageController Handles displaying the list of product registrations on the Product Registrations page.
The list is populated with ProductRegistrationData objects returned by
ProductRegistrationFacade. For more information, see the
productregistrationfacades Extension document.
ImpEx
The Product Registration page and all its subpages are imported into the Commerce Accelerator using an ImpEx script.
Sample Code
cms-content.impex
#cms-content.impex
INSERT_UPDATE
ContentPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);label;defaultPage[default='true'];ap
CMS Components
This AddOn adds or changes the following CMS components:
AccountRegisterProductsHistoryComponent for navigating to the Product Registration listing page from My Account page
AccountRegisterProductsDetailsComponent and AccountAddRegisterProductsComponent for resolving the actual JSPs to render the results
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 49/54
3/5/2020
System setup class ProductRegistrationAddonSystemSetup is used in order to import the ImpEx les during the system update.
How to Install
1. Add the productregistrationaddon AddOn to your localextensions.xml le, ensuring that the listed required extensions are also included.
If you have renamed your storefront extension, you need to include the following web spring con guration to your local.properties le:
Sample Code
local.properties
<mystorefrontextensionname>.additionalWebSpringConfigs.myaddon=classpath:/myaddon/web/spring/myaddon-web-spring.xml
a. On Microsoft Windows systems, open the setantenv.bat le. Do not close the command window.
b. On Unix-based systems (such as Linux or Mac OS), run setantenv.sh by entering . ./setantenv.sh. Do not close the command window.
When the installation is successful, the BUILD SUCCESSFUL noti cation is displayed in the command prompt.
4. Initialize or update the server. If performing an update, make sure the following options are selected:
Localize types
productregistrationservices Extension
The productregistrationservices extension organizes functionality from one or more SAP Commerce platform services. It provides a generic Registration
API for creating a new product registration, getting the list of registered products, and fetching the details of registered products based on registration GUID.
Overview of Services
The following sections are a guide to all the services and service enhancements provided with the productregistrationservices extension. Dependencies
on extensions outside of the core platform are highlighted for your reference.
ProductRegistrationService
The following sections describe the catalog services of the commerceservices extension.
The ProductRegistrationService is responsible for creating, vieweing and listing the product registrations from the back-end system. It makes a call to the Business
Object Layer that in turn makes a call to the SAP CRM back-end system via JCO calls. The products that have been registered are not stored on the SAP Commerce
side. They are synchronously sent to SAP CRM. However this behavior can be customized by having a custom implementation for ProductRegistrationService.
Note
The default implementation adds a dependency to the sapcore and sapcorejco extensions.
getRegisteredProducts( nal String userID) Gets the list of already registered products
createProductRegistration( nal String productGuid, nal String customerID) Creates a product registration
getRegisteredProductByGuid( nal String registrationNumber, nal String Returns a registered product as a ProductRegistrationData object
customerID)
Sample Code
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 50/54
3/5/2020
@Override
public ProductRegistrationBO getProductRegistrationBO() {
return (ProductRegistrationBO) genericFactory
.getBean(ProductregistrationservicesConstants.SAP_PRDUCT_REGISTRATION_BO);
getProductMappingByCatalogVersion( nal CatalogVersionModel catalogVersion) Determines the SAP Product sales area to catalog mapping
Note
The sales area data is required while registering a new product. This is to associate warranty with the product registration. The warranty attached to the
products in the back-end system is speci c to the sales area data.
Sample Code
<alias alias="productRegistrationService" name="defaultProductRegistrationService"/>
<bean id="defaultProductRegistrationService" class="com.sap.hybris.productregistrationservices.service.impl.DefaultPro
<property name="productRegistrationDao" ref="productRegistrationDao"/>
<property name="sapCoreConfigurationService" ref="sapCoreConfigurationService"/>
<property name="productRegistrationBOFactory" ref="productRegistrationBOFactory"/>
<property name="productConverter" ref="productConverter"/>
<property name="baseStoreService" ref="baseStoreService"/>
</bean>
productregistrationfacades Extension
The productregistrationfacades extension provides a generic Registration API for creating a new product registration, getting the list of registered
products, and fetching the details of registered products based on registration GUID.
Facades
The Product Registration API is designed to be as generic as possible in order to allow easy customization. You can connect to any third party ticketing system by
simply creating your custom implementation of the ProductRegistrationFacade interface.
The ProductRegistrationFacade interface provides generic methods used for various operations on customer product registrations:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 51/54
3/5/2020
Services
The productregistrationfacades extension uses the default implementation of the ProductRegistrationService interface, the
DefaultProductRegistrationService class.
ProductRegistrationData
On the SAP Commerce side, the ProductRegistrationData object is de ned as a Spring bean in the
/productregistrationfacade/resources/productregistrationfacade-beans.xml le.
Sample Code
productregistrationfacade-beans.xml
<bean class="de.hybris.platform.productregistrationfacades.data.ProductRegistrationData">
<property name="registrationNumber" type="String"/>
<property name="product" type=" de.hybris.platform.commercefacades.product.data.ProductData"/>
<property name="validTo" type="java.util.Date"/>
<property name="validFrom" type="java.util.Date"/>
<property name="productCode" type="String"/>
<property name="registrationGuid" type="String"/>
<property name="user" type="de.hybris.platform.core.model.user.CustomerModel"/>
<property name="warrantyDescription" type="String"/>
<property name="warrantyStart" type="java.util.Date"/>
<property name="warrantyEnd" type="java.util.Date"/>
<property name="warrantyBasis" type="String"/>
</bean>
Sample Code
productregistrationfacades -spring.xml
sapcrmproductregistrationbol Extension
The sapcrmproductregistrationbol extension contains the BOL and back-end integration objects needed to work synchronously with product
registrations in the SAP CRM back end system.
Overview
This extension consists of entities representing the new registration, or the registration list search result in a user session. These objects are called BOL objects.
Their scope is limited to the user session.
In addition, there are back-end objects that establish the connection to the SAP CRM back end (see sapcrmproductregistrationbol-spring.xml).
These back-end objects have session scope as well.
All of these objects can be extended using standard spring techniques: Create a custom extension and create custom beans, most likely via subclassing the
standard implementations. Register the custom bean in a spring.xml le, and assign your custom bean to the alias registered for the standard implementation.
Sample Code
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 52/54
3/5/2020
The default implementation of ProductRegistrationBO invokes the back-end class that makes jco connection to the back end. The back-end class is determined by
generic factory wherein the back-end type is passed in resolution of the back-end class.
Sample Code
final ProductRegistrationBackend sapProductRegistrationBackend = (ProductRegistrationBackend) genericFactory
.getBean(PREFIX.concat(backendType));
Sample Code
private String getBackendType() {
String backendType;
final SAPRFCDestinationModel defaultDestination = this.baseStoreService.getCurrentBaseStore()
.getSAPConfiguration().getRegistrationRfcDestination();
if (null != defaultDestination) {
backendType = defaultDestination.getBackendType().getCode();
} else {
backendType = this.sapCoreConfigurationService.getBackendType();
}
return backendType;
}
The following table provides a description of the function modules, including their relevance for extensions.
CRM_HYBRIS_CREATE_IOBJECT Creates a product registration in SAP CRM system corresponding to the user. The
product GUID is passed as input parameter in addition to the sales area data and
division.The sales area data is fetched from the productToCatalogMapping de ned in
Global Con guration.
CRM_HYBRIS_GET_IOBJECT_LIST This RFC module is responsible for fetching the list of product registrations
corresponding to the user. The customer ID is passed as a parameter.
CRM_HYBRIS_GET_IOBJECT_DETAIL This RFC module gets the details of product registrations by GUID. It also fetches the
warranty details. However the warranty details will be fetched only if sales area data is
passed as a parameter whlle creating a new product registration.
Sample Code
Spring Con guration (sapcrmproductregistrationbol-spring.xml)
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 53/54
3/5/2020
The sapcrmproductregistrationbolextension controls the display of con guration settings for product registration in the Backoffice. The settings are part
of the SAP Base Store Con guration and are displayed on a dedicated tab. This tab contains the RFC destination for product registration to make call to the back-
end system.
Related Information
Making Settings in the Backoffice for Product Registration
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=7a7ae881235a4884b2dc547c41… 54/54