CX Works

CX Works brings the most relevant leading practices to you.
It is a single portal of curated, field-tested and SAP-verified expertise for SAP Customer Experience solutions

Contact-to-Account Relationships in SAP Marketing Cloud (Part 5/5)

12 min read

Contact-to-Account Relationships in SAP Marketing Cloud | Part 5: Business Partner Relationships and SAP CRM Configuration

Are you using SAP Marketing Cloud in a B2B scenario and your customer contacts are assigned to multiple accounts in the sales system? 

Then the following article series could help to understand the business scenarios and processes behind a B2B-oriented setup in SAP Marketing Cloud – how to build multiple relationships between contacts and accounts and how to implement following best practices in a standardized data model of a business partner over the whole system landscape.

In part 4 of this article series you have learned about the creation of the Confirm Business Partner Replication IDoc. In this part you will learn how to set up the Business Partner Relation Replication, Key Mapping and which configuration is required in SAP CRM. We will show how the Integration Content can be built and which Standard Integration Content can be reused. At the end of this article you will have finished the article series and have a good understanding on how to build the Integration Content for the SAP Business Partner Entity, when integrating SAP CRM and SAP Marketing Cloud.

This article will conclude the article series on Contact-to-Account Relationships in SAP Marketing Cloud.

Table of Contents

Replicate Business Partner Relationship from SAP Business Suite

This chapter focuses on building the Business Partner Relationships Integration Content. This is essential if you are utilizing relationships between your Business Partners and need this information for segmentation purposes in the SAP Marketing Cloud.

Step 1 - Start from SAP CRM - SAP Marketing Cloud Standard Integration IFlow

Standard Integration PackageSAP Marketing Cloud Integration with SAP Customer Relationship Management

Integration Flow: Replicate Business Partner Relationship from SAP CRM to SAP Marketing Cloud

We aim to replicate business partner relationships from SAP CRM to SAP Marketing Cloud using the SOAP web services. Instead of starting from scratch it's useful to start from the standard integration flow that uses OData service and salvage the parts that can be reused.

From the IFlow picture above the integration content in the blue box can be reused - there we already have the IDOC receiver set up and we have a script that logs payloads. 

The content in the red box is the one we aim to replace since we want to map the IDOC to the SOAP Web Service structure and not the OData one. The Request-Reply step is not supported for SOAP adapters and therefore we need to replace it with an End Message Event. 

This new mapping also does not have to be built from scratch and we can reuse an already existing mapping from the standard business partner relationship replication from SAP CRM to SAP Cloud for Customer as a starting point as well as other useful steps.

Step 2 - Leverage SAP CRM - SAP Cloud for Customer Business Partner Relationship Replication Standard Integration content.

Standard Integration PackageSAP Cloud for Customer Integration with SAP CRM

Integration FlowReplicate Business Partner Relationship and Business Partner Hierarchy from SAP Business Suite

From the above integration flow we can reuse the highlighted content:

  • Filter: Makes sure the payload brings a valid IDOC

  • Content Modifier Prepare Mapping Input: Restores the root tag of the message, lost at filter step

  • Mapping: This mapping has the majority of the required fields already mapped for the relationship replication, nevertheless target message WSDL needs to be updated with the one from SAP Marketing Cloud.

We can reuse the mapping because both SAP Marketing Cloud and SAP Cloud for Customer business partner relationship integration flows use the same IDOC message type "CRMXIF_PARTNER_REL_SAVE_M02" and the same SOAP web service "BusinessPartnerRelationshipSUITEBulkReplicateRequest" therefore we can take it as a starting point for the mapping that we are going to replace in the IFlow we are customizing in step one. 

After reusing the above content the IFlow from point one should look close to the next example.

Changes to be done

Content Modifier - Set Application ID

Filter IDOC

Prepare Mapping Input

Step 3 - Replace SAP Cloud for Customer SOAP Service WSDL with SAP Marketing Cloud SOAP Service WSDL

In order to start adapting that mapping the first change to be done is to replace the message WSDL for the SAP Marketing Cloud SOAP-based web service we are going to use for the business partner relationship replication message, although it's the "same" as the one used in SAP Cloud for Customer (BusinessPartnerRelationshipSUITEBulkReplicateRequest) the messages might not be exactly the same.

To do so we should download it from SAP Marketing Cloud Communication Arrangement SAP_COM_0475 - SAP Business Partner Integration and click the WSDL download button for the Business Partner Relationship - Replicate from Client to SAP S/4HANA Cloud.

After downloading the WSDL you will have to upload it to the message mapping of the integration flow:

Now that we have the correct target message WSDL the next step is to review the mappings and make sure we do the proper adaptations.

Step 4 - Update mappings for Replicate Business Partner Relationship from SAP CRM to SAP Marketing Cloud

Mappings to Update by Sections: 


Section: /ns0:BusinessPartnerRelationshipSUITEBulkReplicateRequest/BusinessPartnerRelationshipSUITEReplicateRequestMessage/BusinessPartnerRelationship/

  • RoleCode

    • For Role Code we replaced the standard mapping for a fixed mapping. In our case, relationships are filtered at the CRM level and only valid relationships arrive to Cloud Integration. They are all mapped to the BUR001 Relation category, which is a very customer-specific scenario.

  • ValidityPeriod/StartDate


  • ValidityPeriod/EndDate


  • Delete Unsupported mappings

It is very important to map the SenderBusinessSystemID and RecipientBusinessSystemID in order to match the correct business partners.

After completing the above changes in the mapping and after all the setup is done in SAP Marketing Cloud and SAP CRM you should be ready to receive Business Partner Relationships in SAP Marketing Cloud.

Replicate Key Mapping to SAP Business Suite

These sections will go through the steps we took to create the Key Mapping IFlow and the mappings that worked for our scenario. The Key Mapping is important, in order not to create duplicate entries in your external systems, e.g. if you are transferring leads from SAP Marketing Cloud to SAP Cloud for Customer, the Key Mapping makes sure to retrieve the C4C Business Partner ID if available.

Step 1 -  Enhance the Business Partner IFlow

The following steps have to be added:

  • Sequential multicast

  • Router

  • Message mapping

IFlow: Replicate Business Partner from SAP CRM to SAP Marketing Cloud

Changes to be done:

  • Sequential Multicast - Required to ensure the business partner is created before the key mapping.

  • Router - Key Mapping Enabled - Allows us to activate and deactivate the key mapping replication by an external parameter to facilitate testing and development.

  • Message Mapping - Key Mapping

    • Source Message - The source message WSDL is the same used In the BP mapping of the first sequence.
    • Target message - This WSDL has to be downloaded from Communication Arrangement Key Mapping Hub Integration (SAP_COM_0539) and click the WSDL download button for the Key Mapping - Replicate from Client to SAP S/4HANA.

    • Add the WSDL as the target message.

Step 2 - Adapt the Mappings


For the easiness of reading, we decided to provide the mapping extract instead of the graphical mapping

  • /ns2:KeyMappingBulkReplicateRequest
    • Map to empty constant.


Section: /ns2:KeyMappingBulkReplicateRequest/MessageHeader/

  • Map to empty constant.
  • ID & UUID


  • CreationDateTime

  • SenderParty
    • Map to empty constant.
  • SenderParty/InternalID
  • RecipientBusinessSystemID
  •  SenderParty/InternalID/@schemeAgencyID
    • Map to constant "310"
  • SenderParty/InternalID/@schemeID
    • Map to constant "BusinessSystemID"
  • RecipientParty
    • Map to empty constant.
  • RecipientParty/InternalID
  • RecipientParty/InternalID/@schemeID
    • Map to constant "BusinessSystemID"
  • RecipientParty/InternalID/@schemeAgencyID
    • Map to constant "310"


Section: /ns2:KeyMappingBulkReplicateRequest/KeyMappingReplicateRequestMessage/



  • Map to empty constant.
  • MessageHeader/ID & /MessageHeader/UUID 

  • MessageHeader/CreationDateTime

  • MessageHeader/SenderBusinessSystemID


  • MappingGroup
    • Map to empty constant
  •  MappingGroup/@actionCode
    • Map to constant "04"
  • MappingGroup/@objectListCompleteTransmissionIndicator
    • Map to "true"
  • MappingGroup/Object
    • Map to empty constant
  • MappingGroup/Object/@actionCode
    • Map to constant "04"
  • MappingGroup/Object/BusinessSystemID
  • MappingGroup/Object/TypeCode
    • Map to constant "147"
  • MappingGroup/Object/ObjectIdentifierSet/ObjectIdentifier
    • Map to empty constant
  • MappingGroup/Object/ObjectIdentifierSet
    • Map to empty constant
  • MappingGroup/Object/ObjectIdentifierSet/@actionCode
    • Map to constant "04"
  • MappingGroup/Object/@objectIdentifierSetListCompleteTransmissionIndicator
    • Map to constant "true"
  • MappingGroup/Object/ObjectIdentifierSet/@objectIdentifierListCompleteTransmissionIndicator

    • Map to constant "true"

  • MappingGroup/Object/ObjectIdentifierSet/ObjectIdentifier/DefiningSchemeCode

    • Map to constant "888"

  • MappingGroup/Object/ObjectIdentifierSet/ObjectIdentifier/KeyValue

  • MappingGroup/Object[1]
    • Map to empty constant
  • MappingGroup/Object[1]/@actionCode
    • Map to constant "04"
  • MappingGroup/Object[1]/@objectIdentifierSetListCompleteTransmissionIndicator
    • Map to constant "true"
  • MappingGroup/Object[1]/BusinessSystemID
  • MappingGroup/Object[1]/TypeCode
    • Map to constant "147"
  • MappingGroup/Object[1]/ObjectIdentifierSet

    • Map to empty constant
  • MappingGroup/Object[1]/ObjectIdentifierSet
    • Map to empty constant
  • MappingGroup/Object[1]/ObjectIdentifierSet/@actionCode
    • Map to constant "04"
  • MappingGroup/Object[1]/ObjectIdentifierSet/ObjectIdentifier
    • Map to empty constant
  • MappingGroup/Object[1]/ObjectIdentifierSet/@objectIdentifierListCompleteTransmissionIndicator
    • Map to constant "true"
  • Object[1]/ObjectIdentifierSet/ObjectIdentifier/DefiningSchemeCode
    • Map to constant "888"
  • MappingGroup/Object[1]/ObjectIdentifierSet/ObjectIdentifier/KeyValue

  • MappingGroup/@changeOrdinalNumber
  • MappingGroup/@reconciliationPeriodCounterValue
    • Map to constant "1"

SAP Customer Relation Management

The configuration required in SAP CRM is highly specific to the Customer landscape and implementation, however, there are some default steps that need to be performed to support the Integration with the Business Partner. There are multiple options for how to integrate with the Business Partner Entity. In this article series, we have focused on the Integration via ALE (refer to Part 2 of this series), in order to reuse the existing development that was done to the IDoc Messages. The basic configuration in SAP CRM is identical to the official integration guide


In this article series, you should have learned what needs to be done in order to use the Contact-To-Account Relationships and what that means for custom integration scenarios with SAP CRM. Hopefully this series helps you to get started and understand the concept behind the Business Partner Replication.

This article series consists of the following articles: