In this blog I would like to share with you a solution approach on replicating account relationships from ERP to SAP Hybris Cloud for Customer (C4C). This topic recently came up in a discussion I had with a customer on their business partner replication setup:
Integration Scenario and setup:
Replicate Business Partner from SAP ERP to C4C.
The users maintains in SAP ERP an account (ID: 1000) with the partner function “WE” (related to customer ID 2000) and “RE” (related to customer ID 3000).
In C4C the user maintains for the account with the external ID 1000 manually the relationship “ZZ”.
Accounts are being replicated including their SAP ERP partner function to C4C (Replication direction only from SAP ERP –> C4C).
In C4C the partner function ends up in the account relationships. In C4C users can add additional C4C specific relationships.
As in the given example the SAP ERP system is the master for the accounts, the replication back to the SAP ERP is not implemented.
When changes in SAP ERP trigger an update on the account in C4C the previously added C4C specific relationships will be deleted.
This happens because the business partner replication from SAP ERP to C4C is a full transmission of all data of the replicated business partner. Hence, the C4C specific relationship gets deleted with the update from SAP ERP as the information is not available there.
In the middleware the payload of the C4C inbound web service to replicate the business partners needs to be adjusted.
The payload of the ERP specific partner function looks like this – the action code “04” indicates an update of the node.
In order to suppress now the change on the customer specific relationship the action code “06” needs to be maintained in the payload for the relationship type “ZZ”:
In addition the partner function code “ZZ” need to be mapped in the code list mapping against the C4C specific code, which must not be overwritten. Hence the partner function code used in the payload can be any code as long it is mapped against the proper code in C4C.