SAP Marketing Cloud – Segmentation Attributes from extension data source _SAP_CF_CE_CONTACT_IA_ERP_CUST

Symptom

In SAP Marketing Segmentation you create a segmentation model using segments. Each segment reflects a segmentation rule. The count in a child segment might not consider the segmentation rules from its parent segments in the segment tree as expected. When executing an email or file export campaign, the attributes in the campaign content are not necessarily created following the segmentation rules as expected.

Environment

SAP Marketing Cloud Edition

Reproducing the Issue

  1. Log on to Fiori Launchpad in Hybris Marketing
  2. Open the Segmentation Models App and create a new Segmentation Model
  3. Use different filters to create a segment as following, with using filters on the interaction type (IA_TYPE) and interaction date (IA_DATE) – the example has different IA_DATE attributes visible in the interactions group:
    different DS example1.jpg
  4. Observe different counts for similar filter values for different IA_DATE filters
    different DS example.jpg
  5. When using a target group created from that segmentation model in a email or file export campaign, the campaign content is not created as expected. You might observe that there are multiple values for a certain attribute – the campaign content might not be following the segmentation rules from the segment tree.

Cause

This might be related to the following design – the design is explained based on the following example build in the Cloud Edition using the segmentation object SAP_CONTACT_ENGAGEMENT_SIN:

The segment tree is built using filter attributes from different data sources:

  • ‘Interaction Date’ IA_DATE from DS SAP_CE_CONTACT_IA_ERP_CUSTOMER
    ds.jpg
  • ‘Interaction Date’ IA_DATE from DS _SAP_CF_CE_CONTACT_IA_ERP_CUST
    ext ds.jpg

When combining different filters with attributes from different data sources, the different data sources are joined via the key of the segmentation object, the SAP_CONTACT_KEY in that case:
key field.jpg

When using attributes from different data sources, the join of those data sources may result in different data being returned. This is the very basic design of SAP Marketing Segmentation, which is assuming/requiring that attributes which have a dependency between each other are coming from the same data source, unless the dependency is fully qualified by the segmentation object keys. In other words, the attributes can reside in different data sources if the dependency is fully qualified by the segmentation object keys. So all attributes which have more dependencies than just the segmentation object key, must reside in the same data source.

The example above is built based on the following data:

Contact IA_TYPE IA_DATE
1 SALES_ORDER 15.05.2018
1 APPOINTMENT 16.05.2018
2 SALES_ORDER 16.05.2018
2 APPOINTMENT 15.05.2018
3 SALES_ORDER 16.05.2018
4 APPOINTMENT 15.05.2018

Filter: IA_TYPE = SALES_ORDER and IA_DATE = 15.05.2018

If IA_TYPE and IA_DATE are on the same data source, the selection works with the logic “give me all contacts which have any interaction of type SALES_ORDER with the date 15.05.2018”. The ‘and’ is applied on interaction level. The result is contact 1 only:
same ds detail.jpg

If IA_TYPE and IA_DATE are on two different data sources, the selection works with the logic “give me all contacts which have any interaction of type SALES_ORDER and any interaction with the date 15.05.2018”. The ‘and’ is applied on contact level only but not on interactions level. The result is contacts 1 and 2:
different ds detail.jpg

The same design is valid within segmentation but also when using any target group from the segmentation model for creating content or export. The setting ‘Content and Export –
Apply segmentation rules during content determination’ in the General Settings in the Target Group Configuration, also considers this design. Detailed information about the setting is available in the online help:

General Settings for Target Groups

Resolution

This design needs to be considered when setting up the Segmentation Configuration but also when building the segment tree.

When using custom fields in Segmentation, created from the ‘Customer Fields and Logic’ app, the custom attributes are available in a generated extension data source. When looking at the example above, the standard data source SAP_CE_CONTACT_IA_ERP_CUSTOMER has the extension data source _SAP_CF_CE_CONTACT_IA_ERP_CUST generated – all standard attributes are included in the standard data source, as well as in the extension data source. It is therefore strongly recommended to hide the attributes from the standard Datasource but display the attributes from the extension Datasource in the Segmentation Configuration once extension attributes are used.

The example above is taken from the Cloud Edition using the segmentation object SAP_CONTACT_ENGAGEMENT_SIN, the same design is valid for various different Segmentation Objects in the SAP Hybris Marketing Cloud.

The Segmentation Configuration app is available in the Cloud Edition.