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 2/5)

10 min read

Contact-to-Account Relationships in SAP Marketing Cloud | Part 2: Technical Implementation with SAP CRM

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.

After reading part 1 of this article series you've gained an overview of the Contact-To-Account Relationships feature in SAP Marketing Cloud. In this article, we want to take a look behind the curtain and see what needs to be done in order to retrieve those relationships from another system. In order to have a practical example, we will focus on the Integration between SAP Marketing Cloud and SAP CRM, focusing on the Business Partner and Business Partner Relationships Integration, as this is enabling the B2B Contact to Account Relations that were described in the first part of this article series. Additionally, this article will help you to get started with building potential custom integration between SAP CRM and SAP Marketing Cloud, as there is no standard integration content for SAP CRM regarding the new Business Partner entity. However, we have standard integration content from the SAP Cloud for Customer Integration with SAP Marketing and the SAP Cloud for Customer Integration with SAP CRM Integration Packages that we can reuse and adjust, in order to build custom IFlows to consume the new Business Partner Web Services.


This article builds on top of the official Integration Guide. Please refer to it in case you need more clarification. Please also refer to the Administration Guide to find more information on how to prepare your Marketing System for B2B Contact to Account Relations. You can also find very helpful information in this FAQ.

After reading through this article, the article series will be continued with the following parts:

Table of Contents

Introduction Business Partner Replication

The following two diagrams describe the general architecture within SAP Marketing Cloud, considering the Local Business Partner entity. The recommendation when integrating another SAP System that uses the Business Partner Entity is to integrate SAP Marketing Cloud using the now supported Business Partner Entity. There are new Communication Arrangements that expose SOAP Services from SAP Marketing Cloud to create Business Partners, Business Partners Relations, and Key Mapping Entries. 

Looking at the Integration Flow Replicate Business Partner from SAP CRM to SAP Marketing Cloud from SAP Marketing Cloud Integration with SAP Customer Relationship Management Integration Package, you will notice that it is using the OData Service CUAN_BUSINESS_PARTNER_IMPORT_SRV to create the Interaction Contact Entity in SAP Marketing Cloud. With the new Entity and Communication Arrangement SAP_COM_0475 the SAP Marketing Cloud exposes a new SOAP Service to create the Business Partner Entity. The diagram below shows the general Flow from Cloud for Customer to SAP Marketing Cloud. In order to integrate with SAP CRM, the Flow will be quite similar.

Replicating Business Partner with SOAP

Besides the SOAP Service to create the Business Partner itself, there is also a new SOAP Service to create the respective Business Partner Relationships. Both Entities also come with the functionality to trigger Confirmations back to the sender system. Additionally, a new communication scenario (SAP_COM_0539) has been added that allows the Creation of Key Mapping entries. Those entries are created during the Business Partner load (In the SAP Cloud for Customer and SAP Marketing Cloud Integration Package there is a dedicated Key Mapping IFlow) and the IDs stored in the Key Mapping are later used to identify the Business Partner across all solutions (e.g. When SAP Marketing Cloud creates a Lead and transfers it to SAP Cloud for Customer). It is important to understand that you need to use the Business Partner Integration if you are integrating with a different SAP System, that supports the Business Partner Entity, in order to take advantage of the B2B Contact to Account Relations.


Looking at the documentation and the SAP Cloud for Customer Integration, you realize that the Integration is built via SOAP from End-to-End. The challenge with SAP CRM is, that usually, our customer environments have strong customization using the ALE Technology. In order not to rebuild the customization it is also possible to keep using IDocs going out from SAP CRM and mapping them in SAP Cloud Integration to the corresponding SOAP Request. However, this requires quite a lot of integration logic, which is built by looking at the SAP Cloud for Customer, SAP CRM and SAP Marketing Cloud Integration Packages. Please feel free to read through the thought process in part 3 of this article series "Building the custom integration content for Business Partner Replicationto get an idea of how this integration can be built. In order to provide guidance on how this integration can be built, we described this process in quite some detail.

SAP Marketing Cloud Configuration

The following screenshots show the App "Set Up Your Marketing Solution" which is a step-by-step guide on the necessary steps that need to be configured in order to use the Contact-to-Account Relationships. You can get additional information following the official documentation.

The customizing to enable the usage of projections is not transported and has to be repeated in the productive environment.

Marketing Area Definition

In order to be able to use Contact-to-Account Relationships, the first step is to activate the usage of Marketing Area Definitions. Contact data, permissions, and interactions can be imported with marketing area information. If the marketing area information is provided, relationship best records are generated dependent on the marketing area as well.

SAP Business Partner Integration

The second step is to configure the Business Partner Integration. Here you need to maintain the communication Arrangement SAP_COM_0475 for the Integration of the Business Partner and Business Partner Relationships and SAP_COM_0539 for the Key Mapping Replication. Once the communication arrangements are configured, you need to set up the Contact Origins in SAP Marketing Cloud Customizing. In order to do this, click the hyperlink in "Set Up Your Marketing Solution" or navigate to the Contact Origin Customizing in "Configure your Solution". Note that in the customizing you need to maintain the Productive and Quality Business System for that Origin (format is similar to XYZCLNT101 - XYZ being the SAP CRM SID)

Business Partner and Interaction Contact: Extension and Mapping

If you need to extend the Business Partner integration you can of course extend the Integration Flows to implement customer-specific logic. Furthermore, you can add Business Partner-specific custom fields in the Custom Fields and Logic App using the business context Business Partner Core View. Those fields are either automatically mapped to the Interaction Contact or you can write custom logic to implement a custom mapping.

In the first step you have configured the usage of the Marketing Areas and in this step you need to make sure that every new Business Partner is assigned to the correct Marketing Area. This has to be done by implementing the appropriate BAdI for Mapping Business Partner to Interaction Contact.

Public OData API Integration

In case you are integrating with external systems that are not using the SAP Business Partner you have to define the communication scenario SAP_COM_0207. This enables the API_MKT_CONTACT Service v4. This service supports the new Contact-to-Account Relationships for external systems.

After implementing the v4 Version of the API_MKT_CONTACT Service, you must not use lower versions of the API, otherwise errors will be caused. Please refer to the Integration Guide for more information on that topic.

Contact Projection Configuration

In this step, you activate the marketing area of campaign execution. You can do this in the Manage Your Solution App (Activate Marketing Area for Campaign Execution). In the "Set Up your System Configuration" App you have to Set Up the Contact Projection in order to activate them. This will also create the relevant segmentation content.

Can we turn off the B2B Switch again or it is irreversible?

Switching back to the state without contact relationships is only possible in the Q-system. In the P-system you must request this from SAP via a service ticket. (For more helpful FAQ, please refer to this FAQ)

Best Record Generation for Contact Relationships

If you have existing data in your system, you can schedule this optional job to ensure that the existing data in your system is recalculated so that the relationship best record node is filled.

Interaction Data Conversion

Similar to the step above, this optional application job makes sure that existing interactions are enabled for B2B relationships

This step is irreversible - once the interaction data has been enabled for B2B relationships, this step can't be undone.

Segmentation Profile Setup

For this step please refer to the Segmentation & Target Group Chapter of the first part of this article series.


The first article of this article series introduced you the new functionalities for a B2B-oriented setup and scenario for Contact-to-Account Relationships.

This second part of the article series should have helped you to understand the necessity of the Business Partner Entity and how to set up your SAP Marketing Cloud Tenant in order to support the B2B Contact-to-Account Relationships. The third part will focus on building the custom integration content for the Business Partner Replication between SAP CRM and SAP Marketing Cloud.

This article series consists of the following articles: