Integrations and Data Management: SAP Cloud For Customer Integration Module
Integrations and Data Management: SAP Cloud For Customer Integration Module
Integrations and Data Management: SAP Cloud For Customer Integration Module
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.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 1/99
3/5/2020
Customer Replication SAP Cloud for Customer Integration Architecture SAP Cloud for Customer Integration Implementation
Quote Replication
Ticket Replication
Customer Replication
The integration synchronizes customer data from SAP Commerce to SAP Cloud for Customer to connect customers with customer support agents.
Quote Replication
The integration replicates a B2B commerce quote created by the customer in SAP Commerce to SAP Cloud for Customer, for further processing and
actions.
Ticket Replication
The integration synchronizes customer service tickets from SAP Commerce to SAP Cloud for Customer.
Assisted Service Module Integration
An agent can click a link in the SAP Cloud for Customer system that quickly and seamlessly, using single sign-on, opens the Assisted Service Module on top
of the SAP Commerce storefront to allow the agent to provide seamless omni-commerce interactive sales and service support to the customer in real-time,
or off-line.
Data Privacy Management
Data privacy mechanisms for SAP Cloud for Customer integration help ensure that customers' personal data is handled appropriately.
Customer Replication
The integration synchronizes customer data from SAP Commerce to SAP Cloud for Customer to connect customers with customer support agents.
Once connected, agents can communicate with customers and resolve their needs using various communication channels.
Quote Replication
The integration replicates a B2B commerce quote created by the customer in SAP Commerce to SAP Cloud for Customer, for further processing and actions.
The sales representative can update and accept the quote in SAP Cloud for Customer. The updates in SAP Cloud for Customer gets replicated to SAP Commerce.
The customer can then edit, accept, or reject the quote in the SAP Commerce storefront.
Note
This content is only relevant if you have the latest Commerce Cloud Extension Pack, see Commerce Cloud Extension Pack. The Commerce Cloud Extension Pack
can only be used with SAP Commerce Cloud in the Public Cloud.
The replication of quote between the two systems can also be achieved using SAP Cloud Platform Integration and Integration Objects. For more information, see
Replicating Quote Between SAP Commerce and SAP Cloud for Customer.
Procedure
Override the following properties in the local.properties le, if required:
#Outbound properties:
c4c.quote.actioncode=04
c4c.quote.partner.defschemecode=918
c4c.quote.prod.schedulelineid=0001
c4c.quote.prod.schedulelinetypecode=1
c4c.quote.text.header.typecode
c4c.quote.erp.logicalsystemid
c4c.quote.cancelcode=04
c4c.quote.order.typecode
c4c.quote.btdreference.typecode
c4c.quote.header.text.actioncode
c4c.quote.header.itemcompletetransmissionindicator=true
c4c.quote.header.businesstransactiondocumentreferencecompletetransmissionindicator=true
c4c.quote.header.otherpartylistcompletetransmissionindicator=true
c4c.quote.header.salesemployeepartylistcompletetransmissionindicator=true
c4c.quote.header.predecessorindicator=true
c4c.quote.header.textlistcompletetransmissionindicator=false
c4c.quote.item.itemcustomdefinedpartylistcompletetransmissionindicator=true
c4c.quote.item.create.schedulelinecompletetransmissionindicator=true
c4c.quote.item.update.schedulelinecompletetransmissionindicator=false
c4c.quote.item.actioncode=04
datahub.c4c.quote.exportURL=<quote replication webservice endpoint of c4c>
datahub.c4c.quote.userName=
datahub.c4c.quote.password=
datahub.c4c.quote.approval.exportURL=<quote approval notification webservice endpoint of c4c>
datahub.c4c.senderParty.schemeID.SAPC4CQUOTE_OUTBOUND_POOL= senderPartyID
datahub.c4c.senderParty.internalID.SAPC4CQUOTE_OUTBOUND_POOL= senderInternalID
datahub.c4c.senderParty.schemeAgencyID.SAPC4CQUOTE_OUTBOUND_POOL=310 (change as per your system)
datahub.c4c.recipientParty.schemeID.SAPC4CQUOTE_OUTBOUND_POOL=recipientSchemeID
datahub.c4c.recipientParty.internalID.SAPC4CQUOTE_OUTBOUND_POOL=recipientInternalID
datahub.c4c.recipientParty.schemeAgencyID.SAPC4CQUOTE_OUTBOUND_POOL=310(change as per your system)
#Inbound properties:
c4cQuote.range
c4cquote.state=BUYER_OFFER
c4cquote.baseStoreUid=powertools
c4cquote.baseSiteUid=powertools
c4cquote.confirmation.state=SELLER_REQUEST
c4cquote.sellerTypeCode
c4cquote.priceTypeCode
c4cquote.salesgroup
c4cquote.commentTypes
Procedure
1. Create an SAP Base Store Con guration. See Creating an SAP Base Store Con guration.
3. On the Common Settings tab, con gure Sales Organization, Distribution Channel, and Division.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 3/99
3/5/2020
7. Push the con gurations to Data Hub (execute this step after Data Hub setup is done).
Ticket Replication
The integration synchronizes customer service tickets from SAP Commerce to SAP Cloud for Customer.
Once the tickets are synchronized, agents can communicate with customers and resolve their needs via the SAP Commerce Customer Ticketing System, or in real-
time by contacting over the phone.
Sales agents using the SAP Commerce storefront can search and browse the online catalog to look up product information, con gure product bundles, add
products to carts, create quotes, or even check carts out for customers on their behalf. They can also help a customer with their account information, such as their
payment details, existing orders, delivery address and so on. This enables your sales force and service team to provide interactive selling and service to your
customers on the spot, improves the customer relationship, and makes the service and sales process more efficient.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 4/99
3/5/2020
Users can ask for deletion of their personal data. In addition, data can also automatically be deleted after a certain retention period to accommodate the user's
right to be forgotten.
SAP Commerce integration with SAP Cloud for Customer uses the pool data management structure to automatically delete the stale data from your Data Hub data
pools. For more information, seeCon guring Data Pools for Automatic Data Deletion.
As part of SAP Cloud for Customer integration, a deletable ag is added to the c4cquote-canonical extension and the following pools:
SAPC4CQUOTE_INBOUND_POOL
SAPC4CQUOTE_OUTBOUND_POOL
Master and transactional data replicated to SAP C4C is stored in SAP Commerce. When such master and transactional data is deleted from SAP Commerce,
manual deletion of any corresponding data in SAP C4C is required.
Dependencies
The module structure along with the dependencies looks as follows:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 5/99
3/5/2020
Recipes
The following recipes contain the SAP Cloud for Customer integration module:
b2c_c4c
b2b_c4c
Note
These recipes are relevant only for replication scenarios involving Data Hub.
Extensions
The SAP Cloud for Customer integration consists of the following extensions:
c4ccustomer Extension
The c4ccustomer extension handles sending customer data from the Commerce Platform to Data Hub.
c4cquote Extension
The c4cquote extension sends quote data from SAP Commerce to C4C and vice versa.
sapc4ccustomerb2c Extension
The sapc4ccustomerb2c extension automatically replicates B2C customer data to SAP Cloud Platform Integration when customers register in the
online store.
customerticketingc4cb2bintegration Extension
The customerticketingc4cb2bintegration extension allows to expose the functionality of the Customer Ticketing Module's C4C integration to
the B2B Accelerator.
customerticketingc4cintegration Extension
The customerticketingc4cintegration extension allows for the integration of Customer Ticketing System with the SAP Cloud for Customer
system.
c4c-integration Data Hub Extensions
The c4c-integration Data Hub extensions integrate customer data from the Commerce Platform to the SAP Cloud for Customer system via Data Hub.
c4ccpiquote Extension
c4ccustomer Extension
The c4ccustomer extension handles sending customer data from the Commerce Platform to Data Hub.
Note
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 6/99
3/5/2020
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, please contact your sales representative.
General
The c4ccustomer extension provides the services used to transfer customer-related data from the Commerce Platform to the datahubadapter extension. For
more information, see The Data Hub Adapter. The module changes the following DTOs:
If customer does not exist in SAP Cloud for Customer, a new record is created.
2. Always send the complete customer record from SAP Commerce, not just the changed data of a customers record.
The dataSetup bean is de ned in c4ccustomer/resources/c4ccustomer-spring.xml le. This class is marked with @SystemSetup annotation as
installing essential data. For ATDD tests, there is also c4cIntegrationServer bean de ned in
c4ccustomeratddtests/resources/c4ccustomeratddtests-spring.xml and it runs war le with c4c-integration.
You can send a request to synchronize customers. The request triggers synchronization on SAP Cloud for Customer side.
Headers
X-tenantId:single
Content-Type:application/json
Accept:application/json
Request Body
{
"syncExecutionId": "dc49aa81-0eec-49ca-8c51-7438dcabe0df",
"dataStreams" : [
{
"itemType": "Customer",
"columns": "uid;customerId;firstName",
"urls": [
"http://localhost:9001/medias/Customer-5ffdf3cb-0272-4988-9b2a-ffe6efd1d7d5?context=anVuaXR8cm9vdHw5MHx0ZXh0L3BsYWlufGh\
hYy9oOTUvODc5NjA5MzMxNzE1MC50eHR8MGRkMzJjMmZmNmU1MDk5Y2I5YzcxZDZjYjdlMmJlYjQ4MjllMzcxYTRhZDk3ZGI1YTcwMTkxNGU2MWZhZTI3OQ"
]
}
]
}
Where:
dataStreams is a list of streams to be synchronized. Streams for c4ccustomer are de ned in c4ccustomer/resources/impex/c4cdata-
streams.impex:
columns is a header line for csv les and it de nes the order of attributes
urls is a list of urls for medias. These medias are CSV les for items/objects to be updated/synchronized
Some mandatory options are de ned in c4ccustomer/project.properties and for ATDD tests:
c4ccustomeratddtests/project.properties.
y2y sync
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 7/99
3/5/2020
To start the synchronization process, you have to trigger c4cSyncToDataHubCustomersCronJob and c4cSyncToDataHubAddressesCronJob or run a
script c4cSync via Backoffice. For more information about synchronization process, see Synchronization Between SAP Commerce Installations. All changes made
in customer and customer's address models since the last synchronization or since model creation, if synchronization is being called for the rst time, are split in
chunks and stored in media models. All the chunks are sent to Data Hub as a URL to appropriate media models.
The RemoveVersionMarker script erases information about current synchronization state. After calling it, next synchronization session counts all existing
customers and addresses as newly created and loses information about model removal.
Data Synchronization
When the customer or address is created, updated, or deleted, the following action is performed.
The similar to Y2YSyncMasterJobPerformable class is created. The class is called C4CSyncJobPerformable and handles the customer and address models. You
can con gure this class via impex le, but it can work only with composed type Customer and Address. The main task of this class is to provide to Data Hub full
set of data, customer with related addresses, when the data in any of the models is updated. The helper collector class DefaultC4CAggregatingCollector fetches
related models and passes them to batching collectors with a respect to the model types. The changes are received immediately and the data is not resent, which
means that the information can be lost in case of network issues. If an address is deleted, the system sends owner customer with remaining addresses. If a
customer is deleted, the system skips it as well as related addresses, so the customer remains unchanged on SAP Cloud for Customer side. If an address changes,
the implementation sends its parent customer. If a customer item changes, the implementation sends the customer and all their addresses.
Implementation Details
The system stores owner customer's primary key in info eld of address ItemChangeDTO.
The duplicated change records can occur and it is related to trade-off batching. This issue is constrained by using a DefaultC4CAggregatingCollector. Data Hub
handles duplicated items correctly, it can only stress a network.
Component diagram
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 8/99
3/5/2020
Related Information
c4c-integration-raw Extension
c4c-integration-canonical Extension
c4c-integration-target Extension
c4c-integration-soap-adapter Extension
Data Hub
Synchronization Between SAP Commerce Installations
c4c-integration Mapping
The SAP Commerce c4ccustomer extension handles sending customer data from the Commerce Platform to the SAP Commerce Data Hub.
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, please contact your sales representative.
General
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d75… 9/99
3/5/2020
c4ccustomer c4c-integration
Custom er Custom erRawItem Custom erCanonicalItem Custom erlItem
c ustomerID c ustomerId c ustomerId c ustomerId
isDefaultAddress
Address AddresRawItem AddressCanonicalItem
pk addressId addressId addressId
c ellphone c ellphone
Customer: Address
Platform Side
Customer:
addresses
For example
customerId,name,email,billingAddressId,shippingAddressId,addresses
jd8,JohnDoe,[email protected],A1,A2,"A1,A2,A3"
addresses
addresses
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 10/99
3/5/2020
This is a comma-separated list of addresses IDs. It is only used during DefaultC4cSoapPublisher preprocessing and to compute complete sets of customers
and addresses.
Customer: name
Platform Side
Customer:
name
rstname
lastname
Multiple scenarios are implemented because the SAP Commerce handles only one eld for a name, and SAP Cloud for Customer handles two elds: rstName and
lastName. The following scenarios are possible:
Scenario 1
Scenario 1:
- firstName: John
- lastName: Doe
Result:
- firstname: John (if there is a lastName, use the whole firstName)
- lastname: Doe (if there is a lastName, use the lastName)
Scenario 2
Scenario 2:
- firstName: John Doe
- lastName:
Result:
- fistname: John (if there is no lastName, then use the whole firstName, but without the last word)
- lastname: Doe (if there is no lastName, then use the last word of firstName)
Scenario 3
- fisrtName: John
- lastName:
Result:
- firstname: John (if there is no lastName and if there is no whitespace in fisrtName, then use the whole firstName)
- lastname: (if there is no lastName and if there is no whitespace in firstName, then assign a null value)
name
lastname
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 11/99
3/5/2020
For the c4c-soap-adater extension, these SAP Cloud for Customer tags are created out of the target items:
c4c-soap-adatper
<BusinessPartner actionCode="04"
addressInformationListCompleteTransmissionIndicator="true"
roleListCompleteTransmissionIndicator="true"
identificationListCompleteTransmissionIndicator="true"
industrySectorListCompleteTransmissionIndicator="true"
commonListCompleteTransmissionIndicator="true">
<Common actionCode="04">
<ReleasedIndicator>true</ReleasedIndicator>
<BlockedIndicator>false</BlockedIndicator>
<DeletedIndicator>false</DeletedIndicator>
<Person>
<Name>
<GivenName>John</GivenName> <--- CustomerItem.name
<FamilyName>Doe</FamilyName> <--- CustomerItem.lastname
</Name>
</Person>
</Common>
</BusinessPartner>
Platform Side
Customer:
shippingAddressId
billingAddressId
shippingAddressId
billingAddressId
defaultAddressId
Note
The mapping between shippingAddressId and defaultAddressId is made because the platform y2ysync con g is not able to handle a mapping between a
platform column and multiple Data Hub columns.
isShippingAddress
isBillingAddress
isDefaultAddress
The way the information between CustomerCanonicalItem and AddressItem are mapped:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 12/99
3/5/2020
isBillingAddress: compares the value between AddressItem.addressId against CustomerCanonicalItem.billingAddressId
For the c4c-soap-adater extension, the following SAP Cloud for Customer tags are created out of the target items:
Depending on the ags, an Address can be marked with one, two, or three ags:
isDefaultAddress = true
...
</<AddressInformation>
isShippingAddress = true
...
</<AddressInformation>
isBillingAddress = true
...
</<AddressInformation>
...
</<AddressInformation>
Platform Side
Customer:
Address:
Customer:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 13/99
3/5/2020
Address:
Customer:
Address:
Customer:
Address:
Scenario 1
Endpoint email address is taken from AddressItem target item, if it is populated by email Address, otherwise it is taken from CustomerItem target item if exists.
Email address and postal address is a part of the Address information. If there is no email address on AddressItem or CustomerItem target item, email xml tag is
not created.
CustomerRawItem
customerId,name,email,billingAddressId,shippingAddressId,addresses
id1,John Doe,[email protected],,A1,"A1"
AddressRawItem
addressId,town,country,postalCode,streetName,streetNumber,phone1,phone2,cellphone,fax,email,customerId
A1,MUNICH,DE,80636,Nymphenburgerstr.,86,089898989,,017676767676,,[email protected],id1
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<AddressUsage actionCode="04">
<AddressUsageCode>BILL_TO</AddressUsageCode>
</AddressUsage>
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04"
eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI>
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode>
<CityName>MUNICH</CityName>
<StreetPostalCode>80636</StreetPostalCode>
<StreetName>Nymphenburgerstr.</StreetName>
<HouseID>86</HouseID>
</PostalAddress>
</Address>
</AddressInformation>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 14/99
3/5/2020
Scenario 2
In the case that there is no Addresses assigned to the Customer, additional Address Information is created containing information only about the email address, if it
exists. Customer Raw item looks like:
CustomerRawItem
customerId,name,email,billingAddressId,shippingAddressId,addresses
id1,John Doe,[email protected],,,
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04"
eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI>
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
</Address>
</AddressInformation>
Scenario 3
In the case that Customer email address is different than any of the Address email address, additional Address Information is created containing information only
about the email address. Customer and Address Raw items look like:
CustomerRawItem
customerId,name,email,billingAddressId,shippingAddressId,addresses
id1,John Doe,[email protected],A1,A2,"A1,A2"
AddressRawItem
addressId,town,country,postalCode,streetName,streetNumber,phone1,phone2,cellphone,fax,email,customerId
A1,MUNICH,DE,80636,Nymphenburgerstr.,86,089898989,,017676767676,,[email protected],id1
A2,BERLIN,DE,10245,Berliner.,87,033333333,,017575757575,,[email protected],id1
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04"
eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI>
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<AddressUsage actionCode="04">
<AddressUsageCode>BILL_TO</AddressUsageCode>
</AddressUsage>
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04"
eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI>
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
<PostalAddress actionCode="04">
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 15/99
3/5/2020
<CountryCode>DE</CountryCode>
<CityName>MUNICH</CityName>
<StreetPostalCode>80636</StreetPostalCode>
<StreetName>Nymphenburgerstr.</StreetName>
<HouseID>86</HouseID>
</PostalAddress>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<AddressUsage actionCode="04">
<AddressUsageCode>XXDEFAULT</AddressUsageCode>
</AddressUsage>
<AddressUsage actionCode="04">
<AddressUsageCode>SHIP_TO</AddressUsageCode>
</AddressUsage>
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04"
eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI>
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode>
<CityName>BERLIN</CityName>
<StreetPostalCode>10245</StreetPostalCode>
<StreetName>Berliner.</StreetName>
<HouseID>87</HouseID>
</PostalAddress>
</Address>
</AddressInformation>
hybris Platform:
Customer1:
email: [email protected]
C4C:
Customer1:
A0: <-- this is the empty AddressInformation tag.
email: [email protected]
hybris Platform:
Customer1:
email: [email protected]
Address1:
email: [email protected]
city: MUC
Address2:
email: [email protected]
city: BER
C4C:
Customer1:
Address0: <-- this is empty AddressInformation tag.
email: [email protected]
Address1:
city: MUC
email: [email protected]
Address2:
city: BER
email: [email protected]
Scenario 2b: One or more physical addresses with email addresses, with the customer email being present in at least one physical address.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 16/99
3/5/2020
hybris Platform:
Customer1:
email: [email protected]
Address1:
email: [email protected]
city: MUC
Address2:
email: [email protected]
city: BER
C4C:
Customer1:
Address1:
city: MUC
email: [email protected]
Address2:
city: BER
email: [email protected]
hybris Platform:
Customer1:
email: [email protected]
Address1:
email:
city: MUC
Address2:
email:
city: BER
C4C:
Customer1:
Address1:
city: MUC
email: [email protected]
Address2:
city: BER
email: [email protected]
Platform Side
Address:
phone1
phone2
cellphone
fax
phones
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 17/99
3/5/2020
cellphone
fax
AddressPhonesCompositionHandler composition handler is added. The composition handler takes phone1 and phone 2 from AddressRawItem and creates a
comma-separated list in AddressCanonicalItem.phones, for example: 123456,789076. This composition handler is con gured in the following spring le: c4c-
integration-raw/src/main/resources/META-INF/c4c-integration-raw-datahub-extension-spring.xml.
phones
cellphone
fax
For the c4c-soap-adater extension, these SAP Cloud for Customer tags are created out of the target items:
One or zero <Telephone> tag with MobilePhoneIndicator=true for the AddressItem.cellphone attribute
c4cquote Extension
The c4cquote extension sends quote data from SAP Commerce to C4C and vice versa.
The c4cquote extension provides the action, listener, helper, and contributors used to transfer quote data from the SAP Commerce to the datahubadapter
extension and vice versa. The datahubadapter extension is responsible for the communication between the SAP Commerce platform and Data Hub.
Dependencies
The c4cquote extension depends on the following extensions:
commerceservices
saporderexchange
b2bcommerce
Outbound Processing
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 18/99
3/5/2020
The outbound functions are split into the following parts:
C4CQuoteBuyerSubmitEventListener is red when a quote is created in B2B storefront. The quote is saved in the database (DB) and then C4C
quote process is initiated.
C4CQuoteCancelEventListener is red when a quote is canceled in B2B storefront. The quote is saved in the database (DB) and then C4C quote
cancel process is initiated.
C4CQuoteBuyerOrderPlacedEvent is created when customer accepts and creates order from a processed quote in B2B storefront.
C4CQuoteBuyerOrderPlacedEventListener is red when a quote is accepted and ordered in B2B storefront. The quote is saved in the database
(DB) and then C4C quote ordered process is initiated.
C4CCheckQuoteAction fetches the quote from the DB and initiate the process of sending QuoteModel to
DefaultSendQuoteToDataHubHelper.
CheckC4CQuoteIDAction fetches the quote from the DB and checks if C4C Quote ID is available in QuoteModel.
SendQuoteToDataHubAction fetches the quote from the DB and initiates the process of sending QuoteModel to
DefaultSendQuoteToDataHubHelper.
The orchestration of raw item creation and handover to Data Hub adapter is done by the SendToDataHubHelper interface implemented by
AbstractSendToDataHubHelper. For c4cquote outbound , AbstractSendToDataHubHelper is DefaultSendQuoteToDataHubHelper.
The creation of a Data Hub raw item is offered by the RawItemBuilder interface provided by saporderexchange extension. In the provided
implementation, this is implemented by AbstractRawItemBuilder. The AbstractRawItemBuilder is the super class of all raw item speci c
builders. For the c4cquote outbound, the AbstractRawItemBuilder is DefaultRawQuoteBuilder (which creates raw data for c4cquote
replication and c4cquote approval noti cation to the SAP back-end).
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 19/99
3/5/2020
<ref bean="c4cQuoteCommentContributor"></ref>
</list> </property>
</bean>
The AbstractRawItemBuilder has a list of references to RawItemContributor instances. A RawItemContributor provides a speci c part of a
Data Hub raw item as a list of name and value pairs. The list of contributors to a raw item is injected via Spring into the corresponding raw item builder.
Following are the contributors for quote and quote approval noti cation:
DefaultQuoteApprovalContributor: Provides quote information required for sending approval noti cation.
The DefaultC4CQuoteService overrides existing submitQuote and cancelQuote functionality of DefaultCommerceQuoteService. The
submitQuote creates C4CQuoteBuyerSubmitEvent and cancelQuote creates C4CQuoteCancelEvent instead of default commerce events.
Inbound Processing
The inbound functions are split into the following parts:
Updated quote is replicated to SAP Commerce from C4C . CSVCellDecorator is used to update the CSV input of c4cquote from Data Hub. For
C4Cquote, following cell decorators are used.
QuoteCommentCellDecorator: This decorator fetches the comment row from the ImpEx and creates header comment for an existing quote.
QuoteVersionCellDecorator: This decorator adds the quote version to the quote. Version 1 is added if the quote does not exist, otherwise
incremental quote version is used.
QuoteVersionResolutionCellDecorator: This decorator adds the quote version to the quote entry.
UpdateQuoteCellDecorator: This decorator adds the latest quote version while updating the quote.
PreviousQuoteCommentCellDecorator: This decorator fetches comments information from previous quote version for a quote.
QuoteConfirmationVersionCellDecorator: This decorator is used for creating a snapshot of quote and returns version of created quote.
QuoteEntryNumberCellDecorator: This decorator is used for adding leading zeros if required in quote code.
QuoteGuidCellDecorator: This decorator is used for setting the GUID of the quote from previous quote version.
QuoteNameCellDecorator: This decorator is used for setting the name of the quote coming from C4C.
QuotePkCellDecorator: This decorator is used for returning quote primary key (PK).
QuotePreviousEstimatedTotalDecorator: This decorator is used for decorating the quote previous estimated totals.
Helpers are used by CSVCellDecorators for interacting with services to get data from the database. For C4C, the following helpers are used.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 20/99
3/5/2020
InboundQuoteVersionControlHelper: To get quote details such as version.
C4CQuoteBuyerSubmitEventListener is red when a buyer accepts the quote and an order is created. This listener updates the status of the quote.
sapc4ccustomerb2c Extension
The sapc4ccustomerb2c extension automatically replicates B2C customer data to SAP Cloud Platform Integration when customers register in the online store.
Note
You can preferably, use outboundsync cron jobs to schedule automatic replication of customer data. If you choose to implement this method, ensure that the
ag sapc4ccustomerb2c.customer.cpi.replicate is set to false. This disables the method documented below and avoids con ict. See Con gure
SAP Commerce Backoffice.
When a customer registers in the online store, a registration event is caught, and the sapC4cPublishProcess business process is started in the
sapC4cCustomerRegistrationEventListener to control the data transfer.
While starting a new business process, you must de ne it. This allows you to manage the process in Backoffice by checking the status or re-sending the data.
To allow customers to change their own data, two interceptors send the changed data to publication service which further sends it to SAP Cloud Platform
Integration: one for the customer update, and another for the address create, update and delete.
<bean id="sapC4cCustomerInterceptorMapping"
class="de.hybris.platform.servicelayer.interceptor.impl.InterceptorMapping">
<property name="interceptor" ref="sapC4cCustomerInterceptor" />
<property name="typeCode" value="Customer" />
<property name="order" value="5000" />
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 21/99
3/5/2020
</bean>
<bean id="sapC4cAddressInterceptorMapping"
class="de.hybris.platform.servicelayer.interceptor.impl.InterceptorMapping">
<property name="interceptor" ref="sapC4cAddressInterceptor" />
<property name="typeCode" value="Address" />
<property name="order" value="5000" />
</bean>
The customer interceptor is called after a customer attribute is changed. This interceptor checks the following:
If criteria is ful lled, the customer and all customer addresses are replicated.
The address interceptor is called after any change in customer’s addresses. This interceptor checks the following:
If all three criteria are ful lled, the customer and all customer addresses are replicated.
The data is sent to SAP Cloud Platform Integration in JSON format. The following Data Transfer Objects are created for generating JSON data:
C4CCustomerData
C4CHeaderData
C4CAddressData
C4CAddressPhoneData
If there are any changes in customer and address, both interceptors create C4CCustomerData object with the help of two populators and triggers
SapC4cCustomerUpdateEvent event. The SapC4cCustomerUpdateEventListener handles update events created and sends to the publication
service.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 22/99
3/5/2020
class="com.sap.hybris.c4c.customer.util.SapC4cCustomerUtils">
<property name="addressPopulator" ref="sapC4cAddressPopulator" />
<property name="customerPopulator" ref="sapC4cCustomerPopulator" />
<property name="configurationService" ref="configurationService" />
</bean>
Con guration
For more information on con gurations, see Integration Using SAP Cloud Platform Integration.
customerticketingc4cb2bintegration Extension
The customerticketingc4cb2bintegration extension allows to expose the functionality of the Customer Ticketing Module's C4C integration to the B2B
Accelerator.
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, please contact your sales representative.
General
The customerticketingc4cb2bintegration extension contains only one element - the Y2C4CB2BTicketPopulator class. When the
customerticketingc4cb2bintegration extension is present in the localextensions.xml le, the system adds the Y2C4CB2BTicketPopulator
to the list of populators.
Name Description
Y2C4CB2BTicketPopulator <SOURCE extends TicketData, TARGET This populator is used for populating the ServiceRequestData objects with
extends ServiceRequestData> information upon sending requests to the C4C system:
ExternalContactID customerId
ExternalCustomerID businessUnitId
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 23/99
3/5/2020
project.properties
Property Description
Note
Site ID as present in your hosts le, for example:
customerticketingc4cintegration.siteId.electronics
customerticketingc4cintegration.siteId.powertools
Note
Type
Depending whether a storefront is b2c or b2b, different parameters are sent to the
C4C system.
b2c
customerId
b2b
businessUnit
customerId
For more information about the different properties used to integrate SAP Commerce with the C4C system, see customerticketingc4cintegration Extension.
Related Information
customerticketingc4cintegration Extension
customerticketingfacades Extension
http://help.sap.com/cloud4customer
customerticketingaddon AddOn
customerticketingc4cintegration Extension
The customerticketingc4cintegration extension allows for the integration of Customer Ticketing System with the SAP Cloud for Customer system.
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, please contact your sales representative.
Prerequisites
URL
For all the REST calls described in this section, use the following URL pattern: https://{<HOSTNAME}>:
{<PORT}>/sap/byd/odata/v1/yserviceticket/ServiceTicketCollection, for example: https://{HOSTNAME}:
{PORT}/sap/byd/odata/v1/yserviceticket/ServiceTicketCollection
Note
In this document, the REST call URLs are provided starting from the /yserviceticket/ section of the entire URL. Make sure to modify the URL in your REST
client.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 24/99
3/5/2020
REST Headers
Before invoking the REST APIs you need to provide proper HTTP header parameters. The following table describes the parameter names and the values associated
to them.
Note
All header parameters have static values with the exception of the x-csrf-token parameter, which has a dynamic value. For information on how to con gure
headers, see the Con guring Headers section of this document.
x-csrf-token The x-csrf-token returned from an initial REST call. In order to nd out how to obtain this token, see the x-
csrf-token section of this document.
Note
Even though the token may be valid for some period
of time, it is advisable to issue a GET request fetching
the token prior to sending create/display/update
requests.
set-cookie sap-usercontext
Note
This header is returned as a part of the response to
the initial REST call.
set-cookie SAP_SESSIONID_<<host>>_<<tenant>>
x-csrf-token
To obtain the x-csrf-token, do the following:
1. Send a GET request to the following URL: /yserviceticket/ServiceTicketCollection?$top=1. Make sure to include the following header:
x-csrf-token fetch
x-csrf-token:YourToken
That is your token. Make sure that is it included in the header of the remaining REST calls present in this document.
customerticketingc4cintegration.c4c-url=https://{HOSTNAME}:{PORT}/sap/byd/odata/v1/yserviceticket/ServiceTicketCollection
customerticketingc4cintegration.c4c-token-url-suffix=?$top=1
customerticketingc4cintegration.c4c-accept=Application/json
customerticketingc4cintegration.c4c-username-naming=Username
customerticketingc4cintegration.c4c-password-naming=Password
customerticketingc4cintegration.c4c-username=YOUR_USERNAME
customerticketingc4cintegration.c4c-password=YOUR_PASSWORD
customerticketingc4cintegration.c4c-token-naming=x-csrf-token
customerticketingc4cintegration.c4c-site-header=c4c-odata-businessSystemID
customerticketingc4cintegration.c4c-token-empty=fetch
customerticketingc4cintegration.c4c-expand-suffix=$expand=Notes,RelatedTransactions
customerticketingc4cintegration.c4c-update-message-suffix=/ServiceRequestTextCollection
For more information on the properties, see the project.properties section below.
project.properties
The following table provides a description of each property:
Property Description
Note
Default Value
?$top=1
customerticketingc4cintegration.c4c-url URL to the SAP Cloud for Customer REST service, for example:
https://somehostname/sap/byd/odata/v1/yserviceticket
Note
C4C-speci c Information
For more C4C-related technical information about your integration, contact an SAP
representative.
Note
Default Value
/ServiceRequestTextCollection
customerticketingc4cintegration.c4c-expand-suffix Suffix used to construct an URL to the SAP Cloud for Customer server.
Note
Default Value
$expand=Notes,RelatedTransactions
customerticketingc4cintegration.siteId.{siteid} A unique ID necessary for the SAP Cloud for Customer integration.
Note
Site ID as present in your hosts le, for example:
customerticketingc4cintegration.siteId.electronics
customerticketingc4cintegration.siteId.powertools
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 26/99
3/5/2020
Property Description
Note
Type
Depending whether a storefront is b2c or b2b, different parameters are sent to the
SAP Cloud for Customer solution.
b2c
customerId
b2b
businessUnit
customerId
Note
Default Value
/$batch
customerticketingc4cintegration.c4c-ticket-suffix Suffix used to construct an ticket-related call to the SAP Cloud for Customer server.
Note
Default Value
/ServiceTicketCollection
Note
Note that in order for these properties to be used, you need to copy them to the local.properties le.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 27/99
3/5/2020
Populators
The following table describes the populators:
Name Description
C4C2YTicketPopulator<SOURCE extends ServiceRequestData, TARGET Part of the ticketConverter Spring bean used to map data elds from an SAP
extends TicketData> ServiceRequestData object to an SAP Commerce TicketData object. For more
information on the mappings, see the C4C - SAP Commerce Object Parameter
Mappings section below.
Y2C4CTicketPopulator<SOURCE extends TicketData, TARGET extends Part of the c4cTicketConverter Spring bean used to map data elds from an SAP
ServiceRequestData> Commerce TicketData object to an SAP ServiceRequestData object. For more
information on the mappings, see the SAP Cloud for Customer - SAP Commerce
Object Parameter Mappings section below.
Y2TicketMessageUpdatePopulator <SOURCE extends TicketData, Part of the messageUpdatePopulator Spring bean used to convert a
TARGET extends ServiceRequestTextData> hybrisDataObject (TicketData) to a TicketMessageUpdateRequest object
(Note).
C4C2YTicketEventsPopulator Part of the c4cTicketEventPopulator Spring bean used to populate the elds of
SAP Commerce ticket objects.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 28/99
3/5/2020
SAP Cloud for Customer ServiceRequestData Object Parameter SAP Commerce C4CTicketData Object Parameter
ExternalCustomerID customerId
Note
This parameter is passed in b2c calls.
ExternalContactId customerId
Note
This parameter is passed in b2b calls.
ExternalCustomerId businessUnitId
Note
This parameter is only passed in b2b calls.
Name subject
ObjectID id
StatusCode statusId
CreationDateTime creationDate
Note messageHistory
Note
Upon retrieving a ticket from SAP Cloud for Customer, all notes are concatenated
into a message history.
RelatedTransaction.Id cartId
Facades
There are two facades implemented in the customerticketingc4cintegration extension. You can choose to use a mock implementation of the SAP Cloud
for Customer ticket facade, or the integration facade which sends actual calls to SAP Cloud for Customer. You can con gure which facade to use by changing the
value of the customerticketingc4cintegration.facade.mock property. Setting this property to true results in using the mock implementation and
setting it to false results in using the SAP Cloud for Customer integration facade.
Note
If no customerticketingc4cintegration.facade.mock property is found in the local.properties le, the getTicketFacade() method of
the TicketFacadeFactory class returns the mock implementation as the default facade.
C4CTicketFacadeImpl
This class overrides all the methods from the TicketFacade interface. For more information on the interface, see customerticketingfacades Extension. This class
is responsible for the actual communication with the SAP C4C system. For more information on the calls to SAP Cloud for Customer, see the SAP Cloud for
Customer Request and Response Templates section of this document.
C4CTicketFacadeMock
This class also overrides all the methods from the TicketFacade interface, but unlike the C4CTicketFacadeImpl, this class does not communicate with the
SAP Cloud for Customer. Instead, the C4CTicketFacadeMock class returns mock data taken from the following les located in the
resources/customerticketingc4cintegration/c4cjson/response directory:
create.json
details.json
listing.json
update.json
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 29/99
3/5/2020
Upon calling any of the methods relating to operations on tickets, the data taken from the les above is converted from JSON to TicketData objects understood
by SAP Commerce.
Note
Make sure to send the REST calls to the proper URLs and with the proper headers. For more information, see the Prerequisites section of this document.
createTicket()
Request Body
URL: /yserviceticket/ServiceTicketCollection
{
"ExternalCustomerID": "RK1",
"ExternalContactID":"RKCONT1",// only in b2b case
"Name": "Test Ticket Name",
"RelatedTransactions": [{
"ID": "1111111111111111",
"TypeCode": "2085",
"RoleCode" : "1",
"BusinessSystemID": "HYBRISINT"
}],
"Notes": [{
"LanguageCode": "EN",
"Text": "Test Ticket Message",
"TypeCode": "10004"
}]
}
Response Body
{"d": { "results": {
...
"CreationDateTime": "\/Date(1436955740981)\/",
"CustomerID": "1170962",
"DataOriginTypeCode": "4",
"ExternalContactID": "",
"ExternalCustomerID": "",
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 30/99
3/5/2020
"ID": "2364",
"LastChangeDateTime": "\/Date(1436955740981)\/",
"Name": "Test Tikcet Name",
"ObjectID": "00163E0830221EE58ADB6B677EFC3606",
"StatusCode": "1",
"Notes": {
"__deferred": {
"uri": "https://{HOSTNAME}:{PORT}/sap/byd/odata/v1/yserviceticket/ServiceTicketCollection('00163E0830221EE58ADB6B677EFC3606
}
},
"RelatedTransactions": {
"__deferred": {
"uri": "https://{HOSTNAME}:{PORT}/sap/byd/odata/v1/yserviceticket/ServiceTicketCollection('00163E0830221EE58ADB6B677EFC3606
}
}
}
}
}
getTickets()
Request Body
URL: /yserviceticket/ServiceTicketCollection?
$filter=ExternalCustomerID%20eq%20%27755557%27&$orderby=CreationDateTime%20desc&$expand=Notes,RelatedTransactions
Note
In case of b2b, you need to use the ExternalContactId parameter instead of the ExternalCustomerID parameter.
No request body.
Response Body
{"d":{"results":[
{ ...
"Name": "Test Ticket Name",
"StatusCode": "3",
"Notes": [{
"__metadata": {
"uri": "https://{HOSTNAME}:{PORT}/sap/byd/odata/v1/yserviceticket/NotesCollection('00163E0830221EE58AC45220B97DC396')",
"type": "yserviceTICKET.Notes"
},
"AuthorName": "",
"AuthorUUID": null,
"CreatedBy": "User",
"CreatedOn": "\/Date(1436876366737)\/",
"LanguageCode": "",
"LastUpdatedBy": "User",
"ObjectID": "00163E0830221EE58AC45220B97DC396",
"ParentObjectID": "00163E0830221EE58AC451D9FFA1E396",
"ServiceRequestExternalKey": "",
"Text": "Creation description 20150714_03",
"TypeCode": "10004",
"UpdatedOn": "\/Date(1436876366737)\/"
}]
}
]}}
Note
Order
getTicket()
Request Body
URL: /yserviceticket/ServiceTicketCollection?
$filter=ExternalCustomerID%20eq%20%27755557%27&$ObjectID%20eq%20%2700163E0D020A1EE584B874CA135B1FA8%27&
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 31/99
3/5/2020
$expand=Notes,RelatedTransactions
Note
In case of b2b, you need to use the ExternalContactId parameter instead of the ExternalCustomerID parameter.
The 00163E0D020A1EE584B874CA135B1FA8 string is the ID of the ticket you want to display the details of.
This is an ObjectID parameter and is returned in the response body of the create ticket request.
No request body.
Response Body
{
"d": {
"results": [{
.......
"CreationDateTime": "\/Date(1436876366737)\/",
"CustomerID": "1170962",
"DataOriginTypeCode": "4",
"ExternalContactID": "",
"ExternalCustomerID": "",
"ExternalKey": "",
"ID": "2363",
"IncidentCategoryID": "",
"LastChangeDateTime": "\/Date(1436881502537)\/",
"Name": "Test By Rakesh 20150714_03",
"ObjectID": "00163E0830221EE58AC451D9FFA1E396",
"StatusCode": "2",
"Notes": [{
{
..............
"CreatedBy": "User",
"CreatedOn": "\/Date(1436881502537)\/",
"LanguageCode": "",
"LastUpdatedBy": "User",
"ObjectID": "00163E0B52E21ED58AC5D0DA9132ACEE",
"ParentObjectID": "00163E0830221EE58AC451D9FFA1E396",
"ServiceRequestExternalKey": "",
"Text": "Test Ticket Update Message to status completed",
"TypeCode": "10008",
"UpdatedOn": "\/Date(1436881502537)\/"
}],
"RelatedTransactions": [{
.........
"BusinessSystemID": "HYBRISINT",
"ExternalKey": "",
"ID": "201507143",
"ObjectID": "00163E0830221EE58AC45220B97B2396",
"ParentObjectID": "00163E0830221EE58AC451D9FFA1E396",
"RoleCode": "1",
"TypeCode": "2085",
"ServiceTicket": {
"__deferred": {
"uri": "https://{HOSTNAME}:{PORT}/sap/byd/odata/v1/yserviceticket/RelatedTransactionsCollection('00163E0830221EE58AC45220B
}
}
}]
}]
}
}
updateTicket()
Request Body
URL: /yserviceticket/$batch
A batch call updates the message and the status at the same time.
--batch_123
Content-Type: multipart/mixed; boundary=changeset_456
--changeset_456
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 32/99
3/5/2020
Content-Type: application/http
Content-Transfer-Encoding: binary
POST ServiceTicketCollection('00163E060DF91EE587E5362B1E006DD8')/Notes HTTP/1.1
Content-Type: application/json
Content-ID: SRQ_TXT_ID
Content-Length: 10000
{
"LanguageCode": "EN",
"ParentObjectID": "00163E060DF91EE587E5362B1E006DD8",
"Text": "Test Ticket Update Message",
"TypeCode": "10007"
}
--changeset_456
Content-Type: application/http
Content-Transfer-Encoding: binary
{
"StatusCode": "5"
}
--changeset_456--
--batch_123--
Response Body
--ejjeeffe0
Content-Type: multipart/mixed; boundary=ejjeeffe1
Content-Length: 1851
--ejjeeffe1
Content-Type: application/http
Content-Length: 879
Content-Transfer-Encoding: binary
--ejjeeffe1
Content-Type: application/http
Content-Length: 747
Content-Transfer-Encoding: binary
--ejjeeffe1--
--ejjeeffe0--
General
To integrate data between Commerce Platform and SAP Cloud for Customer via Data Hub, the following extensions and module are created:
c4ccustomer Extension
c4cquote Extension
c4c-integration-raw Extension
Receives data from the c4c-integration-raw extension. The extension is used to have a data representation that is independent from source systems
and target systems.
c4c-integration-target Extension
Holds customer information that is transmitted to the SAP Cloud for Customer.
c4c-integration-soap-adapter Extension
Creates a soap request that can be processed by the SAP Cloud for Customer.
c4c-integration-soap-schema Extension
Compiles the C4C generated WSDL le and produces JAXB classes that can be used by other extensions.
Provides a Spring integration end point to receive SOAP XMLs from any external system. It also provides the Spring integration ow de nition to route
incoming SOAP XML to raw models in Data Hub.
Provides the integration content to connect a SAP Commerce core installation with an SAP C4C system for quote ful llment.
c4cquote-soap-schema Extension
Compiles the C4C generated WSDL le and produces JAXB classes that can be used by other extensions.
c4cquote-soap-adapter Extension
Creates a quote SOAP request that can be processed by SAP Cloud for Customer.
The c4c-integration module ships with a c4c-endpoint mock-webapp that can be used for local testing and development.
Note
It is required to con gure a Data Hub user account as most of requests need authorization. For more information about how to con gure a user account, see the
Securing Your Data Hub Application document.
Related Information
SAP Framework Core Module
Data Hub
Preparing Data Hub for a Production Environment
Synchronization Between SAP Commerce Installations
c4c-integration-raw Extension
The c4c-integration-raw extension holds customer information.
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, please contact your sales representative.
Note
Make sure that:
2. The publication is con gured as described in the The PartyResolvingStrategy section of the c4c-integration-soap-adapter Extension document.
General
The c4c-integration-raw models information that comes from the source systems, in this case Commerce Platform. The following Raw Items are de ned:
CustomerRawItem
AddressRawItem
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 34/99
3/5/2020
Dependency de nition
<dependencies>
<dependency>
<extension>c4c-integration-canonical</extension>
</dependency>
</dependencies>
Mapping de nition
<dependencies>
... dependencies between datahub extensions ...
</dependencies>
<rawItems>
<item>
<type>CustomerRawItem</type></extension>
<attributes>
... attributes ...
</attributes>
</item>
<item>
<type>AddressRawItem</type></extension>
<attributes>
... attributes ...
</attributes>
</item>
</rawItems>
<canonicalItems>
<item>
<type>CanonicalParty</type>
<attributes>
<attribute>
<name>partyId</name>
<transformations>
<transformation>
<rawSource>CustomerRawItem</rawSource>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 35/99
3/5/2020
<expression>customerId</expression>
</transformation>
</transformations>
</attribute>
... more attributes ...
</attributes>
</item>
<item>
<type>CanonicalAddress</type>
<attributes>
<attribute>
<name>addressId</name>
<transformations>
<transformation>
<rawSource>AddressRawItem</rawSource>
<expression>addressId</expression>
</transformation>
</transformations>
</attribute>
... more attributes ...
</attributes>
</item>
<item>
<type>CanonicalPartyAddress</type>
<attributes>
<attribute>
<name>partyId</name>
<transformations>
<transformation>
<rawSource>AddressRawItem</rawSource>
<expression>customerId</expression>
</transformation>
</transformations>
</attribute>
<attribute>
<name>addressId</name>
<transformations>
<transformation>
<rawSource>AddressRawItem</rawSource>
<expression>addressId</expression>
</transformation>
</transformations>
</attribute>
</attributes>
</item>
</canonicalItems>
</extension>
Adding this extension in a Data Hub environment creates some interfaces that allows to query for either CustomerRawItem or AddressRawItem.
GET: http://localhost:8080/datahub-webap/v1/item-classes/raw/item-types/CustomerRawItem/attributes
GET: http://localhost:8080/datahub-webap/v1/item-classes/raw/item-types/AddressRawItem/attributes
GET: http://localhost:8080/datahub-webap/v1/pools/C4CCUSTOMER_POOL/items/CustomerRawItem
GET: http://localhost:8080/datahub-webap/v1/pools/C4CCUSTOMER_POOL/items/AddressRawItem
Uploading Data
POST: http://localhost:8080/datahub-webap/v1/data-feeds/C4CCUSTOMER_FEED/items/CustomerRawItem
customerId,name,email
c1,John Doe,[email protected]
POST: http://localhost:8080/datahub-webap/v1/data-feeds/C4CCUSTOMER_FEED/items/AddressRawItem
addressId,town,country,postalCode,streetName,streetNumber,customerId
A1,MUNICH,DE,80636,Nymphenburger-Str.,86,c1
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 36/99
3/5/2020
A2,BERLIN,DE,10245,Strasse,78,c1
Related Information
c4c-integration-canonical Extension
c4c-integration-target Extension
c4c-integration-soap-adapter Extension
Data Hub
y2ySync Extension - Technical Guide
c4c-integration Mapping
c4c-integration-canonical Extension
The c4c-integration-canonical extension holds customer information.
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, please contact your sales representative.
Note
Make sure that:
2. The publication is con gured as described in the The PartyResolvingStrategy section of the c4c-integration-soap-adapter Extension document.
General
The c4c-integration-canonical models information that comes from the source systems, in this case from the c4c-integration-raw extension. The generic
de nition is used to have a data representation that is independent from source systems and target systems.
The c4c-integration-canonical has a dependency with the party-canonical Data Hub extension.
<dependencies>
<dependency>
<extension>party-canonical</extension>
</dependency>
</dependencies>
The following canonical items are reused from the party-canonical Data Hub extension:
CanonicalParty
CanonicalAddress
CanonicalPartyAddress
Also, the CanonicalParty item is extended from the party-canonical Data Hub extension.
Items de nitions
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 37/99
3/5/2020
</model>
</attribute>
<attribute>
<name>billingAddressId</name>
<model>
<type>String</type>
</model>
</attribute>
<attribute>
<name>defaultAddressId</name>
<model>
<type>String</type>
</model>
</attribute>
<attribute>
<name>addresses</name>
<model>
<type>String</type>
</model>
</attribute>
</attributes>
</item>
</canonicalItems>
</extension>
On the other hand, the following extensions depend on the c4c-integration-canonical extension:
c4c-integration-raw
c4c-integration-target
POST: http://localhost:8080/datahub-webap/v1/pools/C4CCUSTOMER_POOL/compositions
GET: http://localhost:8080/datahub-webap/v1/item-classes/canonical/item-types/CanonicalParty/attributes
GET: http://localhost:8080/datahub-webap/v1/item-classes/canonical/item-types/CanonicalAddress/attributes
GET: http://localhost:8080/datahub-webap/v1/pools/C4CCUSTOMER_POOL/items/CanonicalParty
GET: http://localhost:8080//datahub-webap/v1/pools/C4CCUSTOMER_POOL/items/CanonicalAddress
Related Information
party-canonical Data Hub Extension
c4c-integration-raw Extension
c4c-integration-target Extension
c4c-integration-soap-adapter Extension
Data Hub
y2ySync Extension - Technical Guide
c4c-integration-target Extension
The c4c-integration-target extension holds customer information that is transmitted to SAP Cloud for Customer.
Note
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 38/99
3/5/2020
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, please contact your sales representative.
Note
Make sure that:
2. The publication is con gured as described in the The PartyResolvingStrategy section of the c4c-integration-soap-adapter Extension document.
General
The c4c-integration-target models information that comes from the source systems, in this case from the c4c-integration-canonical Extension. The
following target items are de ned:
CanonicalParty
CanonicalAddress
<dependencies>
<dependency>
<extension>c4c-integration-canonical</extension>
</dependency>
</dependencies>
<dependencies>
... dependencies between Data Hub extensions ...
</dependencies>
<targetSystems>
<targetSystem>
... some info for the target system ...
<targetItems>
<item>
<type>CustomerItem</type>
<canonicalItemSource>CanonicalParty</canonicalItemSource>
<attributes>
... attributes ...
</attributes>
</item>
<item>
<type>AddressItem</type>
<canonicalItemSource>CanonicalPartyAddress</canonicalItemSource>
<attributes>
... attributes ...
</attributes>
</item>
</targetItems>
</targetSystem>
</targetSystems>
</extension>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 39/99
3/5/2020
Target System
<dependencies>
... dependencies between Data Hub extensions ...
</dependencies>
<targetSystems>
<targetSystem>
<name>C4CSoapTargetSystem</name>
<type>C4C_CLIENT_SOAP_JAXWS</type>
<exportURL>${datahub.c4c.exportURL}</exportURL>
<userName>${datahub.c4c.userName}</userName>
<password>${datahub.c4c.password}</password>
<targetItems>
... some target item definitions ...
</targetItems>
</targetSystem>
</targetSystems>
</extension>
The idea behind this is to de ne this C4C_CLIENT_SOAP_JAXWS target system. The system is mapped against an existing adapter implementation and the
adapter maps against this value. For more information, see the c4c-integration-soap-adapter Extension. The c4c-integration-target extension does not
depend on c4c-soap-adapter, the implementation can be based on other extensions which understands the same de nition.
Publication
You can create a target item only by triggering the InitiatePublicationEvent event. A simple way to trigger this publication is to call the following REST
address:
POST: http://localhost:8080/datahub-webap/v1/pools/C4CCUSTOMER_POOL/publications
{"targetSystemPublications":[{"targetSystemName":"C4CSoapTargetSystem"}]}
GET: http://localhost:8080/datahub-webap/v1/pools/C4CCUSTOMER_POOL/publications/
Related Information
c4c-integration-raw Extension
c4c-integration-canonical Extension
c4c-integration-soap-adapter Extension
Data Hub
y2ySync Extension - Technical Guide
c4c-integration-soap-adapter Extension
The c4c-integration-soap-adapter extension creates a soap request that can be processed by SAP Cloud for Customer.
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, please contact your sales representative.
General
The c4c-integration-soap-adapter is designed to create a soap request that SAP Cloud for Customer can process. This target extension is created to
process information that comes from target items, in this case from the c4c-integration-target extension. The c4c-integration-soap-adapter
extension depends on c4c-integration-target extension because the transformations de ned along with target items are used.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 40/99
3/5/2020
<dependencies>
<dependency>
<extension>c4c-integration-target</extension>
</dependency>
</dependencies>
</extension>
A way to map the c4c-integration-soap-adapter with the target system de ned in c4c-integration-target is done in the spring con guration le:
c4c-integration-soap-adapter/src/main/resources/META-INF/c4c-integration-soap-adapter-datahub-extension-
spring.xml.
Con guration:
<beans xmlns="http://www.springframework.org/schema/beans">
</bean>
</beans>
The C4C_CLIENT_SOAP_JAXWS value registers the c4c-integration-soap-adapter in Data Hub against the con guration that was de ned within c4c-
integration-target.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 41/99
3/5/2020
Where:
ApacheCxfSoapClientProxy: a class created on the y by apache CXF. It represents the actual SOAP Client that access the C4C SOAP Service.
Interceptor, PhaseInterceptor, AbstractPhaseInterceptor: Apache CXF interceptor classes that allow modi cation of soap message.
Note
For developers, the WSDL le is compiled every time using maven during generate-sources phase. This is con gured in c4c-integration-soap-adapter project's
pom le.
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 42/99
3/5/2020
<artifactId>cxf-codegen-plugin</artifactId>
<version>${org.apache.cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/wsdl/business-partner-replication.wsdl</wsdl>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/A1S/Global=com.hybris.datahub.c4c.adapter.soapadapter.sche
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/BASIS/Global=com.hybris.datahub.c4c.adapter.soapadapter.sc
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/SAPGlobal20/Global=com.hybris.datahub.c4c.adapter.soapadap
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/Common/Global=com.hybris.datahub.c4c.adapter.soapadapte
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/Common/GDT=com.hybris.datahub.c4c.adapter.soapadapter.s
<extraarg>-p</extraarg>
<extraarg>http://xiTest.com/xi/test=com.hybris.datahub.c4c.adapter.soapadapter.schema
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This con g generates JAXB and JAXWS classes that are used by the soap adapter. To be able to open the project eclipse, you have to compile the project once.
And if not previously con gured, add the target/generated/cxf folder to your project con g:
cd /root/of/project
mvn clean package
Publication Process
C4cSoapAdapter: handles any exception that comes from the publisher and if any, marks the publication as FAILURE, otherwise as SUCCESS.
C4cSoapPublisher: in charge of preprocessing target items and giving them a logic order, for instance, checking that there are no addresses without a
customer, grouping addresses, and assigning them to the customers.
C4cSoapProcessor: creates the c4c soap request and sends it to SAP Cloud for Customer.
Publication process is as follows: All the customer target items that are ready to be published are gathered in pages. Then all the address target items that are ready
to be published are gathered in pages. All items that are not part of a complete side are put aside and wait for completion. The list of SAP Cloud for Customer
business partners is created and the SAP Cloud for Customer is called as many times as possible considering a threshold. If a soap error appears in the rst
publication, then the publication is marked as FAILURE. If a soap error occurs in a subsequent call, then only the rest of the items are marked as FAILURE, since the
previous soap request was successful.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 43/99
3/5/2020
There are two properties related to the threshold. The c4c.soap.request.size.threshold=1000 which speci es number of customers that can be sent in one call. And
the c4c.soap.request.pause.between.requests=5000 speci es how long Data Hub waits before next call and informs SAP Cloud for Customer how much time it has
to process the received data before next call.
The C4cSoapPublisher
For the preprocessing, there are populators that transform the target items into SAP Cloud for Customer speci c objects.
Filters out customers or addresses that are not possible to transform and marks them as INCOMPLETE.
Filters out addresses that do not have a customer present in the current publication chunk and marks them as MISSING_REFERENCE.
Filters out addresses that are not expected as a part of the customer information and marks them as INVALID_REFERENCE_KEY: A customer has a list of
expected addresses.
Filters out customers and addresses that are not a part of a full set and marks them as INCOMPLETE. If expected addresses are not met after processing
the current publication chunk, it means that it is not possible to publish those elements and they need to be reprocessed.
After nishing this preprocess method returns a list of BusinessPartner objects that are sent to the C4cSoapProcessor for further processing.
The C4cSoapProcessor
The current implementation of the DefaultC4cJaxwsSoapProcessor uses a JAX-WS soap client that is created against a wsdl: c4c-integration-soap-
adapter/src/main/resources/META-INF/wsdl/business-partner-replication.wsdl. The JAX-WS client is con gured within spring in the
following le: c4c-integration-soap-adapter/src/main/resources/META-INF/c4c-integration-soap-adapter-datahub-
extension-spring.xml.
<beans xmlns="http://www.springframework.org/schema/beans">
</beans>
This bean is attached to the DefaultC4cJaxwsSoapProcessor and used for reaching c4c soap endpoint.
<beans xmlns="http://www.springframework.org/schema/beans">
<bean name="defaultPartyResolvingStrategy"
class="com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy.impl.DefaultPartyResolvingStrategy">
</bean>
This way a new JAXWS soap client is created every time and thus the endpoint URL can be modi ed for each call independently. Do not forget that spring creates by
default singleton beans.
<beans xmlns="http://www.springframework.org/schema/beans">
<http:conduit name="{http://sap.com/xi/A1S/Global}BusinessPartnerReplicationInPort.http-conduit">
<http:authorization>
<sec:UserName>${datahub.c4c.userName}</sec:UserName>
<sec:Password>${datahub.c4c.password}</sec:Password>
<sec:AuthorizationType>Basic</sec:AuthorizationType>
</http:authorization>
<http:client AutoRedirect="true"
Connection="Keep-Alive"
ProxyServer="10.10.10.10"
ProxyServerPort="8080"
NonProxyHosts="localhost|127.0.0.1"
AllowChunking="false" />
</http:conduit>
</beans>
Use a proxy:
Add this con guration to your Data Hub extension's spring le: myextension/src/main/resources/META-INF/myextension-datahub-
extension-spring.xml and make sure your extension is deployed along with the soap adapter.
The PartyResolvingStrategy
The strategy allows de nition of both c4c request tags: SenderParty and RecipientParty which are part of the request message header.The current
implementation: DefaultPartyResolvingStrategy resolves those tags based on the pool name where the target items are contained and queries the
local con guration looking for the values to be applied. For more information about DATA_FEED and POOL_NAME con guration, see Feeds and Pools.
For instance, if the target items are contained in the C4CCUSTOMER_POOL pool, this strategy tries to nd and map the following properties in c4c-datahub-
overlay/src/main/resources/local.properties:
datahub.c4c.senderParty.schemeID.C4CCUSTOMER_POOL=CommunicationSystemID
datahub.c4c.senderParty.internalID.C4CCUSTOMER_POOL=HYBRISINT
datahub.c4c.senderParty.schemeAgencyID.C4CCUSTOMER_POOL=310
datahub.c4c.recipientParty.schemeID.C4CCUSTOMER_POOL=LocalSystemID
datahub.c4c.recipientParty.internalID.C4CCUSTOMER_POOL=0LO7ESO
datahub.c4c.recipientParty.schemeAgencyID.C4CCUSTOMER_POOL=310
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID>
</SenderParty>
<RecipientParty>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 45/99
3/5/2020
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESO</InternalID>
</RecipientParty>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:BusinessPartnerSUITEBulkReplicateRequest xmlns:ns4="http://sap.com/xi/SAPGlobal20/Global">
<MessageHeader>
<ID>729349E61DEC4D0FBCF1D7CFA9D79681</ID>
<UUID>729349E6-1DEC-4D0F-BCF1-D7CFA9D79681</UUID>
<CreationDateTime>2015-07-22T14:06:25.243Z</CreationDateTime>
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID>
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESO</InternalID>
</RecipientParty>
</MessageHeader>
<BusinessPartnerSUITEReplicateRequestMessage>
</BusinessPartnerSUITEReplicateRequestMessage>
</ns4:BusinessPartnerSUITEBulkReplicateRequest>
</soap:Body>
</soap:Envelope>
Both tags are generated under the request message header, for example:
The MessageIdInterceptor
This Apache CXF interceptor modi es the endpoint URL. The interceptor uses the same ID that is generated for the request UUID. For instance, based on the
following payload:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:BusinessPartnerSUITEBulkReplicateRequest xmlns:ns4="http://sap.com/xi/SAPGlobal20/Global">
<MessageHeader>
<ID>729349E61DEC4D0FBCF1D7CFA9D79681</ID>
<UUID>729349E6-1DEC-4D0F-BCF1-D7CFA9D79681</UUID>
<CreationDateTime>2015-07-22T14:06:25.243Z</CreationDateTime>
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID>
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESO</InternalID>
</RecipientParty>
</MessageHeader>
<BusinessPartnerSUITEReplicateRequestMessage>
... business partner info ...
</BusinessPartnerSUITEReplicateRequestMessage>
</ns4:BusinessPartnerSUITEBulkReplicateRequest>
</soap:Body>
</soap:Envelope>
For example:
The UUID is: 729349E6-1DEC-4D0F-BCF1-D7CFA9D79681. This value is added to the endpoint, in a way that the SOAP endpoint address is:
https://qxl-cust241.dev.sapbydesign.com/sap/bc/srt/scs/sap/businesspartnerreplicationin?MessageId=729349E6-1DEC-4D0F-BCF1-D7CFA9
Data Pools
Data pools enable users to isolate and manage their data for composition and publishing. This enables many system to synchronize and usage of its own pools. All
available pools are mapped with sender party and recipient party.
PartyType enum was created to de ne party types, such as senderParty and recipientParty:
ParentType.java
package com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy;
/**
* Enum of existing types of parties.
*/
public enum PartyType
{
SENDER_PARTY("senderParty"),
RECIPIENT_PARTY("recipientParty");
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 46/99
3/5/2020
private PartyType(final String value)
{
this.value = value;
}
/**
* String value to get properties of the party.
* @return
*/
public String getValue()
{
return this.value;
}
}
To resolve mapping special strategy interface is created. Only one method is con gured - PartyInternalID by partyType and pool.
PartyResolvingStrategy.java
package com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy;
import com.hybris.datahub.c4c.adapter.soapadapter.schema.com.sap.xi.ap.common.gdt.PartyInternalID;
import com.hybris.datahub.runtime.domain.DataHubPool;
/**
* Strategy to get sender party id via Data Hub pool.
*/
public interface PartyResolvingStrategy
{
/**
* The method configures PartyInternalID using the pool name and the party type.
* @param dataHubPool
* @param party
* @return
*/
PartyInternalID getPartyInternalID(final PartyType party, final DataHubPool dataHubPool);
}
The default implementation constructs property name from the party type and the pool name, and gets required properties from environment.
DefaultPartyResolvingStrategy
package com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy.impl;
import com.hybris.datahub.c4c.adapter.soapadapter.C4cSoapAdapterException;
import com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy.PartyType;
import com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy.PartyResolvingStrategy;
import com.hybris.datahub.c4c.adapter.soapadapter.schema.com.sap.xi.ap.common.gdt.PartyInternalID;
import com.hybris.datahub.runtime.domain.DataHubPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.support.AbstractBeanFactory;
/**
* Default implementation of the {@link com.hybris.datahub.c4c.adapter.soapadapter.processor.strategy.PartyResolvingStrateg
*/
public class DefaultPartyResolvingStrategy implements PartyResolvingStrategy
{
private static final String DATAHUB_C4C_PREFIX = "datahub.c4c";
private static final String DATAHUB_C4C_INTERNAL_SYSTEM_ID = "internalID";
private static final String DATAHUB_C4C_AGENCY_SCHEME_ID = "schemeAgencyID";
private static final String DATAHUB_C4C_SCHEME_ID = "schemeID";
@Autowired
private AbstractBeanFactory abstractBeanFactory;
/**
* The method configures PartyInternalID using the pool name and the party type.
* @param party
* @param dataHubPool
* @return PartyInternalID mapped to the pool and party type
* @throws C4cSoapAdapterException if dataHubPool is null or if no sender party for the pool or no such property
*/
@Override
public PartyInternalID getPartyInternalID(final PartyType party, final DataHubPool dataHubPool)
{
final PartyInternalID partyInternalID = new PartyInternalID();
if (party == null)
{
throw new C4cSoapAdapterException("Can't map dataHubPool: partyType is null");
}
if (dataHubPool == null)
{
throw new C4cSoapAdapterException("Can't map dataHubPool: dataHubPool is null");
}
else
{
if (dataHubPool.getPoolName() == null || dataHubPool.getPoolName().isEmpty())
{
throw new C4cSoapAdapterException("Can't map dataHubPool name: dataHubPoolName is null or empty");
}
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 47/99
3/5/2020
else
{
partyInternalID.setValue(getPartyParameter(party, dataHubPool, DATAHUB_C4C_INTERNAL_SYSTEM_ID));
partyInternalID.setSchemeID(getPartyParameter(party, dataHubPool, DATAHUB_C4C_SCHEME_ID));
partyInternalID.setSchemeAgencyID(getPartyParameter(party, dataHubPool, DATAHUB_C4C_AGENCY_SCHEME_ID));
}
}
return partyInternalID;
}
/**
* The method gets properties of PartyInternalID.
* @param party
* @param dataHubPool
* @return
* @throws C4cSoapAdapterException if no such property
*/
private String getPartyParameter(final PartyType party, final DataHubPool dataHubPool, final String parameter)
{
final String propertyName = "${" + DATAHUB_C4C_PREFIX + "." + party.getValue() + "." + parameter + "." + dataHubPool
+ "}";
final String senderPartyId = abstractBeanFactory.resolveEmbeddedValue(propertyName);
if ((senderPartyId != null) && (!propertyName.equals(senderPartyId)))
{
return senderPartyId;
}
throw new C4cSoapAdapterException("Can't map party by dataHubPool name and party type: dataHubPool.name='"
+ dataHubPool.getPoolName() + "', partyType='" + party + "'");
}
}
package com.hybris.datahub.c4c.adapter.soapadapter.processor.impl;
/**
* Processes the customers being provided by datahub and that need to be send to C4C.
*
* @param pub
* @param customers
* @return A list of datahub errors
*/
@Override
public List<ErrorData> process(final TargetSystemPublication pub,
final List<BusinessPartnerReplicationSingleInstance> customers)
{
final List<ErrorData> errors = new ArrayList<>();
BusinessPartnerReplicationRequest request = null;
try
{
if (customers == null || customers.isEmpty())
{
return errors;
}
...
/**
* Creates the {@link BusinessPartnerReplicationRequest} request Object.
*
* @param customers
* @param pool
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 48/99
3/5/2020
* @return The generated request object.
*/
public BusinessPartnerReplicationRequest createRequest(final List<BusinessPartnerReplicationSingleInstance> customers,
final DataHubPool pool)
{
// Send SOAP Message to SOAP Server
final String uuid = java.util.UUID.randomUUID().toString().toUpperCase();
header.setUUID(new UUID());
final UUID messageUUID = header.getUUID();
messageUUID.setValue(uuid);
return request;
}
...
/**
* Sets the senderPartyResolvingStrategy attribute.
*
* @param partyResolvingStrategy
*/
@Required
public void setPartyResolvingStrategy(final PartyResolvingStrategy partyResolvingStrategy)
{
this.partyResolvingStrategy = partyResolvingStrategy;
}
}
The values are mapped against a BusinessPartnerReplicationSingleInstance object. This class is a JAXB class generated after compilation of WSDL.
customer (CustomerItem)
{
customerId = c1
name = John
lastname = Doe
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 49/99
3/5/2020
email = [email protected]
roleCode = CRM000
gender = 0
formOfAddress = null
}
Produces:
<BusinessPartner actionCode="04"
addressInformationListCompleteTransmissionIndicator="true"
roleListCompleteTransmissionIndicator="true"
identificationListCompleteTransmissionIndicator="true"
industrySectorListCompleteTransmissionIndicator="true"
commonListCompleteTransmissionIndicator="true">
<ExternalID>c1</ExternalID> <--- customer.customerId
<CategoryCode>1</CategoryCode>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04" eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI> <--- customer.email
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
</Address>
</AddressInformation>
<Common actionCode="04">
<ReleasedIndicator>true</ReleasedIndicator>
<BlockedIndicator>false</BlockedIndicator>
<DeletedIndicator>false</DeletedIndicator>
<Person>
<Name>
<--- here should go customer.formOfAddress, but since it is null, no "<FormOfAddress>
<GivenName>John</GivenName> <--- customer.name
<FamilyName>Doe</FamilyName> <--- customer.lastname
</Name>
<GenderCode>0</GenderCode> <--- customer.gender
</Person>
</Common>
<Role actionCode="04">
<RoleCode>CRM000</RoleCode> <--- customer.roleCode
</Role>
</BusinessPartner>
address1 (AddressItem)
{
addressId = A1
streetName = Nymphenburgerstr. 86
postalCode = 80636
city = MUNICH
country = DE
customerId = c1
}
address2 (AddressItem)
{
addressId = A2
streetName = Berlinerstr. 88
postalCode = 10245
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 50/99
3/5/2020
city = BERLIN
country = DE
customerId = c1
}
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode> <--- address1.country
<CityName>MUNICH</CityName> <--- address1.city
<StreetPostalCode>80636</StreetPostalCode> <--- address1.postalCode
<StreetName>Nymphenburgerstr. 86</StreetName> <--- address1.streetName
</PostalAddress>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode> <--- address2.country
<CityName>BERLIN</CityName> <--- address2.city
<StreetPostalCode>10245</StreetPostalCode> <--- address2.postalCode
<StreetName>Berlinerstr. 88</StreetName> <--- address2.streetName
</PostalAddress>
</Address>
</AddressInformation>
<BusinessPartner actionCode="04"
addressInformationListCompleteTransmissionIndicator="true"
roleListCompleteTransmissionIndicator="true"
identificationListCompleteTransmissionIndicator="true"
industrySectorListCompleteTransmissionIndicator="true"
commonListCompleteTransmissionIndicator="true">
<ExternalID>c1</ExternalID> <--- customer.customerId
<CategoryCode>1</CategoryCode>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04" eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI> <--- customer.email
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<AddressUsage actionCode="04">
<AddressUsageCode>XXDEFAULT</AddressUsageCode>
</AddressUsage>
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode> <--- address1.country
<CityName>MUNICH</CityName> <--- address1.city
<StreetPostalCode>80636</StreetPostalCode> <--- address1.postalCode
<StreetName>Nymphenburgerstr. 86</StreetName> <--- address1.streetName
</PostalAddress>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 51/99
3/5/2020
organisationNameListCompleteTransmissionIndicator="true">
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode> <--- address2.country
<CityName>BERLIN</CityName> <--- address2.city
<StreetPostalCode>10245</StreetPostalCode> <--- address2.postalCode
<StreetName>Berlinerstr. 88</StreetName> <--- address2.streetName
</PostalAddress>
</Address>
</AddressInformation>
<Common actionCode="04">
<ReleasedIndicator>true</ReleasedIndicator>
<BlockedIndicator>false</BlockedIndicator>
<DeletedIndicator>false</DeletedIndicator>
<Person>
<Name>
<GivenName>John</GivenName> <--- customer.name
<FamilyName>Doe</FamilyName> <--- customer.lastname
</Name>
<GenderCode>0</GenderCode> <--- customer.gender
</Person>
</Common>
<Role actionCode="04">
<RoleCode>CRM000</RoleCode> <--- customer.roleCode
</Role>
</BusinessPartner>
Finally, for the whole SOAP request message that is sent to c4c:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:BusinessPartnerSUITEBulkReplicateRequest xmlns:ns2="http://xiTest.com/xi/test"
xmlns:ns3="http://sap.com/xi/AP/Common/Global"
xmlns:ns4="http://sap.com/xi/SAPGlobal20/Global">
<MessageHeader>
<ID>D0B4FA557C0740F99C942F2984209381</ID> <--- Same UUID but without
<UUID>D0B4FA55-7C07-40F9-9C94-2F2984209381</UUID> <--- Random UUID
<CreationDateTime>2015-07-23T12:05:03.986Z</CreationDateTime> <--- Current Timestamp
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID> <--- Resolved SenderParty u
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESO</InternalID> <--- Resolved RecipientPart
</RecipientParty>
</MessageHeader>
<BusinessPartnerSUITEReplicateRequestMessage>
<MessageHeader/>
<BusinessPartner actionCode="04"
addressInformationListCompleteTransmissionIndicator="true"
roleListCompleteTransmissionIndicator="true"
identificationListCompleteTransmissionIndicator="true"
industrySectorListCompleteTransmissionIndicator="true"
commonListCompleteTransmissionIndicator="true">
<ExternalID>c1</ExternalID> <--- customer.customerId
<CategoryCode>1</CategoryCode>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<Email actionCode="04" eMailUsageListCompleteTransmissionIndicator="true">
<URI>[email protected]</URI> <--- customer.email
<EmailUsage actionCode="04">
<Usage>
<Code>AD_DEFAULT</Code>
</Usage>
</EmailUsage>
</Email>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<AddressUsage actionCode="04">
<AddressUsageCode>XXDEFAULT</AddressUsageCode>
</AddressUsage>
<Address emailListCompleteTransmissionIndicator="true"
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode> <--- address1.country
<CityName>MUNICH</CityName> <--- address1.city
<StreetPostalCode>80636</StreetPostalCode> <--- address1.postalCode
<StreetName>Nymphenburgerstr. 86</StreetName> <--- address1.streetName
</PostalAddress>
</Address>
</AddressInformation>
<AddressInformation actionCode="04"
addressUsageListCompleteTransmissionIndicator="true">
<Address emailListCompleteTransmissionIndicator="true"
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 52/99
3/5/2020
facsimileListCompleteTransmissionIndicator="true"
postalAddressListCompleteTransmissionIndicator="true"
webListCompleteTransmissionIndicator="true"
organisationNameListCompleteTransmissionIndicator="true">
<PostalAddress actionCode="04">
<CountryCode>DE</CountryCode> <--- address2.country
<CityName>BERLIN</CityName> <--- address2.city
<StreetPostalCode>10245</StreetPostalCode> <--- address2.postalCode
<StreetName>Berlinerstr. 88</StreetName> <--- address2.streetName
</PostalAddress>
</Address>
</AddressInformation>
<Common actionCode="04">
<ReleasedIndicator>true</ReleasedIndicator>
<BlockedIndicator>false</BlockedIndicator>
<DeletedIndicator>false</DeletedIndicator>
<Person>
<Name>
<GivenName>John</GivenName> <--- customer.name
<FamilyName>Doe</FamilyName> <--- customer.lastname
</Name>
<GenderCode>0</GenderCode> <--- customer.gender
</Person>
</Common>
<Role actionCode="04">
<RoleCode>CRM000</RoleCode> <--- customer.roleCode
</Role>
</BusinessPartner>
</BusinessPartnerSUITEReplicateRequestMessage>
</ns4:BusinessPartnerSUITEBulkReplicateRequest>
</soap:Body>
</soap:Envelope>
<dependencies>
<dependency>
<extension>c4c-integration-canonical</extension>
</dependency>
</dependencies>
<targetSystems>
<targetSystem>
... extra target system config ...
<targetItems>
<item>
<type>CustomerItem</type>
... extra item config ...
<attributes>
<attribute>
<name>roleCode</name>
<localizable>false</localizable>
<collection>false</collection>
<transformationExpression>"CRM000"</transformationExpression>
<exportCode>roleCode</exportCode>
<mandatoryInHeader>false</mandatoryInHeader>
</attribute>
<attribute>
<name>formOfAddress</name>
<localizable>false</localizable>
<collection>false</collection>
<transformationExpression>null</transformationExpression>
<exportCode>formOfAddress</exportCode>
<mandatoryInHeader>false</mandatoryInHeader>
</attribute>
<attribute>
<name>gender</name>
<localizable>false</localizable>
<collection>false</collection>
<transformationExpression>"0"</transformationExpression>
<exportCode>gender</exportCode>
<mandatoryInHeader>false</mandatoryInHeader>
</attribute>
</attributes>
</item>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 53/99
3/5/2020
</extension>
When the publication process is triggered, a CustomerItem object is created by every customer that has been modi ed in Data Hub, and thus this extra value is
added to each one. Finally the DefaultCustomerPopulator implementation adds this information to the business partner, and this generates a SOAP request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:BusinessPartnerSUITEBulkReplicateRequest xmlns:ns4="http://sap.com/xi/SAPGlobal20/Global">
<MessageHeader>
... message header info ...
</MessageHeader>
<BusinessPartnerSUITEReplicateRequestMessage>
<MessageHeader/>
<BusinessPartner actionCode="04"
addressInformationListCompleteTransmissionIndicator="true"
roleListCompleteTransmissionIndicator="true"
identificationListCompleteTransmissionIndicator="true"
industrySectorListCompleteTransmissionIndicator="true"
commonListCompleteTransmissionIndicator="true">
<Common actionCode="04">
<ReleasedIndicator>true</ReleasedIndicator>
<BlockedIndicator>false</BlockedIndicator>
<DeletedIndicator>false</DeletedIndicator>
<Person>
<Name>
<--- Since in the current mapping a "nul
<GivenName>John</GivenName>
<FamilyName>Doe</FamilyName>
</Name>
<GenderCode>0</GenderCode> <--- the gender code
</Person>
</Common>
<Role actionCode="04">
<RoleCode>CRM000</RoleCode> <--- The roleCode
</Role>
</BusinessPartner>
</BusinessPartnerSUITEReplicateRequestMessage>
</ns4:BusinessPartnerSUITEBulkReplicateRequest>
</soap:Body>
</soap:Envelope>
0 - unknown
1 - male
2- female
Related Information
c4c-integration-raw Extension
c4c-integration-canonical Extension
c4c-integration-target Extension
Data Hub
y2ySync Extension - Technical Guide
Context
Even if you do not use proxy servers, the creation of a Data Hub proxy extension is needed for the SAP Cloud for Customer integration to work. Here you will nd the
steps leading you through the creation of a proxy extension.
Procedure
1. Install Apache Maven.
2. Install Data Hub SDK (if not already installed) by executing the following command in <HYBRIS_HOME>\hybris\bin\ext-
integration\datahub\sdk. Replace <version> with the correct Data Hub SDK version.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 54/99
3/5/2020
3. Create a new Data Hub extension by executing the following command in <HYBRIS_HOME>\hybris\bin\custom:
4. Import the new Data Hub extension with existing maven project into your IDE.
custom-proxy/src/main/resources/META-INF/custom-proxy-datahub-extension.xml
custom-proxy/src/main/resources/META-INF/custom-proxy-datahub-extension-spring.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http
http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-co
<context:annotation-config />
<http:conduit name="*.http-conduit">
<http:authorization>
<sec:UserName>${datahub.c4c.userName}</sec:UserName>
<sec:Password>${datahub.c4c.password}</sec:Password>
<sec:AuthorizationType>Basic</sec:AuthorizationType>
</http:authorization>
<http:client AutoRedirect="true"
Connection="Keep-Alive"
ProxyServer="${datahub.c4c.proxyServer}"
ProxyServerPort="${datahub.c4c.proxyServerPort}"
NonProxyHosts="localhost|127.0.0.1"
AllowChunking="false" />
</http:conduit>
</beans>
Caution
Pay attention to the <http:conduit> tag as it contains conduit con gurations. The name="*.http-conduit" code means this con guration is
applied to all CXF clients including our client used for SAP Cloud for Customer communication. In our example, we have added basic authentication and
proxy server. This proxy is not used if client points to localhost or to 127.0.0.1. You can nd more details about <http:conduit> here:
http://cxf.apache.org/docs/client-http-transport-including-ssl-support#ClientHTTPTransport%28includingSSLsupport%29-Theconduitelement
custom-proxy/pom.xml
For the embedded version of Data Hub, the path is: <HYBRIS_HOME>/hybris/bin/platform/tomcat/lib/ .
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 55/99
3/5/2020
10. Restart the server.
c4c-integration-soap-schema Extension
The c4c-integration-soap-schema extension compiles the C4C generated WSDL le and produces JAXB classes that can be used by other extensions.
General
The c4c-integration-soap-schema holds JAXB objects generated upon the provided C4C WSDL de nition. Other extensions like c4c-integration-
mock or c4c-integration-soap-adapter can then use these objects to build C4C tags. This extension does not hold any other extra information, that is
why either c4c-integration-soap-schema/src/main/resources/META-INF/c4c-integration-soap-schema-datahub-extension.xml
and c4c-integration-soap-schema/src/main/resources/META-INF/c4c-integration-soap-schema-datahub-extension-
spring.xml are empty:
<dependencies>
</dependencies>
</extension>
<context:annotation-config/>
</beans>
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${org.apache.cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/wsdl/business-partner-replication.wsdl</wsdl>
<extraargs>
<extraarg>-mark-generated</extraarg>
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/A1S/Global=com.hybris.datahub.c4c.adapter.schema.com.sap.xi.
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 56/99
3/5/2020
HttpInboundService
Spring Integration
SoapMappingService
HttpInboundService
This service receives SOAP request and sends Spring integration XML messages for them to the Spring integration channel.
The endpoint URL for this webservice is: http://<domain>:<port>/<context eg. datahub-webapp>/v1/soap/receiver
This webservice:
extracts root node from SOAP BODY into channel header MESSAGE_TYPE which is then used for routing the request XML to correct Spring Integration
Channel.
Spring Integration
Map SOAP XMLs with different Message Types to the Corresponding Mapping Services- HEADER-VALUE-ROUTER.
The following shows the HEADER-VALUE-ROUTER for the MESSAGE_TYPE header attribute:
<!-- Maps received XML by value of header attribute: "MESSAGE_TYPE" to corresponding mapping service -->
<int:header-value-router id="soapRouter" input-channel="soapXmlInboundChannel" header-name="MESSAGE_TYPE">
<int:mapping value="SalesOrderRequestMassRequest" channel="quoteInboundChannel" />
</int:header-value-router>
Service Activator
The corresponding mapping service is mapped to the different channels via the service activator, and the map method is called.
<int:service-activator id="quoteInboundServiceActivator"
input-channel="quoteInboundChannel" output-channel="rawFragmentDataInputChannel" ref="quoteInboundDefaultSoapMap
If a non-supported MESSAGE_TYPE value is detected, a service activator is available for logging. In this case, the log method is called.
<bean id="quoteInboundDefaultSoapMappingService"
class="com.hybris.datahub.sapsoapinboundadapter.DummyMappingService" />
SoapMappingService
SoapMappingService maps SOAP XML Body elements to raw item data. It contains an implementation of the map method required by the service-activator to
transform an XML le into a list of RawFragmentData.
Each segment and attribute name is concatenated using the "/" separator to create the raw item attribute name.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 57/99
3/5/2020
rawFragmentDataExtensionSource: Specify the RawFragmentData.setExtensionSource (extensionSource string).
<bean id="quoteInboundDefaultSoapMappingService"
class="com.hybris.datahub.sapsoapinboundadapter.SoapMappingService">
<property name="rawFragmentDataExtensionSource" value="c4cquote" />
<property name="rawFragmentDataFeedName" value="SAPC4CQUOTE_INBOUND_FEED" />
<property name="rawFragmentDataType" value="RawHybrisQuoteInbound" />
</bean> >
These extensions are mandatory for asynchronous quote processing. The extensions are c4cquote-raw, c4cquote-canonical, and c4cquote-target.
The extensions perform the following:
Create SOAP payloads and send them to the SAP back-end to replicate SAP Commerce quotes.
Dependencies:
c4c-integration-canonical
Overview
The following graphic gives an overview of the quote-related integration between SAP Commerce and an SAP C4C system via Data Hub.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 58/99
3/5/2020
The quotes created in SAP Commerce are sent as CSV les to Data Hub, which stores them as raw items. During composition, the raw items are converted into
canonical quotes and subordinate items. During publication, the canonical quotes are converted into target items that correspond to SOAP payload (see
sapidocoutboundadapter Data Hub extension). Using the SOAP outbound adapter, the corresponding target items are assembled in SOAP payload and are
sent as XML over HTTP(S) to the back-end, which starts quote processing.
When the system replicates sales quotes from SAP Commerce to the back-end, quotes are created automatically in the back-end.
When the quote is updated in SAP C4C, it sends SOAP payload as XML over HTTP(S) to the Data Hub. After composition and publication, Data Hub sends impex as
a le to SAP Commerce, which updates the quote in SAP Commerce automatically.
The c4cquote Data Hub extensions contain the raw, canonical, and target item de nitions.
Outbound Flow
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 59/99
3/5/2020
Inbound Flow
Raw Items
RawHybrisQuote
This represents a quote coming from SAP Commerce. It contains all subordinate information (quote entries, partner details, pricing details).
RawHybrisQuoteInbound
This represents a quote coming from SAP C4C. It contains all subordinate information (quote entries, partner details, pricing details).
RawHybrisQuoteCon rmationInbound
This represents a quote con rmation coming from SAP C4C after successful creation of quote in SAP C4C.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 60/99
3/5/2020
Composition Handler
QuoteIDCompositionHandler: This handler is used to append zeros to the quote ID.
Canonical Items
The canonical items in this context are designed to facilitate the mapping between the SAP Commerce domain model and the domain model in the SAP back-end.
CanonicalQuote
This represents the quote header. In addition to the expected attributes (quote ID, name, currency, and so on), the store name and the channel (B2B or B2C) are
also stored. The store name is used during publication, to infer store-speci c con guration properties (transaction type, sales area).
CanonicalQuoteItem
This represents one item or entry of a quote. Like all subordinate objects of a quote, the quote ID is part of the (compound) key. The entry number is the same as in
SAP Commerce.
CanonicalQuotePartnerRole
This represents a partner role for a quote such as sold-to, bill-to, and so on. Each role may have a separate partner attached, and can occur at most once. The
encoding of the role ( eld partnerRoleCode) is already in line with the scheme in the SAP back-end:
AG: sold-to
RE: bill-to
WE: ship-to
CanonicalQuoteInbound
This represents the quote header. In addition to the expected attributes (quote ID, name, currency, and so on), the store name and the channel (B2B or B2C) are
also stored. The store name is used during publication, to infer store-speci c con guration properties (transaction type, sales area).
CanonicalQuoteItemInbound
This represents one item or entry of a quote. Like all subordinate objects of a quote, the quote ID is part of the (compound) key. The entry number is the same as in
SAP Commerce.
CanonicalQuoteCommentInboundItem
This represents comment made by processor coming from SAP C4C related to quote.
CanonicalQuoteCon rmationInbound
CanonicalQuoteItemPriceComponent
CanonicalQuotePriceComponent
CanonicalQuoteInboundParty
Target Items
The c4cquote-target extension models information that comes from the source systems, in this case from the c4cquote-canonical extension. The
following target items are de ned (see c4cquote-target-datahub-extension.xml for each target item de nition):
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 61/99
3/5/2020
TargetQuoteCommentItem: Contains comments details
PublicationHandler
QuoteCommentGroupingHandler: This handler is used to lter out new comments coming from SAP C4C.
QuoteDiscountGroupingHandler: This handler is used to lter out discount component out of multiple price components.
QuoteUserTypeGroupingHandler: This handler is used to lter out inbound party for the quote.
<extension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.hybris.com/schema/"
xsi:schemaLocation="http://www.hybris.com/schema/ http://www.hybris.com/schema/datahub-metadata-schema-1.3.0.xsd"
name="c4cquote-target">
<dependencies>
<dependency>
... dependencies between Data Hub extensions ...
</dependency>
</dependencies>
<targetSystems>
<targetSystem>
<name>C4CSoapQuoteTargetSystem</name>
<type>C4C_QUOTE_SOAP_JAXWS</type>
<exportURL>${datahub.c4c.quote.exportURL}</exportURL>
<userName>${datahub.c4c.quote.userName}</userName>
<password>${datahub.c4c.quote.password}</password>
<targetItems>
... some target item definitions ...
</targetItems>
</targetSystem>
</targetSystems>
</extension>
The idea behind this is to de ne the C4C_QUOTE_SOAP_JAXWS target system. The system is mapped against an existing adapter implementation and the adapter
maps against this value. For more information, see the c4cquote-soap-adapter Extension.
Publication
You can create a target item only by triggering the InitiatePublicationEvent event. A simple way to trigger this publication is to call the following REST
address:
POST: http://localhost:8080/datahub-webapp/v1/pools/SAPC4CQUOTE_OUTBOUND_POOL/publications
Body : {"targetSystemPublications":[{"targetSystemName":"C4CSoapTargetSystem"}]}
SAPC4CQUOTE_OUTBOUND_FEED SAPC4CQUOTE_OUTBOUND_POOL Feed for SAP Commerce quote replication from SAP
Commerce to back-end.
SAPC4CQUOTE_INBOUND_FEED SAPC4CQUOTE_INBOUND_POOL Feed for SAP quote replication from SAP C4C back-end
to SAP Commerce.
c4cquote-soap-schema Extension
The c4cquote-soap-schema extension compiles the C4C generated WSDL le and produces JAXB classes that can be used by other extensions.
General
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 62/99
3/5/2020
The c4cquote-soap-schema extension holds JAXB objects generated upon the provided WSDL les which are generated by C4C. c4cquote-soap-
adapter extension uses the generated JAXB objects to build SOAP request tags. This extension does not hold any other information, that is why either
c4cquote-soap-schema/src/main/resources/META-INF/c4cquote-soap-schema-datahub-extension-spring.xml or c4cquote-
soap-schema/src/main/resources/META-INF/c4cquote-soap-schema-datahub-extension.xml le is empty.
<?xml version="1.0">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
... extra config ...
<build>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${org.apache.cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/wsdl/CustomerOrderReplication
<extraargs>
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/A1S/Global=com.sap.datahub.c4c.adapter.schema.
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/BASIS/Global=com.sap.datahub.c4c.adapter.schem
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/SAPGlobal20/Global=com.sap.datahub.c4c.adapter
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/Common/Global=com.sap.datahub.c4c.adapter.s
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/Common/GDT=com.sap.datahub.c4c.adapter.sche
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/Common/DataTypes=com.sap.datahub.c4c.adapter.s
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/FO/Activity/Global=com.sap.datahub.c4c.adap
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/CRM/Global=com.sap.datahub.c4c.adapter.sche
<extraarg>-p</extraarg>
<extraarg>http://xiTest.com/xi/test=com.sap.datahub.c4c.adapter.schema.com
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
</execution>
<execution>
<id>generate-sources-approval-notification</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf/notification</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/wsdl/CustomerQuoteProcessingU
<extraargs>
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/BASIS/Global=com.sap.datahub.c4c.adapter.schem
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/SAPGlobal20/Global=com.sap.datahub.c4c.adapter
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/Common/Global=com.sap.datahub.c4c.adapter.s
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/Common/GDT=com.sap.datahub.c4c.adapter.sche
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/Common/DataTypes=com.sap.datahub.c4c.adapter.s
<extraarg>-p</extraarg>
<extraarg>http://sap.com/xi/AP/CRM/Global=com.sap.datahub.c4c.adapter.sche
<extraarg>-p</extraarg>
<extraarg>http://xiTest.com/xi/test=com.sap.datahub.c4c.adapter.schema.not
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
</execution>
</executions>
</plugin>
</build>
</project>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 63/99
3/5/2020
This con guration generates JAXB and JAXWS classes that are used by the SOAP adapter. To be able to open the project and view generated classes in eclipse, you
should compile the project once.
c4cquote-soap-adapter Extension
The c4cquote-soap-adapter extension creates quote SOAP request and quote approval noti cation SOAP request that can be processed by SAP Cloud for
Customer.
General
The c4cquote-soap-adapter extension is designed to create quote SOAP request and quote approval noti cation SOAP request that SAP C4C can process.
This extension is created to process the information that comes from the target items, in this case from c4cquote-target extension.
A way to map c4cquote-soap-adapter with the target system de ned in c4cquote-target is done in the spring con guration le: c4cquote-soap-
adapter/src/main/resources/META-INF/c4cquote-soap-adapter-datahub-extension-spring.xml.
Con guration:
<beans xmlns="http://www.springframework.org/schema/beans">
<bean name="c4cQuoteSoapAdapter" class="com.sap.datahub.c4c.adapter.soapadapter.core.C4cSoapAdapter">
<property name="targetSystemType" value="C4C_QUOTE_SOAP_JAXWS" />
... other properties...
</bean>
</beans>
The C4C_QUOTE_SOAP_JAXWS value registers the c4cquote-soap-adapter in Data Hub against the con guration that was de ned within c4cquote-
target.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 64/99
3/5/2020
Where:
ApacheCxfSoapClientProxy: a class created on the y by apache CXF. It represents the actual SOAP client that access the C4C SOAP Service.
Interceptor, PhaseInterceptor, AbstractPhaseInterceptor: Apache CXF interceptor classes that allow modi cation of SOAP message.
Publication Process
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 65/99
3/5/2020
C4cQuoteSoapAdapter: Handles any exception that comes from the publisher and if any, marks the publication as FAILURE, otherwise as SUCCESS.
C4cQuoteSoapPublisher: In charge of processing and converting target items into SAP C4C speci c objects.
C4cQuoteSoapProcessor: Creates the quote and quote approval noti cation SOAP requests and sends it to SAP C4C.
C4cQuoteSoapPublisher
Current implementation: DefaultC4cQuoteSoapPublisher processes the quote and quote approval noti cation target items. For processing the target
items, there are populators that transform the target items into SAP Cloud for Customer speci c objects.
Following are populators and handlers that create the C4C speci c objects:
DefaultQuotePopulator: Populates data from QuoteItem which mainly contains the header data for quote in C4C
DefaultQuoteEntryPopulator: Populates data from QuoteEntryItem which mainly contains the item data for quote in C4C.
DefaultQuoteCommentPopulator: Populates data from QuoteCommentItem which contains the notes data for quote in C4C.
DefaultQuotePartnerHandler: Populates data from QuotePartnerItem which contains the customer data for quote in C4C.
DefaultQuoteApprovalNotificationHandler: Populates data from QuoteApprovalNoti cationItem which contains approval noti cation data for
quote in C4C.
While processing the target items, CustomerOrderRequestRequest and SalesOrderNotification are populated by populators and handlers and are
set in ProcessContext.
C4cQuoteSoapProcessor
The current implementation of DefaultC4cQuoteSoapProcessor uses JAX-WS SOAP clients that are created against the following WSDL les:
c4cquote-soap-schema/src/main/resources/META-INF/wsdl/CustomerOrderReplicationIn.wsdl
c4cquote-soap-schema/src/main/resources/META-INF/wsdl/CustomerQuoteProcessingUpdati1.wsdl
The JAX-WS clients are con gured within spring in the following le: c4cquote-soap-adapter/src/main/resources/META-INF/c4cquote-soap-
adapter-datahub-extension-spring.xml.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 66/99
3/5/2020
<beans xmlns="http://www.springframework.org/schema/beans">
... some other spring beans ...
<jaxws:client id="quoteReplicationClient" serviceClass="com.sap.datahub.c4c.adapter.schema.com.sap.xi.ap.crm.globa
... some other properties ...
</jaxws:client>
<jaxws:client id="quoteApprovalClient" serviceClass="com.sap.datahub.c4c.adapter.schema.notification.com.sap.xi.ap.crm.global.C
... some other properties ...
</jaxws:client>
... some other spring beans ...
</beans>
The above beans are attached to the DefaultC4cQuoteSoapProcessor and are used for reaching the C4C SOAP endpoint.
<beans xmlns="http://www.springframework.org/schema/beans">
Party De nition
C4C expects SenderParty and RecipientParty which are part of the request message header. These two elds are resolved based on the pool name where
the target items are contained and queries the local con guration looking for the values to be applied. For more information about DATA_FEED and POOL_NAME
con guration, see Feeds and Pools.
For instance, if the target items are contained in SAPC4CQUOTE_OUTBOUND_POOL pool, then properties should be de ned as shown below:
datahub.c4c.senderParty.schemeID.SAPC4CQUOTE_OUTBOUND_POOL=CommunicationSystemID
datahub.c4c.senderParty.internalID.SAPC4CQUOTE_OUTBOUND_POOL=HYBRISINT
datahub.c4c.senderParty.schemeAgencyID.SAPC4CQUOTE_OUTBOUND_POOL=310
datahub.c4c.recipientParty.schemeID.SAPC4CQUOTE_OUTBOUND_POOL=LocalSystemID
datahub.c4c.recipientParty.internalID.SAPC4CQUOTE_OUTBOUND_POOL= 0LO7ESC
datahub.c4c.recipientParty.schemeAgencyID.SAPC4CQUOTE_OUTBOUND_POOL=310
<SenderParty>
<InternalID schemeID="CommunicationSystemID"schemeAgencyID="310">
HYBRISINT
</InternalID>
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID"schemeAgencyID="310">
0LO7ESC
</InternalID>
</RecipientParty>
QuoteMessageIdInterceptor
This Apache CXF interceptor modi es the endpoint URL. The interceptor uses the same ID that is generated for the request UUID. For instance, based on the
following payload:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:CustomerOrderRequestMassRequest xmlns:ns4="http://sap.com/xi/SAPGlobal20/Global">
<MessageHeader>
<ID>729349E61DED4D0FBCF1D7CFA9D79136</ID>
<UUID>729349E6-1DED-4D0F-BCF1-D7CFA9D79136</UUID>
<CreationDateTime>2017-03-22T14:06:25.243Z</CreationDateTime>
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID>
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESC</InternalID>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 67/99
3/5/2020
</RecipientParty>
</MessageHeader>
<CustomerOrderRequest>
... quote info ...
</CustomerOrderRequest>
</ns4:CustomerOrderRequestMassRequest>
</soap:Body>
</soap:Envelope>
For example:
The UUID is: 729349E6-1DED-4D0F-BCF1-D7CFA9D79136. This value is added to the endpoint in a way that the SOAP end-point address is:
https://qxl-cust238.dev.sapbydesign.com/sap/bc/srt/scs/sap/customerorderreplicationin?MessageId=729349E6-1DED-4D0F-BCF1-D7CFA9D7
QuoteApprovalMessageIdInterceptor
This Apache CXF interceptor modi es the endpoint URL. The interceptor uses the same ID that is generated for the request UUID. For instance, based on the
following payload:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:SalesOrderMassNotification xmlns:ns4="http://sap.com/xi/SAPGlobal20/Global">
<MessageHeader>
<ID>729349E61DED4D0FBCF1D7CFA9D79136</ID>
<UUID>729349E6-1DED-4D0F-BCF1-D7CFA9D79136</UUID>
<CreationDateTime>2017-03-22T14:06:25.243Z</CreationDateTime>
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID>
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESC</InternalID>
</RecipientParty>
</MessageHeader>
<SalesOrderNotification>
... quote approval notification info ...
</SalesOrderNotification>
</ns4:SalesOrderMassNotification>
</soap:Body>
</soap:Envelope>
For example:
The UUID is: 729349E6-1DED-4D0F-BCF1-D7CFA9D79136. This value is added to the endpoint, in a way that the SOAP endpoint address is:
https://qxl-cust238.dev.sapbydesign.com/sap/bc/srt/scs/sap/customerquoteprocessingupdati1?MessageId=729349E6-1DED-4D0F-BCF1-D7CF
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 68/99
3/5/2020
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns4:CustomerOrderRequestMassRequest xmlns:ns3="http://sap.com/xi/AP/Common/Global" xmlns:ns2="http://xiTest.com
<MessageHeader>
<ID>ECB7633319F342409334D2C402ADB25A</ID>
<UUID>ECB76333-19F3-4240-9334-D2C402ADB25A</UUID>
<CreationDateTime>2017-04-19T10:30:28.896Z</CreationDateTime>
<SenderParty>
<InternalID schemeID="CommunicationSystemID" schemeAgencyID="310">HYBRISINT</InternalID>
</SenderParty>
<RecipientParty>
<InternalID schemeID="LocalSystemID" schemeAgencyID="310">0LO7ESC</InternalID>
</RecipientParty>
</MessageHeader>
<CustomerOrderRequest>
<CustomerOrderRequest otherPartyListCompleteTransmissionIndicator="true" itemCompleteTransmissio
<ID>0006200354</ID> <--
<SenderSequenceNumberValue>20170419160028</SenderSequenceNumberValue>
<ProcessingTypeCode>ZAGR</ProcessingTypeCode> <--
<Name>Quote from hybris</Name>
<BuyerID>0006200354</BuyerID>
<BuyerParty>
<RoleCode>AG</RoleCode>
<OtherID>
<ID>0000000592</ID>
<IDType>918</IDType>
<LogicalSystemID>Q5ECLNT004</LogicalSystemID>
</OtherID>
</BuyerParty>
<BillToParty>
<RoleCode>RE</RoleCode>
<OtherID>
<ID>0000000592</ID>
<IDType>918</IDType>
<LogicalSystemID>Q5ECLNT004</LogicalSystemID>
</OtherID>
</BillToParty>
<ProductRecepient>
<RoleCode>WE</RoleCode>
<OtherID>
<ID>0000000592</ID>
<IDType>918</IDType>
<LogicalSystemID>Q5ECLNT004</LogicalSystemID>
</OtherID>
</ProductRecepient>
<SalesBusinessArea>
<SalesOrganisationID/>
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 69/99
3/5/2020
<DistributionChannelCode>01</DistributionChannelCode>
<DivisionCode>00</DivisionCode>
<SalesOrganisationOtherID>
<ID>1000</ID>
<LogicalSystemID>Q5ECLNT004</LogicalSystemID>
</SalesOrganisationOtherID>
</SalesBusinessArea>
<PricingTerms>
<CurrencyCode>EUR</CurrencyCode>
</PricingTerms>
<TextCollection textListCompleteTransmissionIndicator="false">
<Text actionCode="01">
<TypeCode>10008</TypeCode>
<ContentText languageCode="EN">Please give 5% discount</ContentText>
</Text>
</TextCollection>
<Item actionCode="04" scheduleLineCompleteTransmissionIndicator="true" ItemCustomDefined
<ID>10</ID>
<Description>Demo #9999</Description>
<ItemProduct>
<ProductOtherID>
<ID>MDECC-DS01</ID>
<LogicalSystemID>Q5ECLNT004</LogicalSystemID>
</ProductOtherID>
</ItemProduct>
<ScheduleLine>
<ScheduleLineID>0001</ScheduleLineID>
<TypeCode>1</TypeCode>
<Quantity unitCode="EA">10</Quantity>
</ScheduleLine>
</Item>
</CustomerOrderRequest>
</CustomerOrderRequest>
</ns4:CustomerOrderRequestMassRequest>
</soap:Body>
</soap:Envelope>
Following is the complete quote approval noti cation SOAP request that is sent to C4C:
c4ccpiquote Extension
The c4ccpiquote extension is responsible for the integration of quote management services between SAP Commerce and SAP Cloud for Customer.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 70/99
3/5/2020
Overview
The c4ccpiquote extension provides the following functionalities:
Note
This content is only relevant if you have the latest Commerce Cloud Extension Pack, see Commerce Cloud Extension Pack. The Commerce Cloud Extension Pack
can only be used with SAP Commerce Cloud in the Public Cloud.
Getting Started
Follow the instructions below to integrate quote management services between SAP Commerce and SAP Cloud for Customer:
4. Start the server,and then in SAP Commerce Administration Cockpit initialize SAP Commerce.
Dependencies
The c4ccpiquote extension depends on the following extensions:
commerceservices (commerceservices-module)
integrationservices (mdm-integration-apis-module)
outboundservices (mdm-integration-apis-module)
inboundservices (mdm-integration-apis-module)
sapcpiadapter (sap-scpi-module)
saporderexchange (sap-asynchronosOM-module)
odata2webservices (mdm-integration-apis-module)
b2bacceleratorservices (b2b-accelerator-module)
sapmodel (sap-model-module)
The service DefaultSapCpiC4CQuoteService publishes an event SapC4CCpiQuoteBuyerSubmitEvent when a B2B customer creates or updates a
quote from the B2B storefront. The SapC4CCpiQuoteBuyerSubmitEventListener handles the event and starts the process sap-cpi-c4cquote-
buyer-submit-process.
SapCpiSendC4CQuoteAction
The sendQuote method in this class takes SAPC4CCpiOutboundQuoteModel and sends it to SAP Cloud for Customer with the help of
DefaultOutboundServiceFacade in the outboundservices extension.
Once the quote is replicated to SAP Cloud for Customer, a con rmation is sent to SAP Commerce along with the external ID via SAP Cloud Platform
Integration. The inbound iFlow (CommerceQuoteCon rmationInbound) receives and processes the payload and sends it to SAP Commerce which further
updates the quote with the external quote ID.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 71/99
3/5/2020
A sales representative logs into SAP C4C. An XML payload containing this quote details is sent to SAP Commerce through SAP Cloud Platform Integration.
Following classes are executed for handling this quote inbound request:
SapCpiSalesQuoteInboundPrePersistHook
This pre-persist hook gets called by the integration object framework before persisting the quote object in SAP Commerce. The execute method of this class calls
the instance of C4CCpiInboundQuoteHelper and returns the updated quote object to the integration object framework, for persisting.
DefaultC4CCpiInboundQuoteHelper
This helper class is called by SapCpiSalesQuoteInboundPrePersistHook to do all the required processing of the quote object. The
processSalesInboundQuote is the entry point to this class.
New quote: quote is always created in SAP Commerce, and is sent to C4C to get the external price details and discounts
Existing quote: in this scenario the quote is rst created in SAP Commerce and is replicated in to C4C for the sales representative’s consideration. The
processSalesInboundQuote method replicates the existing version of the quote to create a new version, and processes header level comments,
discounts, and taxes.
DefaultSapCpiC4CQuoteService publishes an event SapC4CCpiQuoteCancelEvent when a B2B customer cancels a quote in the B2B
storefront. The SapC4CCpiQuoteCancelEventListener handles the event and starts the process sap-cpi-c4c-quote-post-
cancellation-process.
DefaultC4CCpiInboundQuoteOrderedHelper
This class is invoked when SAP Commerce receives an order con rmation from the back-end system. processOrderConfirmationFromHub is the entry
point to this class.
waitForERPConfirmation: this wait action waits for the event ERPOrderConfirmationEventForC4CQuote_orderCode to be triggered by
DefaultC4CCpiInboundQuoteOrderedHelper class, on receipt of the order con rmation noti cation from the back end. On this event trigger,
SendSalesQuoteToC4CAction is performed.
SendSalesQuoteToC4CAction
The sendOrderNotification method in this class takes C4CSalesOrderNotificationModel and sends it to SAP Cloud Platform Integration
with the help of DefaultOutboundServiceFacade in the outboundservices extension.
Outbound:
C4COutboundQuote
C4COrderNoti cationOutbound
Inbound:
SalesInboundQuote
SalesQuoteCon rmationInbound
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 72/99
3/5/2020
Context
SAP Commerce supports the SAP Cloud for Customer solution integration. This integration is based on the following modules, extensions and functionalities:
There are several steps to the SAP Commerce - SAP Cloud for Customer Integration. Each step is described in the following documents:
Procedure
1. Installing SAP Commerce for SAP Cloud for Customer Integration
3. Integrating the SAP Commerce Assisted Service Module with SAP Cloud Identity
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 73/99
3/5/2020
Related Information
samlsinglesignon Extension
The installation procedure is divided between topics which relate to the B2C or B2B scenarios. The documents present the steps necessary to install the SAP
Commerce with the SAP Cloud for Customer solution for each of the scenarios:
Business to Customer
Business to Business
Business to Customer
Prior to using the SAP Commerce and SAP Cloud for Customer integration, you have to ful ll several requirements and install the software.
This document presents the steps necessary to install the SAP Commerce with the SAP Cloud for Customer solution.
Note
This document uses the {HYBRIS_HOME} term to refer to the directories created when you unzip the release .zip les .
Prerequisites
You need to perform several tasks in SAP Cloud for Customer prior to con guring SAP Commerce:
1. Create an employee.
2. Assign them either to the SERVICE_AGENT or SERVICE_MANAGER role, and set the business user password.
For information on creating employees and assigning roles in SAP Cloud for Customer solution, see the Create employees and Assign business roles to employees
sections: SAP Cloud for Customer Documentation: Create Employees on SAP Help Portal. For information on changing the business user password, see the related
links to access SAP Cloud for Customer Security Guide.
Note
SAP Cloud for Customer users are replicated in the SAP Cloud Identity every 15 minutes. Once the user is transferred to the SAP Cloud Identity, you receive an
e-mail on the address that you provided during the creation of the employee.
1. Perform the steps described in the Download and Unpack Packages and Build the SAP Commerce sections of the Installation document.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 74/99
3/5/2020
<extension name='assistedserviceatddtests' />
<extension name='c4ccustomer' />
<extension name='y2ysyncbackoffice' />
<webapp contextroot='datahub' path='../../../../../installer/work/datahub-
</extensions>
</hybrisconfig>
3. Install the necessary AddOns by running the following command from the {HYBRIS_HOME} /hybris/bin/platform directory:
Note
Make sure to set up the Apache Ant environment by opening the setantenv.bat le in the command prompt.
customerticketingaddon AddOn
assistedservicestorefront AddOn
acceleratorwebservicesaddon AddOn
4. Navigate to the {HYBRIS_HOME} /hybris/config directory and open the local.properties le. Set the properties to the following:
#customerticketingc4cintegration.facade.mock=true
customerticketingc4cintegration.facade.mock=false
adminweb.webroot=/admin
# The number of catalog sync worker threads
# to speed up Catalog synchronization on multicore machines
# This property might be set to an expression. #cores variable will be subs
# by a number of available cores.
catalog.sync.workers=16
addonfilter.active=false
#######################################################
#######################################################
# samlsinglesignon properties:
# Specifies the location of the spring context file putted automatically to
samlsinglesignon.application-context=samlsinglesignon-spring.xml
# the user type for newly created user in hybris
sso.mapping.asagentgroup.usertype=Employee
# the user group mapping that is valid in hybris
sso.mapping.asagentgroup.groups=asagentsalesmanagergroup
# the user type for newly created user in hybris
sso.mapping.SALES_REP.usertype=Employee
# the user group mapping that is valid in hybris
sso.mapping.SALES_REP.groups=asagentsalesgroup
# the user type for newly created user in hybris
sso.mapping.SALES_MANAGER.usertype=Employee
# the user group mapping that is valid in hybris
sso.mapping.SALES_MANAGER.groups=asagentsalesmanagergroup
# the user type for newly created user in hybris
sso.mapping.SERVICE_AGENT.usertype=Employee
# the user group mapping that is valid in hybris
sso.mapping.SERVICE_AGENT.groups=asagentsalesgroup
# the user type for newly created user in hybris
sso.mapping.SERVICE_MANAGER.usertype=Employee
# the user group mapping that is valid in hybris
sso.mapping.SERVICE_MANAGER.groups=asagentsalesmanagergroup
# the default context to use to build the redirect URL for security reasons
sso.redirect.url=YOURVALUE
# cookie age in seconds
sso.cookie.max.age=60
# cookie path
sso.cookie.path=/
# cookie domain
sso.cookie.domain=
#generated token name, if empty then samlPassThroughToken will be used
sso.cookie.name=samlPassThroughToken
# default password encoding
sso.password.encoding=md5
sso.usergroup.attribute.key=usergroup
sso.firstname.attribute.key=first_name
sso.lastname.attribute.key=last_name
sso.userid.attribute.key=mail
#######################################################
#######################################################
# customerticketingc4cintegration properties:
customerticketingc4cintegration.facade.mock=false
# Specifies the location of the spring context file putted automatically to
customerticketingc4cintegration.application-context=customerticketingc4cin
customerticketingc4cintegration.c4c-url=YOURVALUE
customerticketingc4cintegration.c4c-batch-suffix=/$batch
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 75/99
3/5/2020
# ticketing part of url, used for listing, creating, retrieving tickets
customerticketingc4cintegration.c4c-ticket-suffix=/ServiceTicketCollection
customerticketingc4cintegration.c4c-token-url-suffix=?$top=1
customerticketingc4cintegration.c4c-accept=Application/json
customerticketingc4cintegration.c4c-username=YOURVALUE
customerticketingc4cintegration.c4c-password=YOURVALUE
customerticketingc4cintegration.c4c-token-naming=x-csrf-token
customerticketingc4cintegration.c4c-site-header=c4c-odata-businessSystemID
customerticketingc4cintegration.c4c-token-empty=fetch
customerticketingc4cintegration.c4c-expand-suffix=$expand=Notes,RelatedTra
customerticketingc4cintegration.c4c-update-message-suffix=/ServiceRequestTe
# Specifies the value of created-by field in Note object to be replaced by
customerticketingc4cintegration.displayname=YOURVALUE
customerticketingc4cintegration.siteId.electronics=YOURVALUE
customerticketingc4cintegration.siteId.electronics.type=b2c
customerticketingc4cintegration.siteId.testb2bSite.type=b2b
commerceservices.default.desktop.ui.experience=desktop
datahub.c4c.exportURL=YOURVALUE
y2ysync.datahub.url=YOURVALUE
datahub.server.url=YOURVALUE
datahub.c4c.proxyServer=YOURVALUE
datahub.c4c.proxyServerPort=YOURVALUE
datahub.publication.saveImpex=true
datahub.c4c.userName=YOURVALUE
datahub.c4c.password=YOURVALUE
datahub.c4c.senderParty.schemeID.GLOBAL=CommunicationSystemID
datahub.c4c.senderParty.internalID.GLOBAL=HYBRISINT
datahub.c4c.senderParty.schemeAgencyID.GLOBAL=310
datahub.c4c.recipientParty.schemeID.GLOBAL=LocalSystemID
datahub.c4c.recipientParty.internalID.GLOBAL=0LO7ESO
datahub.c4c.recipientParty.schemeAgencyID.GLOBAL=310
c4c.payload.filename=payload.xml
kernel.autoInitMode=create-drop
datahub.encryption.key.path=/encryption-key.txt
c4c.soap.request.size.threshold=1000
c4c.soap.request.pause.between.requests=5000
Running this command results in creating a Data Hub with SAP Cloud for Customer integration .war le in the
{HYBRIS_HOME}\installer\work\datahub-tomcat\webapps directory.
6. Navigate to the {HYBRIS_HOME} /hybris/bin/platform directory and download the JDBC driver by running the following command:
mvn hybris:getDatabaseDrivers
7. Initialize the SAP Commerce system by running the following command from the {HYBRIS_HOME} /hybris/bin/platform directory:
Related Information
Installation
Extension Concept in the SAP Commerce
customerticketingc4cintegration Extension
Prerequisites
Make sure that you have the necessary Data Hub installed. See Install the Basic Prerequisites for a full overview.
Context
This topic presents the steps necessary to build and con gure a Data Hub war le including SAP Cloud for Customer plug-ins.
Note
This topic uses the following terms:
<HYBRIS_HOME> to refer to the directories created when you unzip the release ZIP les.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 76/99
3/5/2020
<DATAHUB_HOME> to refer the directory where a Data Hub WAR le is downloaded.
Procedure
1. Navigate to <HYBRIS_HOME> /hybris/bin/ext-integration/datahub/web-app/ and copy the datahub-webapp-xxx.war to
<DATAHUB_HOME> .
c4c-integration-canonical.jar
c4c-integration-raw.jar
c4c-integration-soap-adapter.jar
c4c-integration-target.jar
Note
The c4c-integration-sync is replaced by the y2ysync Data Hub extensions. For more information about y2ysync, see the y2ysync Framework
documentation.
4. Make sure you have the encryption-key.txt le. You can generate this key by following the steps in Tutorial: Using Attribute Encryption.
5. Create a local.properties le for the c4c-integration in <CONFIG_HOME> . Add the following properties:
datahub.enryption.key.path is path to your encryption key which you prepared in previous step.
datahub.c4c.exportURL which is url to your c4c endpoint, refer to a place where you want to export data from Data Hub .
local.properties
datahub.c4c.userName=user_name
datahub.c4c.password=your_password
c4c.soap.request.size.threshold=1000
c4c.soap.request.pause.between.requests=5000
csv.empty.value=<empty>
6. Navigate to or create the following path: <CATALINA_HOME> /conf/engine/host/ , where <engine> is your engine name and <host> is your host
name, where you want to deploy Data Hub . For example: <CATALINA_HOME> /conf/Catalina/localhost .
datahub-webapp.xml
<Context antiJARLocking="true"
docBase="${DATAHUB_HOME}/datahub-webapp-5.7.0.0-RCx.war"
reloadable="true">
<Loader className="org.apache.catalina.loader.VirtualWebappLoader"
virtualClasspath=
"${CONFIG_HOME};
${C4C_DEPENDENCIES_HOME}/*.jar;
${C4C_INTEGRATION_JARS}/*.jar" />
</Context>
8. Run Tomcat.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 77/99
3/5/2020
url:
http://localhost:8080/datahub-webapp/v1/data-feeds/DEFAULT_FEED/items/CustomerRawItem (if you did not change your tomc
http://<engine_host>:<tomcat_port>/datahub-webapp/v1/data-feeds/DEFAULT_FEED/items/CustomerRawItem (if you have change
method:
POST
headers:
Content-Type: application/octet-stream
data:
customerId,name,email
jd8,John Doe,[email protected]
Related Information
Installation Guide
Extension Concept in the SAP Commerce
Procedure
1. Log in to SAP Commerce Administration Console.
2. Modify the following impex les with appropriate values for credentials and hostname, and then select Import Impex to import the code:
essentialdata-OutboundC4cCustomer.impex
essentialdata-OutboundC4cCustomerConfiguration.impex
essentialdata-OutboundDestinations.impex
Business to Business
Prior to using SAP Commerce and SAP Cloud for Customer integration, you have to ful ll several requirements and install the software.
This document presents the steps necessary to install SAP Commerce with the SAP Cloud for Customer solution.
In the B2B scenario, the following feature in SAP Commerce has been integrated with the SAP Cloud for Customer back end:
Customer ticketing
Prerequisites
You need to perform several tasks in SAP Cloud for Customer and SAP ERP, prior to con guring SAP Commerce:
2. As SAP ERP and SAP Cloud for Customer systems are already integrated, the system replicates this employee from SAP ERP to SAP Cloud for Customer.
For more information, see the section Working in the Employee Staging Area in SAP Cloud for Customer documentation on SAP Help Portal.
3. For the business user created for the employee, assign either the SERVICE_AGENT or SERVICE_MANAGER role and set the password.
For information on assigning roles to business users in SAP Cloud for Customer solution, see the Assign business roles to employees section in the section Create
Employees in SAP Cloud for Customer documentation. For information on changing the business user password, see the related links to access SAP Cloud for
Customer Security Guide.
You can set an SSO password by following the link from the customer creation con rmation e-mail.
Note
SAP Cloud for Customer users are replicated in the SAP Cloud Identity every 24 hours. Once the user is transferred to the SAP Cloud Identity, you receive an e-
mail on the address you provided during the creation of the employee.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 78/99
3/5/2020
Context
Procedure
1. If you do not have the SAP Commerce and the SAP ERP integration scenario already installed, then perform the steps described in the Installing SAP
Commerce document.
For more information, see the document Con guring Available Extensions.
3. Install the necessary AddOns by running the following command from the {HYBRIS_HOME} /hybris/bin/platform directory:
Note
Make sure to set up the Apache Ant environment by opening the setantenv.bat le in the command prompt.
customerticketingaddon AddOn
assistedservicestorefront AddOn
4. Navigate to the {HYBRIS_HOME} /hybris/config directory and open the local.properties le. Set the properties to the following:
# customerticketingc4cintegration properties:
customerticketingc4cintegration.facade.mock=false
# Specifies the location of the spring context file putted automatically to the global platform application context.
customerticketingc4cintegration.application-context=customerticketingc4cintegration-spring.xml
customerticketingc4cintegration.c4c-url=YOURVALUE1
customerticketingc4cintegration.c4c-batch-suffix=/$batch
# ticketing part of url, used for listing, creating, retrieving tickets
customerticketingc4cintegration.c4c-ticket-suffix=/ServiceTicketCollection
customerticketingc4cintegration.c4c-token-url-suffix=?$top=1
customerticketingc4cintegration.c4c-accept=Application/json
customerticketingc4cintegration.c4c-username=YOURVALUE2
customerticketingc4cintegration.c4c-password=YOURVALUE3
customerticketingc4cintegration.c4c-token-naming=x-csrf-token
customerticketingc4cintegration.c4c-site-header=c4c-odata-businessSystemID
customerticketingc4cintegration.c4c-token-empty=fetch
customerticketingc4cintegration.c4c-expand-suffix=$expand=Notes,RelatedTransactions
customerticketingc4cintegration.c4c-update-message-suffix=/ServiceRequestTextCollection
# Specifies the value of created-by field in Note object to be replaced by customer name (would be the account used for hy
customerticketingc4cintegration.displayname=YOURVALUE4
customerticketingc4cintegration.siteId.<B2BSiteID>=YOURVALUE5
customerticketingc4cintegration.siteId. <B2BSiteID>.type=b2b
YOURVALUE5 -> This is the “System Instance ID”, from Cloud for Customer customizing in step “Setup Communication System” <B2BSiteID>-> This
is the Site ID for the B2B shop. (For example: powertools)
Related Information
Extension Concept in the SAP Commerce
SAP Cloud for Customer Security Guide
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 79/99
3/5/2020
Prerequisites
SAP C4C and SAP ERP/SAP S/4HANA on-premise master data should be in sync.
SAP Commerce communicates to C4C system using HTTPS, so import a certi cate from your C4C system and then install it in the Tomcat server to
establish a proper connection.
Context
A B2B customer can create a quote from the storefront for a cart of items that exceeds a threshold value. The master data such as customer, product, and B2B unit
are replicated from an integrated SAP ERP or SAP S/4HANA system.
Procedure
1. If you do not have the SAP Commerce and the SAP S/4HANA or the SAP ERP integration scenario already installed, then perform the steps described in the
Installing SAP Hybris Commerce document.
B2BCustomer
B2BUnit
Products
Price
For more information about master data replication, see SAP Master Data.
Procedure
1. Include scpiconnectorbackoffice extension in localextensions.
This enables a new node in Backoffice named SAP Cloud Platform Integration.
3. Log in to Backoffice and choose SAP Cloud Platform Integration SAP Cloud Platform Integration Con guration .
A window to create a new SAP Cloud Platform Integration con guration appears.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 80/99
3/5/2020
Name: Enter a name for the con guration
Base URL: Enter base URL of your SAP Cloud Platform Integration instance
5. Click Done.
6. Open the con guration again by clicking on search in the previous Backoffice window.
7. Scroll down and click in the iFlow Con guration text box.
This document describes the steps necessary to integrate the SAP Commerce Assisted Service Module with the SAP Cloud for Customer solution using the
samlsinglesignon extension.
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, please contact your sales representative.
General
The SAP Commerce Assisted Service Module allows the customer service representatives to perform actions on behalf of the customer. The ASM can be integrated
with the SAP Cloud for Customer solution.
To integrate the SAP Cloud Identity Service with the Assisted Service Module using the samlsinglesignon extension, you only need to change the most
important con guration options and leave the rest of the con guration options at their default state.
For a general overview of the SAP Cloud Identity's functionality, see the following video: https://www.youtube.com/watch?v=6y_gHhKSaIQ
Metadata
Certi cates
IDP discovery
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 81/99
3/5/2020
1. Navigate to the bin/modules/platform/samlsinglesignon/web/webroot/WEB-INF/security folder and open the spring-security-
config.xml le.
2. The below snippet shows the service provider's SAML Spring con guration pointing to the IDP metadata le.
samlsinglesignonresourcessecurityspring-security-config.xml
<!-- IDP Metadata configuration - paths to metadata of IDPs in circle of trust is here -->
<bean id="metadata" class="org.springframework.security.saml.metadata.CachingMetadataManager">
<constructor-arg>
<list>
<bean class="org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider">
<!-- URL containing the metadata -->
<constructor-arg>
<value type="java.io.File">${sso.metadata.location:classpath:security/metadata.xml}</value>
</constructor-arg>
<property name="parserPool" ref="parserPool"/>
</bean>
</list>
</constructor-arg>
</bean>
Note
You can con gure the value of the constructor argument of the metadata bean in the local.properties le. If no values are provided, the default
values present in the spring-security-config.xml le are used.
The value in the <constructor-arg> tag of the FilesystemMetadataProvider bean speci es the location and the name of the IDP metadata le.
You need to download the metadata le from the Tenant settings section of the SAP Cloud Identity Administration Console.
3. Navigate to your instance of the SAP Cloud Identity service and log in. The Administration Console is displayed.
4. In the Administration Console, click the Tenant Settings button. The Tenant Settings window is displayed.
5. In the Tenant Settings window, click the Tenant SAML 2.0 Con guration link. The Tenant SAML 2.0 Con guration window is displayed.
6. At the bottom of the page, click the Download Metadata File link.
7. When the le is downloaded, make sure to place it in the location speci ed between the <constructor-arg> tags of the
FilesystemMetadataProvider bean from the spring-security-config.xml le.
Service provider metadata contains keys, services and URLs de ning SAML endpoints of your application. You can generate the metadata automatically upon the
rst request to the service.
SAML exchanges involve usage of cryptography for signing and encryption of data. All interactions with cryptographic keys are done through the
org.springframework.security.saml.key.KeyManager interface . The default implementation
org.springframework.security.saml.key.JKSKeyManager relies on a single JKS key store which contains all private and public keys. KeyManager
should contain at least one private key which should be marked as default by using the alias of the private key as part of the JKSKeyManager constructor. By
default, the extension is shipped with a private key with the name hybris.
To obtain the metadata for the service provider, perform the following steps:
2. Access the following URL: http://localhost:9001/samlsinglesignon/saml/metadata. This action triggers the download of the service
provider's metadata le.
Note
URL
If you have set up SAP Commerce with the samlsinglesignon extension on another machine, make sure to change the host and port in the URL.
3. Upload and save the metadata le into your application in SAP Cloud Identity.
Note
For more information on creating application in SAP Cloud Identity, see the Create a New Application document.
samlsinglesignonresourcessecurityspring-security-config.xml
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 82/99
3/5/2020
<constructor-arg value="${sso.keystore.location:classpath:security/samlKeystore.jks}"/>
<constructor-arg type="java.lang.String" value="${sso.keystore.password:changeit}"/>
<constructor-arg>
<map>
<entry key="${sso.keystore.privatekey.alias:hybris}" value="${sso.keystore.privatekey.password:changeit}"/>
</map>
</constructor-arg>
<constructor-arg type="java.lang.String" value="${sso.keystore.default.certificate.alias:hybris}"/>
</bean>
Note
You can con gure the values of the constructor arguments of the keyManager bean in thelocal.properties le. If no values are provided, the default
values present in the spring-security-config.xml le are used.
In order for the signed metadata to work, you need to import the certi cate from the IDP for this signature into your keystore. By default, your keystore is the
samlkeystore.jsk le. To con gure the certi cates, perform the following steps:
2. Navigate to your instance of the SAP Cloud Identity service and log in. The Administration Console is displayed.
3. In the Administration Console, click the Tenant Settings button. The Tenant Settings window is displayed.
4. In the Tenant Settings window, click the Tenant SAML 2.0 Con guration link. The Tenant SAML 2.0 Con guration window is displayed.
5. At the bottom of the page, locate the Signing Certi cate section. Copy the certi cate and paste it into a le with the .cer extension, for example
key.cer.
Note
The lename is irrelevant, but it is used later on to import the certi cate.
6. Copy the key.cer le to the bin folder of your JDK installation directory.
Note
Parameters
Name Description
-importcert Speci es the what needs to be done with the certi cate.
8. Copy the new samlKeystore.jks le into the security folder of the samlsinglesignon extension. By default:
bin/modules/platform/samlsinglesignon/web/webroot/WEB-INF/security.
1. To add the custom usergroup attribute in the SAP Cloud Identity Service, follow the link in the Related Links at the end of this topic.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 83/99
3/5/2020
For the integration to work, you need to con gure the properties in the local.properties le.
2. Make sure that the properties are set to the following values:
local.properties
# Specifies the location of the spring context file putted automatically to the global platform application context.
samlsinglesignon.application-context=samlsinglesignon-spring.xml
# the default context to use to build the redirect URL for security reasons
sso.redirect.url=YOURVALUE
# cookie path
sso.cookie.path=/
# cookie domain
sso.cookie.domain=
# the location of the metadata file which holds the IDP info
sso.metadata.location=classpath:security/metadata.xml
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 84/99
3/5/2020
Note
The sso.redirect.url property has to be secure (https) and end with a slash (/).
1. When the user rst hits the SAML extension through a URL like this:
http://localhost:9001/samlsinglesignon/saml/yacceleratorstorefront/electronics/en/?site=electronics&asm=true
then the extension checks if this user is logged in or not.
Note
If the user is not logged in, then they are redirected to the SAP Cloud Identity login screen.
2. Once the user is logged in, a SAML assertion is created for this user and they are not required to login again. Then, the user is redirected to the SAML
extension again.
3. A controller intercepts the request, parses the URL, and does the following:
a. If the authenticated user exists on the SAP Commerce side, then the user is returned and the user groups are updated according to the mapping
between the shipped groups in the custom usergroup attribute and the valid SAP Commerce groups as per the corresponding properties in the
local.properties le.
b. If the user does not exist on the SAP Commerce side, they are created on the y and assigned the list of groups.
4. A secure cookie is generated with the customer information. This cookie is used by the Assisted Service Module.
5. The nal destination of this request is the part of the URL following the saml/ part, i.e. yacceleratorstorefront/electronics/en/?
site=electronics&asm=true.
6. Automatic redirection is done by taking what follows the /saml/ part of the URL and appending the domain in front of it. The domain is con gured in the
local.properties le as the sso.redirect.url property.
7. The ASM intercepts the request and checks and if there is a valid secure cookie, the system proceeds with the ASM login.
Related Information
http://docs.spring.io/autorepo/docs/spring-security-saml/1.0.x-SNAPSHOT/reference/htmlsingle/
https://help.hana.ondemand.com/cloud_identity/frameset.htm
http://help.sap.com/cloud4customer
https://help.sap.com/viewer/6d6d63354d1242d185ab4830fc04feb1/Cloud/en-US
This document presents the steps necessary to con gure SAP Cloud for Customer solution.
2. Setting up SSO between SAP Cloud for Customer and Identity Provider
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 85/99
3/5/2020
6. Con guring SAP Commerce Storefront Integration
Prerequisites
Ensure that SAP Commerce integration is active in SAP Cloud for Customer system.
Procedure
1. Log in to SAP Cloud for Customer system, as a system administrator.
2. In the Business Con guration work center, select the Implementation Projects view.
4. In the scoping wizard, choose Next until the Scoping screen appears.
5. Expand Communication and Information Exchange - Integration with External Applications and Solutions nodes.
7. After you have carefully reviewed and con rmed your entries, click Finish and close the view.
8. If this implementation project is scoped for the rst time, then proceed further to deploy the solution. Click on the Business Con guration work center, and
click Open Activity List.
Context
This procedure is based on the example, when SAP Cloud Identity is your Identity Provider.
Procedure
1. Log in to the SAP Cloud Identity system.
10. In the SAP Cloud for Customer system, click Administrator work center and choose Communication Certi cates.
The certi cate le you downloaded is in DER encoded format. However, SCI understands the certi cate le is in BASE encoded format.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 86/99
3/5/2020
Related Information
Converting the Tenant Certi cate File from DER to BASE Encoded Format
Converting the Tenant Certi cate File from DER to BASE Encoded Format
This procedure leads you through the steps needed to convert your tenant certi cate le from DER to BASE encoded format.
Procedure
1. Double-click on the certi cate le, and click Open.
5. Select a folder and enter a le name for the converted certi cate le.
6. Click Next and then Finish. The le is now available in the required format.
Procedure
1. Log in to SAP Cloud for Customer system, as a system administrator.
4. Upload the metadata le that you downloaded from your identity provider system (step 1 in the Prerequisites section).
Context
This procedure is based on the example, when SAP Cloud Identity is your Identity Provider.
Procedure
1. Log in to SAP Cloud Identity and click Applications.
2. Click the + icon at the bottom-left row to add an application. Enter a name, for example SAP Cloud for Customer, and click Save.
3. In the application, under Trust tab, click SAML 2.0 Con guration.
4. In the SAML 2.0 Con guration screen, under De ne from Metadata section, click Browse.
5. Select the metadata XML le you downloaded from SAP Cloud for Customer (step 2 in the Prerequisites section), and click Save.
6. In SAP Cloud Identity, click on the application you created, and under Trust tab click Name ID Attribute.
9. Upload the tenant certi cate you have downloaded from SAP Cloud for Customer (step 3 in prerequisites).
10. Click the back button, and choose HTTP Basic Authentication.
11. Click New to con gure a user for basic authentication in your identity provider.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 87/99
3/5/2020
Related Information
Integrating the SAP Commerce Assisted Service Module with SAP Cloud Identity
Procedure
1. Log in to the SAP Cloud for Customer system, as a system administrator.
3. Click New.
4. On the New Communication System screen, in the Basic Information section, enter the following information:
Option Description
ID SAP Commerce storefront instance ID, or name of the SAP Commerce system to
be connected
5. Optionally, in the Technical Contact section, you can enter data of the contact person for the SAP Commerce system.
Option Description
System Instance ID Enter the ID or name of the business instance of the SAP Commerce system
To nd your instance ID, navigate to local.properties le of SAP Commerce ECP and nd:
customerticketingc4cintegration.siteId.electronics=<hybrisbusinessinstanceid>.
Related Information
customerticketingc4cintegration Extension
Context
The communication arrangement represents the communication scenarios used for communicating with the SAP Commerce client.
Procedure
1. Log in to the SAP Cloud for Customer system, as a system administrator.
3. Click New.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 88/99
3/5/2020
4. On the New Communication Arrangement screen, enter the following information.
Option Description
Select Scenario Enter the communication scenario for your business requirement
Protocol: WebService
Protocol: WebService
Review Review your settings and Check Completeness and Check Service
Context
You know the end-point URL of the SAP Commerce system, for example, URL to the SAP Commerce ASM page or the service ticket page on SAP Commerce.
Procedure
1. Log in to the SAP Cloud for Customer system, as a system administrator.
4. Enter a name and a description for the mashup. The mashup's name is displayed to business users when using the mashup.
5. Under URL Information, enter the URL of the SAP Commerce web service to the ASM or service ticket page, and click Extract Parameters.
6. Enter any URL parameters that you want to pass with the URL, for example, a site parameter to capture the shop name.
You do not need to add the customer ID and ticket ID parameters, as they are automatically added to the URL by the system.
7. Click the Preview link to display the end result of the mashup.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 89/99
3/5/2020
The mashup is now active and ready to be used.
Procedure
1. Log in to the SAP Cloud for Customer system, as a system administrator.
3. Click New.
4. On the Integration Settings for Hybris Storefront screen, enter the following information.
Option Description
SAP Commerce Storefront ID Enter an ID, for example powertools, or name for the SAP Commerce system you
want to connect.
SAP Commerce Storefront Description Enter a short description of the SAP Commerce system.
SAP Commerce Storefront System Instance ID Enter the system instance ID of the SAP Commerce system.
SAP ERP System Instance ID Enter the system instance ID of the connected ERP system.
You can nd the SAP ERP System Instance ID in the SAP Customizing Implementation Guide: SAP NetWeaver Application Server IDoc Interface/
Application Link Enabling Basic settings Logical Systems De ne Logical System .
5. Create an entry to maintain a deep link to ASM page: Deep Link Settings Add Row Navigation to Storefront Assisted service Module (ASM) Page Enter
the mashup ID .
6. Create an entry to maintain a deep link to service ticket page: Deep Link Settings Add Row Navigation to Storefront Service Ticket Page Enter the
mashup ID .
Related Information
Installing SAP Commerce Manually
Extension Concept
2. B2C - Setting Up SSO Between SAP Cloud for Customer and Identity Provider
Prerequisites
Ensure that SAP Commerce integration is active in SAP Cloud for Customer system.
Procedure
1. Log in to SAP Cloud for Customer system, as a system administrator.
2. In the Business Con guration work center, select the Implementation Projects view.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 90/99
3/5/2020
3. Select your implementation project, and click Edit Project Scope.
4. In the scoping wizard, choose Next until the Scoping screen appears.
5. Expand Communication and Information Exchange - Integration with External Applications and Solutions nodes.
7. After you have carefully reviewed and con rmed your entries, click Finish and close the view.
8. If this implementation project is scoped for the rst time, then proceed further to deploy the solution. Click on the Business Con guration work center, and
click Open Activity List.
Context
This procedure is based on the example, when SAP Cloud Identity is your Identity Provider.
Procedure
1. Log in to the SAP Cloud Identity system.
10. In the SAP Cloud for Customer system, click Administrator work center and choose Communication Certi cates.
The certi cate le you downloaded is in DER encoded format. However, SCI understands the certi cate le is in BASE encoded format.
Related Information
B2C - Converting the Tenant Certi cate File from DER to BASE Encoded Format
B2C - Converting the Tenant Certi cate File from DER to BASE Encoded Format
This procedure leads you through the steps needed to convert your tenant certi cate le from DER to BASE encoded format.
Procedure
1. Double-click on the certi cate le, and click Open.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 91/99
3/5/2020
4. Select Base-64 encoded X.509 (.CER) and click Next.
5. Select a folder and enter a le name for the converted certi cate le.
6. Click Next and then Finish. The le is now available in the required format.
Procedure
1. Log in to SAP Cloud for Customer system, as a system administrator.
4. Upload the metadata le that you downloaded from your identity provider system (step 1 in the Prerequisites section).
Context
This procedure is based on the example, when SAP Cloud Identity is your Identity Provider.
Procedure
1. Log in to SAP Cloud Identity and click Applications.
2. Click the + icon at the bottom-left row to add an application. Enter a name, for example SAP Cloud for Customer, and click Save.
3. In the application, under Trust tab, click SAML 2.0 Con guration.
4. In the SAML 2.0 Con guration screen, under De ne from Metadata section, click Browse.
5. Select the metadata XML le you downloaded from SAP Cloud for Customer (step 2 in the Prerequisites section), and click Save.
6. In SAP Cloud Identity, click on the application you created, and under Trust tab, click Name ID Attribute.
7. In SAP Cloud Identity, click on the application you created, and under Trust tab, click Certi cate for API Authentication.
9. Upload the tenant certi cate you downloaded from SAP Cloud for Customer (step 3 in prerequisites).
10. Click the back button, and choose HTTP Basic Authentication.
11. Click New to con gure a user for basic authentication in your identity provider.
Related Information
Integrating the SAP Commerce Assisted Service Module with SAP Cloud Identity
Procedure
1. Log in to the SAP Cloud for Customer system, as a system administrator.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 92/99
3/5/2020
3. Click New.
4. On the New Communication System screen, in the Basic Information section, enter the following information:
Option Description
ID SAP SAP Commerce Storefront Instance ID, or name of the SAP Commerce
system to be connected
5. Optionally, in the Technical Contact section, you can enter data of the contact person for the SAP Commerce system.
Option Description
System Instance ID Enter the ID or name of your business instance of the SAP Commerce system.
Related Information
customerticketingc4cintegration Extension
Context
You know the end-point URL of the SAP Commerce system, for example, URL to the SAP Commerce ASM page or the service ticket page on SAP Commerce.
Procedure
1. Log in to the SAP Cloud for Customer system, as a system administrator.
4. Enter a name and a desciption for the mashup. The mashup's name is displayed to business users when using the mashup.
5. Under URL Information, enter the URL of the SAP Commerce web service to the ASM or service ticket page, and click Extract Parameters.
6. Enter any URL parameters that you want to pass with the URL, for example, a site parameter to capture the shop name.
You do not need to add the customer ID and ticket ID parameters, as they are automatically added to the URL by the system.
7. Click the Preview link to display the end result of the mashup.
Procedure
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 93/99
3/5/2020
1. Log in to the SAP Cloud for Customer system, as a system administrator.
3. Click New.
4. On the Integration Settings for Hybris Storefront screen, enter the following information:
Option Description
SAP Commerce Storefront ID Enter an ID, say electronics, or name for the SAP Commerce system you want to
connect.
SAP Commerce Storefront Description Enter a short description of the SAP Commerce system.
SAP Commerce Storefront System Instance ID Enter the system instance ID of the SAP Commerce system.
5. Create an entry to maintain a deep link to ASM page: Deep Link Settings Add Row Navigation to Storefront Assisted service Module (ASM) Page Enter
the mashup ID .
6. Create an entry to maintain a deep link to service ticket page: Deep Link Settings Add Row Navigation to Storefront Service Ticket Page Enter the
mashup ID .
Procedure
1. Go to Administrator Communication Arrangements .
2. Click New.
3. Select Business Partner replication from SAP Business Suite, and click Next.
4. Select the System Instance ID you entered while creating the communication system, and click Next.
6. Enter the user credentials of the technical user created to log in to hybris.
8. To create and activate your communication arrangement in the system, click Finish.
Related Information
Installing SAP Commerce Manually
Extension Concept
Procedure
1. Log in to Backoffice.
Processing Type Code: processing type code from SAP Cloud for Customer
4. Modify the impex le essentialdata-c4cquoteOutboundDestinations.impex with appropriate values for credentials and host name, and then
select Import Impex to import the code.
Related Information
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 94/99
3/5/2020
Replicating Quote Between SAP Commerce and SAP Cloud for Customer
c4ccpiquote Extension
1. Go to the following address: https://<hostname:port>/samlsinglesignon/saml. This link takes you to SAP Cloud Identity login page.
2. On SAP Cloud Identity login page, enter SAP Cloud for Customer employee's credentials and log in. After successfully logging in, you are redirected to the
page whose location you speci ed in the sso.redirect.url property of the local.properties le.
3. Go to the following address:https://<hostname:>sso.dev.sapbydesign.com. You can view this link in the SAP Cloud for Customer system. Go to
Administrator work center, then to Con gure Single Sign-On view, and at the end go to Single Sign-On URL Handling. If SSO is activated, this link will take
you to the SAP Cloud for Customer login page.
4. On the login page, enter SAP Cloud for Customer credentials and log in.
Customer Creation
To check if the replication of customers from the SAP Commerce storefront to SAP Cloud for Customer is working correctly, perform the following steps:
3. Log in to SAP Cloud for Customer solution and switch to the Customers tab.
4. In the search eld, type the e-mail address you provided on the SAP Commerce storefront.
Ticket Creation
To create a support ticket, perform the following steps:
4. On the Request Customer Support page, enter the Subject and the Message of the ticket.
5. Click the Submit button. Your ticket is sent to the customer service system.
Note
When your ticket is sent successfully, the following message is displayed: Thank you for your customer support request. Your message has been sent
to one of our Customer Service Agents who will contact you shortly.
4. Search for the customer who you used to create the ticket and ensure the ticket is visible in the SAP Cloud for Customer.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 95/99
3/5/2020
Customers > Contacts
To check if the customer support agent can navigate from SAP Cloud for Customer to SAP Commerce Storefront, perform the following steps:
2. Go to any view (listed above) that has the SAP Commerce Storefront link. For example, in the Customers work center, click Individual Customers.
3. Click on an ID in a row.
4. In the screen that appears, click Actions, and choose SAP Commerce Storefront.
SAP Cloud for Customer user should be automatically logged in to SAP Commerce Storefront.
This document guides you through the setup process of the ATDD test for SAP Cloud for Customer on your local machine.
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, please contact your sales representative.
Note
This document uses the term:
{HYBRIS_HOME} to refer to the directory where you unzipped SAP Commerce package.
<extensions>
<!-- ... -->
<extension name='c4ccustomeratddtests' />
<!-- ... -->
</extensions>
datahub.c4c.exportURL=http\://127.0.0.1\:8080/c4c-endpoint-mock-webapp/services/businessPartnerReplicationInMockService
y2ysync.datahub.url=http\://localhost\:8080/datahub/v1/data-feeds/y2ysync
datahub.server.url=http\://localhost\:8080/datahub/v1
3. In the localproperties le, add the following line and replace the ${HYBRIS_HOME} with absolute path where you unzipped the SAP Commerce
package.
c4ccustomeratddtests.war.path=${HYBRIS_HOME}/c4c-integration/binary/c4c-datahub-webapp.war
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 96/99
3/5/2020
Related Information
c4c-integration-raw Extension
c4c-integration-canonical Extension
c4c-integration-target Extension
c4c-integration-soap-adapter Extension
Data Hub
Synchronization Between SAP Commerce Installations
Before performing these con gurations, ensure that you have received the SAP Cloud Platform Integration provisioning email. You must also ensure that the
required user credentials have been created for SAP Cloud Platform Integration.
Note
You can also perform the replication of customer data using Data Hub.
Prerequisites
You must have a valid SAP license and a valid SAP Cloud Platform Integration tenant subscription.
Context
The customer account can be created by the customer directly using the SAP Commerce storefront or by the customer support agent (on request by the
customer). Once the customer account is created in SAP Commerce, the customer data is replicated to SAP Cloud for Customer using SAP Cloud Platform
Integration package.
Con gure the following in SAP Cloud Platform Integration for the replication of customer data.
Procedure
1. Log in to SAP Cloud Platform.
2. Choose the package SAP Commerce Cloud Integration with SAP Cloud for Customer.
3. Choose Artifacts.
4. Choose the action icon corresponding to the respective iFlow and choose Con gure.
Replication-of-Customer-from-SAP- Replicate customer data from SAP Type Select All Parameters to view all
Commerce-Cloud-to-SAP-Cloud-for- Commerce to SAP Cloud for Customer con gurable parameters
Customer
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 97/99
3/5/2020
Related Information
SAP Commerce Integration with SAP Cloud for Customer on SAP API Business Hub
Context
A B2B commerce quote created in SAP Commerce is replicated SAP Cloud for Customer for further processing. Any updates to the quote in SAP Cloud for
Customer are replicated back to SAP Commerce.
Procedure
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 98/99
3/5/2020
1. Log in to SAP Cloud Platform.
2. Choose the package SAP Commerce Cloud - B2B Integration with SAP Cloud for Customer.
3. Choose Artifacts.
4. Choose the action icon corresponding to the required integration ow, and choose Con gure.
CommerceQuoteOutbound Replicates quote from SAP Commerce QuoteReplicationURL Target URL for SAP Cloud for Customer
to SAP Cloud for Customer System quote replication service interface
CommerceQuoteCon rmationInbound Noti es SAP Commerce about the Address SAP Commerce host URL
external ID from SAP Cloud for
Customer Proxy Type On-Premise or Internet
CommerceQuoteInbound Replicates the updated quote from SAP Address SAP Commerce host URL
Cloud for Customer to SAP Commerce
Proxy Type On-Premise or Internet
CommerceOrderNoti cationOutbound Noti es SAP Cloud for Customer about QuoteUpdationURL Target URL for SAP Cloud for Customer
the order creation in the back end and quote updation service interface
updates the order information in the
quote CommunicationSystemID Con gured in the communication
system of SAP Cloud for Customer
Related Information
Con guring SAP Commerce for Quote Replication using SAP Cloud Platform Integration
SAP Commerce Cloud - B2B Integration with SAP Cloud for Customer on SAP API Business Hub
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21802335&topics=8c47c75c86691014895c8d27d7… 99/99