Skip to Content
Technical Articles

Extending metadata of SAP Marketing API’s In SAP Cloud Platform Integration – Part 1

Introduction

In SAP Marketing Cloud projects with a typical integrated landspace, you tend to pull interaction contact and interaction data from related source systems. The business user will later evaluate these data and perform their marketing activities.

If you’re connecting to your source systems within an integration architecture where SAP Cloud Platform Integration is positioned as middleware, you are lucky in case you’re using some pre-configured integration packages as this means that you’re probably already conveying so many data  to SAP Marketing Cloud.

However, it’s common that business requires additional data from source systems in SAP Marketing Cloud to analyze customer behavior further. In such cases, you may end up creating custom fields in SAP Marketing Cloud to meet the requirements. Unfortunately it alone won’t be enough because you also have to map this custom field to required data (field) from source system in SAP Cloud Platform Integration so that this information would be able to make its way to SAP Marketing Cloud as intended.

Business Scenario

Let’s assume you’re implementing an SAP Marketing project with an integrated SAP Cloud for Sales system and business requires the information “Sales Cycle” from opportunities in addition to other common data in opportunities. You notice that there’s no such dedicated field for interactions in SAP Marketing Cloud and you decide to create a custom field named “Sales Cycle” in SAP Marketng Cloud for the business object “Marketing: Interaction”.

As it’s pointed out previously, this alone won’t be enough. You need to make new custom field visible for SAP Marketing API in related integration flow in SAP Cloud Platform Integration and map this new custom field to “Sales Cycle” field from SAP Cloud for Sales in the mapping. Only then you can expect to see this new information at arrival in SAP Marketing Cloud.

Keep reading this blog to find out how you can make this happen.

How To Make Your Custom Field Part of The Integration?

You need to perfom administrative activities in both SAP Marketing Cloud and also SAP Cloud Platform Integration.

I split this process into two separate blogs for your reading convenience:

  • This blog (Part-1) is going to cover activities that need to be carried out in SAP Marketing Cloud.
  • This blog (Part-2) is going to cover activities that need to be carried out in SAP Cloud Platform Integration.

Prerequisites

  • The field that you’re going to map your custom field with have to be an applicable property of the interface (WSDL, OData service, IDoC etc) of the source system in SAP Cloud Platform Integration
  • Additional mappings (if required) have to be carried out in source system in advance (i.e. code list mapping in SAP Cloud for Customer)

Administrative Activities

In SAP Marketing Cloud

In SAP Marketing Cloud, you can perform activities as shown in below image.

Creating Custom Field using “Custom Fields and Logic” App

First, you need to create “Sales Cycle” as custom field using “Custom Fields and Logic” app in SAP Marketing Cloud.

Fill the relevant information such as length, list values, translations etc

 

On “UI & Reports” tab, enable relevant UI and Report elements. Make sure that you enable relevant Marketing API to extend the metadata for that API. In this example, you need to enable Marketing Interaction API

Finally save and publish custom field “Sales Cycle”.

Finding Service URL From Corresponding Communication Arrangement

To find out service URL, you need to identify which communication arrangement is in use for replication of opportunities from SAP Cloud for Sales to SAP Marketing Cloud.

 

For replicating opportunities from SAP Cloud for Sales to SAP Marketing Cloud, communication arrangement “SAP_COM_0017 – Marketing – Presales/Sales Integration” is used

 

Under “Inbound Services”, you spot the service URL for replication of opportunities easily because service name “Import of Business Documents (such as leads and opportunities)” gives a great hint.

 

Note down the service URL.

Checking Extended Metadata of API: CUAN_BUSINESS_DOCUMENT_IMP_SRV (Optional)

Optionally you can check the extended metadata of OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV to make double sure your custom field is included in the metadata of this OData service.

Add suffix “/$metadata?saml2=disabled” to service URL and you should have an URL like below:

https://{yourtenantid}-api.s4hana.ondemand.com/sap/opu/odata/sap/CUAN_BUSINESS_DOCUMENT_IMP_SRV/$metadata?saml2=disabled

Copy this link to your browser (i.e. internet explorer) and hit enter. You’ll be prompted to enter user credentials. Use communication user’s credentials assigned under “Inbound Communication” section of communication arrangement “SAP_COM_0017 – Marketing – Presales/Sales Integration”

 

In the XML source code, try to spot your custom fields to see if they are included

 

 

Continue to this blog (Part-2) to learn about administrative tasks you need to carry out in SAP Cloud Platform Integration

 

 

 

 

 

 

 

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.