Skip to Content
Technical Articles
Author's profile photo Pooja Loknath Maru

SAP Marketing Cloud – Display Custom Fields with Linear Relationship in Tabular Format and Assign them in Segmentation

One of the most common requirements for extensibility in today’s world is to have custom fields and tables for any object. Although SAP Marketing Cloud does provide the extensibility option to create custom fields on the Accounts/Contacts Screen, it does not provide an out of the box option to create Custom tables or allow extensibility of custom fields in tabular format on Accounts/Contacts Screen.

Moreover, the ability to create segmentation based on various attributes plays a vital role in any digital marketing initiative.

SAP Marketing Cloud does provide us the option to create Segmentation or Target Groups based on any individual attribute value of a Contact or Account, for e.g. we can create segmentation based on any single attribute like salary or age or hobby or customer type or customer status or zip code etc. But we don’t have enough flexibility in the product to segment based on the attributes which are linked to each other or have a linear relationship with each other.

Today, I will take you through a step-by-step guide to achieve both these functionalities i.e. display a tabular format on the Account/Contacts screen and create segmentation based on these tabular fields which have a linear relationship with each other, by just using the SAP Marketing Cloud tenant and not requiring any integration with any of the external platforms like SAP IDE, Kyma etc.

 

Step1: Create a Custom Business Object

  • Go to the section ‘Extensibility’ on the SAP Marketing Cloud home page and select the tile ‘Custom Business Object’.

  • Click on the “New” Button. In the pop-up that appears, enter the Name of the Custom Business Object and click on “Create”.

  • In the “General Information” tab, select all the checkboxes in the “Features” section, as shown below. Selecting these checkboxes will help to display the Custom Business Object on the UI and also helps in generating an OData API for the Custom Business Object.

  • Go to the Nodes Section and click on the “New” button to create a SubNode for the Custom Business Object. Give a name to the SubNode.                                                                  Note: – This SubNode will be helpful when we will create a mashup to include the Custom Business Object on the Accounts Screen.

  • Go to the “Fields” Section. Here you will see some fields auto generated by SAP. These fields are created because we have selected the “System Administrative Data” and “Data Access Management” checkboxes in the “General Information” section of the Custom Business Object.

  • Click on the New Button to add the desired fields to the Parent Node.                                Note: – In order to include the Custom Business Object Fields in the Segmentation Profile(All Accounts), it is mandatory to have the Account ID field (i.e. the ID field of the object corresponding to the segmentation profile) as well as the Account Origin field (i.e. the Origin field of the object corresponding to the segmentation profile) in the Root object of the Custom Business Object. Apart from these fields you can add other fields as per your requirement. Here, I have created only 2 of the mandatory fields in the parent node, and will include the other fields in the Sub Node. Also, I have marked the Account ID as my key field.

  • You can change the Type of the Field and change the properties like field length, make the field read only etc.

  • Now we will add some fields to the Sub Node. Click on the SubNode tab on the Left, and then click on the “New” Button to add fields to the SubNode.

  • Our Custom Business Object is Now Ready. Click on the “Save Draft” Button on the bottom right Corner, and then click on “Publish” to publish the custom business object.

 

Step2: Make the Custom Business Object available on the UI

  • Once the Custom Business Object is published, again go to the “General Information” section of the Custom Business Object. You will now see a new Hyperlink in the Features section as “Maintain Catalogs”. Click on the hyperlink to maintain Custom Catalog.

  • Click on the “Add” button to add a Business Catalog for the Custom Business Object. Here I am adding “Marketing – Contact and Account Profile”. You can add any Business Catalog which is relevant for your Custom Business Object. Only the users who will have authorization for the assigned Business Catalog will be able to the Custom Business Object in the UI.

  • Once the desired business catalogs are added, select the business catalog and click on the “Publish” button.

  • Navigate to the home page. Now we can see a new Tile and App created for the Custom Business Object, under the Contact and Account Profile (no Apps) section.

 

Step3: Create a Communication Arrangement for the Custom Business Object, to use the OData API of the Custom BO for importing data.

  • Go to the App “Custom Communication Scenarios” under the section “Extensibility”.

  • Click on the ‘New’ Button to add a new communication scenario. In the pop-up that appears enter a scenario ID and a description.

  • In the next window, click on the “+” button to add the Custom Business Object for which the communication needs to be created.

  • Select our newly created Custom Business Object and click on OK.

  • Now Publish this Inbound Service.

  • Once published, click on the “Create Arrangement” button to create a Communication arrangement for the newly created communication scenario. In the pop-up that appears give an Arrangement Name and click on “Create”.

  • Enter the “Communication System” and click on the “Save” button to create a new communication arrangement. The URL for the OData API is now generated and can be used to import data into the Custom Business Object.

 

Step4: Add the Custom Business Object to the Accounts Screen.

  • Pre-requisites:
    1. Create a custom field on the Spotlighting Accounts Screen which will store the SAP UUID of the Parent Node of the Custom Business Object (Here I have created a custom field called YY1_CBOUUID_MCP). This step is needed in order to filter the values in the Custom Business Object based on the Account ID dynamically. i.e. The Custom Business Object as an App will contain the data for all the accounts. But when we open an account and go to the section for our Custom Business Object, it should show the values only for the corresponding account ID.

Note: – Every time a parent node of the Custom Business Object is created, a unique SAP UUID is generated for the parent node at the backend. This value of the SAP UUID needs to be populated in the custom field for SAP UUID (YY1_CBOUUID_MCP), which can be populated using the standard Account API, via CPI.

2. Also, add some entries into the Custom Business Object. This can be done using the API for the Custom Business Object, using CSV or manually.

  • Open the newly created App – SampleBO from the home page and click on the arrow on the right corner of any of the Parent Node entry, to navigate to the SubNode.

  • Copy the URL of the SubNode entry.

  • Open any Account from the Spotlighting Accounts App. Click on the “Person” icon on the top right corner and Click on “Extensions”.

  • Click on the “+” button in the top right corner to add a new extension.

  • In the pop-up that appears, select the Extension Type as “Section” and give a name to your section (here I have named it as Custom Section).
  • For the URL to be entered in the Extension, a small change needs to be made in the URL of the SubNode that we copied above, in order to make the URL dynamic. In the URL, replace the value of the UUID with the name of the custom field that we created on the Spotlighting Accounts screen to store the SAP UUID i.e. YY1_CBOUUID_MCP. So, our new URL will look like this

  • Click on Save.

  • We now see that a new section – “Custom Section” has been added to our Accounts screen.

  • If we go into the Custom Section, we will see only the entries corresponding to the current Account ID i.e. 652473

  • Incase, we want to remove the headers of the Custom Business Object in the “Custom Section” of Accounts screen, we can change the URL in the Extension to following: –

  • This is how our “Custom Section” in the accounts screen will look like then.

  • We also have the option to remove the Change Document Section by using the Adapt UI in the SampleBO App Screen.

 

Step5: Add the Custom Business Object to Segmentation Model

  • Go to the “Marketing Extensibility” App under the section “Extensibility and Adaptability for Marketing” on the home page.

  • Select “Assign to Segmentation” under “Custom Business Object”.

  • Click on the “+” button in the left corner, to add your Custom Business Object.

  • Select your Custom Business Object Name from the F4 help, and the relevant Segmentation Object where you would want to add the Custom business object to.

  • Under the Map fields section, map the ID Origin Field to the “Account Origin” field of the Custom Business Object and the ID field to the “Account ID” field of the Custom Business Object.

  • Now we can select the fields that we want to make visible in the Segmentation Profile, and set those fields to “Set Visible”, and “Save” the changes.

  • The fields are now visible in the Segmentation Profile “All Accounts”.

  • Similar steps can be followed to add the Custom Business Object fields to another Segmentation Object, for e.g. Contacts (Segmentation Profile – All Contacts).
  • Now we can segment based on the attributes of the Custom Business Object, and this segmentation can be based on each & every record/line item level of the Custom Business Object, rather than treating all the 5 attributes as different filtering parameters.

 

Conclusion

This article introduced you to the step-by-step guide to :-

  • Create a Custom Business Object with subnode.
  • Display the Custom Business Object (i.e. custom fields in tabular format) on the Accounts/Contacts screen, as a new Custom Section.
  • Create Communication Arrangement to import data into the Custom Business Object using OData API, via CPI.
  • Make the Fields of the Custom Business Object (with linear relationship with each other) available in Segmentation Profile.

 

 

 

 

Assigned Tags

      23 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Tobias Schneider
      Tobias Schneider

      Hi Pooja,

      really great Blog!! 😀 Cool step by step explanation! I would much appreciate more of it 🙂

      Only one hint: You have two screenshots where your SMC Tenant ID is shown in the URL. Maybe you should hide it there, too 😉

      BR Tobias

      Author's profile photo Pooja Loknath Maru
      Pooja Loknath Maru
      Blog Post Author

      Hi Tobias,

      Thanks for your comment :). I have updated the screenshots and masked the tenant ID.

      Will surely try to publish more blogs.

       

      Regards,

      Pooja Maru

       

      Author's profile photo Tobias Schneider
      Tobias Schneider

      Hi Pooja Loknath Maru,

      one question: How do you import the data to the subnode via OData Call?

      I was able to create data for the main-node using the $batch endpoint of the created service.

      How does the payload have to look like?

      I tried using a POST to the subnode but how to I reference the main-node? I thought about the combination AccountID and AccountOrigin or using SAP_PARENT_UUID with the UUID of the node. But I didn't get it work.

      BR Tobias

      Author's profile photo Pooja Loknath Maru
      Pooja Loknath Maru
      Blog Post Author

      Hi Tobias Schneider ,

       

      For importing data into the subnode, we need to use the navigation property from the root node to the subnode. If you will see the metadata of the CBO, you will see a navigation property to_<Subnode ID>, which needs to be used with a POST operation in order to populate values into the subnode.

      POST https://my<...>-api.s4hana.ondemand.com/sap/opu/odata/sap/<CBO_ID>(guid'<parent node uuid>')/to_Subnode
        
      {
      "<SubNode Field1>" : "<Subnode Value 1>",
      "<SubNode Field2>" : "<Subnode Value 2>"
      }
      
      Hope this helps.
      
      Regards,
      Pooja Maru

       

      Author's profile photo Tobias Schneider
      Tobias Schneider

      Got it working! Thank you so much! 🙂

      Author's profile photo ketan malhotra
      ketan malhotra

      Very detailed and informative blog with self explanatory screenshots.

      Author's profile photo Guilherme Paulino
      Guilherme Paulino

      Excellent topic!

      Thanks for sharing, Pooja!

      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Very informative and detailed day-to-day use case. Thanks for sharing Pooja.

       

      Maybe one request Would be great if you do not resize the images attached in blog. Currently when opening the images the content is quite blurred.

      Author's profile photo Pooja Loknath Maru
      Pooja Loknath Maru
      Blog Post Author

      Hi Saurabh,

       

      Sure next time I will not resize the images. When I previewed my blog, all the images were clear and visible, not sure why they are blurred for you.

      Thanks for letting me know. Will keep this in mind going forward.

      Author's profile photo Christof Blaickner
      Christof Blaickner

      Great Blog Pooja Loknath Maru ,

      thank you for sharing

      BR Christof

      Author's profile photo Tobias Schneider
      Tobias Schneider

      Hi, one more thing to consider in SMC 2005 Release:

      Adding the CBO to Accounts Profile is now done via the Adapt UI Functionality (no longer via Extensibility).

      So after clicking Adapt UI you should use "Embed Content" and the "Embed Content to: Section".

      Here you can enter the URL as described in the blog. Then it works fine and the data is shown for the Corporate Account

      I only have a problem regarding Segmentation. I assigned the CBO to the "Accounts" Segmentation Object and can see it as Attribute Group with Attributes in the Segmentation Model. But no data is found though it works in the Accounts Factsheet. Any ideas?

      BR Tobias

      Author's profile photo Pooja Loknath Maru
      Pooja Loknath Maru
      Blog Post Author

      Thanks for informing about this change. Nice to know.

      For segmentation you can check on 2 things :-

      1. You have mapped the ID and Origin Field of the While assigning to segmentation to the correct Origin and ID fields of the CBO.
      2. Check if you have passed some data in the CBO with the relevant Origin and Account ID for the data to appear in Segmentation.

      Once these steps are taken care of, I think segmentation should work fine.

       

      Regards,

      Pooja Maru

      Author's profile photo Tobias Schneider
      Tobias Schneider

      Hi Pooja, it works. There was a mistake from my side in the imported AccountID. Thanks!

      Author's profile photo Govil Banga
      Govil Banga

      Hi Tobias,

      Thanks for informing regarding the change. its nice to know about the 'Embed content' change.

      Cheers

      Govil

      Author's profile photo Govil Banga
      Govil Banga

      Hi Pooja,

      Custom BO concept, extensibility options, business usage and steps guide are explained very well!

      I know the hard work and research behind it and really appreciate all your efforts for making it feasible in system.

      It was a great learning working with you ? . Keep learning, exploring and blogging ?

       

      Cheers

      Govil

       

      Author's profile photo Serkan Ayyildiz
      Serkan Ayyildiz

      Hi Pooja,

      First of all thanks for the document. It was very useful. However, I am having trouble adding CBO to the Account Screen in Step 4. As Tobias mentioned, it is now added with "Adapt UI". I'm adding the link as you say, but I get the error in the image. I have tried a lot within the link, but the result has not changed.

      Dp you have any advice on this issue?

      Yours,
      Serkan

      Author's profile photo Pooja Loknath Maru
      Pooja Loknath Maru
      Blog Post Author

      Hi Serkan,

       

      Sorry for the delayed reply.

      Usually this error is seen if the SAPUUID on the custom field does not match with the SAPUUUID of the Custom BO Header node. Can you re-confirm if the custom field name in the URL of the Embedded content is correct and also if the value in the custom field for SAP UUID is correct.

      Hope this helps.

      Author's profile photo David Gómez Corral
      David Gómez Corral

      Hi Pooja,

       

      What is the steps that I´ve follow if I want to translate the custom fields embeebed in custom object?

      I don´t find the "Tranlation" link to put in others languages.

       

      Thanks in advace and good job!

      Best regards.

      Author's profile photo David Gómez Corral
      David Gómez Corral

      I´m done!!

      Thanks

      Author's profile photo Pooja Loknath Maru
      Pooja Loknath Maru
      Blog Post Author

      Glad you found it!

      Sorry could not reply earlier.

      Author's profile photo Kedarnath Ellendula
      Kedarnath Ellendula

      Excellent Pooja . Nice Blog

      Just would like to know do we need to add on the header or section. I also get the same error

      Author's profile photo Kedarnath Ellendula
      Kedarnath Ellendula

      Hi Team

       

      How the Custom Field YY1_CBOUUID_MCP Parameter get filled?

      Need to write any logic .

      For testing Purpose , I have manually saved  guid value in YY1_CBOUUID_MCP but it does not .

      Can please help me here

      Author's profile photo Sebastian Schipplick
      Sebastian Schipplick

      Hi all,

      This blog is partially outdated. Please refer to the official documentation: https://help.sap.com/docs/SAP_MARKETING_CLOUD/13d84c47bb6749a188fd53915c256516/482181566f2adc5fe10000000a441470.html

      Especially the prerequisites mentioned in the documentation are not mentioned in this blog. The blog still talks about individual fields for ID and ID-Origin for mapping - but we meanwhile need one field of type "Association" which maps to the contacts or accounts (business context "Marketing: Contact and Corporate Account").

      Thanks & regards,
      Sebastian