This Book by K.L.Johnson focuses on the various principles of contact dynamics and serves as a good example for undergraduate and postgraduate students.
Full description
Descripción completa
H-Contact
Full description
NPIFull description
NPIFull description
this document presents the Interaction Design Coursework that is used for Greenwich student.
Full description
Descrição completa
sfhkja dskljg;dsFull description
Soil Structure Interaction below Minor bridge
Full description
Full description
Contact and Interaction Enablement Document versi version: on: 1.1– 201 2015-0 5-033-05 05
SAP hy hybri bris s Marketing 150 502, 2, powered powered by SAP SAP HA HANA NA
Typo ypogra graph phic ic Conv onven entio tions ns Ex am p l e
Desc r i p t i o n
Angle brackets indicate that you replace these words or characters c haracters with appropriate entries to make entries in the system, for example, “Enter your ”.
Ex am am p le le
Ex am am p le le
Arrows separating the parts of a navigation path, for example, menu options
Example
Emphasized words or expressions
Example
Words or characters that you enter in the system exactly as they appear in the documentation
www.sap.com / ex exam ample ple
Textua Tex tuall cross-r cross-refe efere rence nces s to an in inter terne nett addre address ss Quicklinks added to the internet address of a homepage to enable quick access to specific content on the Web
123456
Hyperlink to to an SAP Note, for example, example, SAP Note 123456
Example
Words or characters c haracters quoted from the screen. sc reen. These include field labels, labels, screen sc reen titles, titles, pushbutton labels, menu names, and menu options. Cross-references Cross -references to other documentation or published works
Exam Ex ampl e
Output on the screen following a user action, for example, messages Source code or syntax quoted directly from a program File and directory names and their paths, names of variables and parameters, and names of installation, upgrade, and database tools
EXAMPL PLE E
Techni Tech nica call nam names es of syste system m obj object ects. s. These These in inclu clude de re repor portt nam names, es, prog progra ram m na name mes, s, transaction codes, database table names, and key concepts of a programming language
NCL L UDE when they are surrounded by body text, for example, SELECT an and d I NC EXAMPLE
Typo ypogra graph phic ic Conv onven entio tions ns Ex am p l e
Desc r i p t i o n
Angle brackets indicate that you replace these words or characters c haracters with appropriate entries to make entries in the system, for example, “Enter your ”.
Ex am am p le le
Ex am am p le le
Arrows separating the parts of a navigation path, for example, menu options
Example
Emphasized words or expressions
Example
Words or characters that you enter in the system exactly as they appear in the documentation
www.sap.com / ex exam ample ple
Textua Tex tuall cross-r cross-refe efere rence nces s to an in inter terne nett addre address ss Quicklinks added to the internet address of a homepage to enable quick access to specific content on the Web
123456
Hyperlink to to an SAP Note, for example, example, SAP Note 123456
Example
Words or characters c haracters quoted from the screen. sc reen. These include field labels, labels, screen sc reen titles, titles, pushbutton labels, menu names, and menu options. Cross-references Cross -references to other documentation or published works
Exam Ex ampl e
Output on the screen following a user action, for example, messages Source code or syntax quoted directly from a program File and directory names and their paths, names of variables and parameters, and names of installation, upgrade, and database tools
EXAMPL PLE E
Techni Tech nica call nam names es of syste system m obj object ects. s. These These in inclu clude de re repor portt nam names, es, prog progra ram m na name mes, s, transaction codes, database table names, and key concepts of a programming language
NCL L UDE when they are surrounded by body text, for example, SELECT an and d I NC EXAMPLE
Docume Docum ent His History tory The foll follow owin ing g ta table ble pro prov vid ides es an ov overv ervie iew w of th the e mos mostt im import portan antt doc docu ume men nt ch chan ang ges es.. Ver s i o n
Data Integration ........................................................................................................................................10
Data Replication of SAP Systems ............................................................................................................................ 10 Data Replication of 3rd party Systems ......................................................................................................................11 Integration of Contact Master Data .......................................................................................................................... 11 2.3.1
Import using CSV Upload ............................................................................................................................ 12
2.3.3
Import Using Remote Function Call (RFC) ................................................................................................ 14
2.3.4
Import using ODataService........................................................................................................................16
2.3.5
Import using WebService ........................................................................................................................... 22
Integration of Interaction Data ................................................................................................................................ 22
Import using CSV Upload........................................................................................................................... 25
2.4.3
Import Using Remote Function Call (RFC) ............................................................................................... 26
2.4.4
Import using OData Service........................................................................................................................27
2.4.5
Import using WebService............................................................................................................................31
Audience Discovery and Targeting...........................................................................................................32
SAP HANA Modelling................................................................................................................................................ 32 3.1.1
Base View and Contact Extension Fields .................................................................................................. 32
3.1.2
Long Term Transaction Data and Client Mapping................................................................................... 33
3.1.3
Short Term Transaction Data.................................................................................................................... 38
Scores in Contact Factsheet.................................................................................................................................... 65
SAP hybris Marketing provides central access for all contact/ customer-related information. This document describes how to enable hybris Marketing with own data. This includes data upload, segmentation capabilities, etc, All information are explained with a small example from the travel industry. The company has an SAP ERP system where customer master data and bookings are saved. Information about planes and flight schedules are provided by third party systems. Moreover there is an airline system providing check in information.
3rd party System
Airline System
SAP hybris Marketing SAP ERP System
Contacts A contact is a natural person that interacts with a company. Contact data are collected and merged from several sources into the master data tables within hybris Marketing. The base table for contact master data is CUAND_CE_I C_ROOT. The table contains the following contact attributes: DB_KEY
There are several more attributes related to the contact, e.g. if the contact allowed me to contact them via email or phone. Moreover for all fields having the suffix _F T, there is a field without the suffix containing only the key, e.g. the country key is stored in field COUNTRY. For each contact that is uploaded the source system and source key are stored:
CUAND_CE_IC_ROOT
CUAND_CE_IC_FCET
PK
MANDT
PK
MANDT
PK
DB_KEY
PK
DB_KEY
Contact Attributes
FK
PARENT_KEY ID_ORIGIN ID
Field I D_ORI GI N of table CUAND_ CE_I C_FCET is the qualifier for the source system and field I D contains the key that the contact has in the source system. In case of an SA P ERP system the customer number would be written to field ID. The system considers two or more contacts with the same email address as one contact and merges them into one contact. There is, however, an exception for the merge: Contacts with an I D_ORI GI N value starting with SAP_ are not merged if they share the same email address but have different ids in the source system. The same exception applies to contacts having the following attributes populated: I D_ ERP_BUPA, I D_ERP_CONTACT, I D_CRM_BUPA, I D_ CRM_ MP and I D_HYBRI S_CONSUMER.
Example An import of contacts is triggered for ID_ORIGIN SAP_ CRM_BUPA. One contact has I D=987654321. Another contact has I D=123456789. Both contacts have the email address [email protected] . The system regards these two contacts as different contacts because the ID cannot be assigned to multiple contacts. Each of the two contacts will lose ‘[email protected]’. In addition, the system creates a third contact that serves only as container for the email address and has no data apart from the email.
Moreover hybris Marketing is able to distinguish between prospects, contacts and consumers in order to define the business relationship of a contact to my company. Therefore the contact master contains the fields I S_CONTACT and I S_ CONSUMER. A prospect is a natural person that some time in future can be important in interaction with a company (B2B process) or might generate sales revenue (B2C process). A contact, having set the field I S_ CONTACT to X , is a natural person that my company interacts with in a B2B process. A consumer, having set the field I S_ CONSUMER, is a natural person that generates sales revenue. A person can be a contact and consumer at the same time. ‘
’
Next to the business relationship also validation status/ contact level is interesting. It indicates the level of trustworthiness of information about a contact that is to which extent the information about a contact is valid. If a contact clicked an item on your Web site, the validation status is low, the contact is unknown. If a contact filled out a form on your Web site, entering name and address, the contact is self-identified. If a contact clicked on a link in an email that you have sent after the contact has registered on your Web site, the contact is verified, as the email address is validated. If a contact is in your customer database, the contact is a business partner.
Interactions In the context of hybris Marketing there are 2 types of interactions involved: ·
Long-term transaction data with a lot of attributes like sales documents
·
Short-term transaction data with less attributes like a check-in event
Long-term Transaction Data Long-term transaction data contains all transaction data that contains a lot of attributes and that you need to store for a long time. Typical long time transaction data are sales documents. A sales document consists of a header and items, which itself are identified by a lot of attributes. In the segmentation a customer might want to segment on those, therefore they must be available within hybris Marketing. Moreover the customer might be interested in sales documents for a longer period of time in segmentation, e.g. for 10 years. Long-term transaction Data is stored in hybris Marketing interaction data model. For integration of long-term transaction data see chapter 2.1and 2.2 for data integration and chapter 4.2 for User Interface Integration.
Short-term Transaction Data Short-term transaction data are event data, like check in of a traveler, and communication and information exchange of any sort between a company and a contact, such as writing an e-mail, phone calls, and posts written in social networks. Event data contain only a few attributes. In case of a check in, only the time of check in. The data is only relevant for a short time period. A customer will not want to segment on check-ins that took place 3 years ago. In hybris Marketing such short-term transaction data is stored in the interaction data model.
The base table for interaction data in hybris Marketing is CUAND_CE_I A_ RT. An archiving process for the table is delivery by hybris Marketing, in order to ensure that the table is not getting to big. The table contains the following attributes: DB_KEY
Key of Interaction
ID_ORIGIN
Qualifier for source system
ID
ID of contact of interaction in source system
COMM_MEDIUM
Communication Medium/ Place
IA_TYPE
Interaction Type
CONTACT_KEY
Foreign Key to Contact Master Data
IA_DATE
Interaction Date
VALUATION
Valuation (Values for No-Valuation, Strong Negative to Strong Positive)
There are several more attributes related to an interaction, e.g. the timestamp when the interaction was uploaded in hybris Marketing. In case of a check-in event the table would be filled like this: DB_KEY
005056AB02041ED49FDC87CDF4D156D2
ID_ORIGIN
AIRLINE_SYSTEM
ID
0819
COMM_MEDIUM
WEB
IA_TYPE
CHECK_IN
CONTACT_KEY
005056AB02041ED49FDDAC4C60F31A78
IA_DATE
20.12.2014
Interest of interactions In the contact factsheet and in the contact engagement an interaction can be associated with interests. An interest could be “Big Data” because a group of contacts have been discussing in social media channels about it. An interest could also be a product category. Possible interests are defined in customizing under Marketing
Social Contact Intelligence
Contact Engagem ent
SAP hybr is
Define Interaction Interests . Interests
of an interaction are stored in tableCUAND_ CE_I A_ I NTR with the following fields: DB_KEY
Key of Interest per interaction
PARENT_KEY
Key of Interaction
INTEREST_ITEM
Interest
There are several more attributes related to an interest of an interaction.
The integration of data depends on the source system and the type of data.
Data Replication of SAP Systems SAP hybris Marketing delivers a data replication of contact master data and long-term transaction data for SAP ERP/ CRM systems via SAP Landscape Transformation Replication Server (SAP LT). SAP LT replicates the table structure one to one to the SAP HANA database of hybris Marketing. During operation SAP LT runs an initial upload and afterwards replicates new data, updated data and deletion of data in real-time. This replication type has to be used for all SAP systems. For more information around SAP LT see help.sap.com/ hana_options_replication The advantage of the one to one table structure replication is that the SAP system and hybris Marketing can be deployed on the same SAP HANA database. The disadvantage is that the SAP HANA content can only be activated if the table structures are in place. That’s why in case a you do not integrate an SAP ERP/ CRM system, hybris Marketing creates a dummy schema (SAP_CUAN_ERP for SAP ERP and SAP_CUAN_CRM for SAP CRM) and corresponding dummy tables during technical configuration.
Travel Example The customer master data (table SCUSTOM) and bookings (table SBOOK ) are saved in an SAP ERP system. Therefore they are replicated via SAP LT to the SAP HANA database of hybris Marketing. When the replication is setup the SAP LT creates a new schema. In this example the new schema is SAP_BACKEND_SYSTEM. The RS-tables are configuration tables of the SAP LT.
Data Replication of 3rd party Systems Contact master data of 3rd party Systems don’t need to be replicated to the SAP HANA database of hybris Marketing if you can directly connect to the integration possibilities of chapter 2.3 (Webservice, OData Service, Remote Function Call, CSV Upload). Long-term transaction data of 3rd party systems are replicated into the SAP HANA Database directly. You can use any kind of data provisioning methods that are allowed for SAP HANA database. For provisioning methods see the SAP HANA Master Guide at help.sap.com/ hana_platfor m Cases
Installation and Upgrade Informat ion
SAP HANA Master Guide
SAP HANA Use
SAP HANA Data Provisioning
(http:/ / help.sap.com/ saphelp_hanaplatform/ helpdata/ en/ d4/ eb257ebb571014928bd908f34f3f0a/ content.ht m?frameset=/ en/ d4/ eb257ebb571014928bd908f34f3f0a/ frameset.htm¤t_toc=/ en/ d4/ 3377c2bb57101 489ebe2e6a1813cfc/ plain.htm&node_id=10&show_children=false) As SAP HANA content can only be activated in target systems if the underlying table structures are available, ensure that you choose a provisioning method that can be used in all of your systems.
Travel Example For the plane information and flight schedules the tables are created as ABAP DDIC tables. With this approach the table structure can be transported to all systems of the system landscape. The data upload into the tables is realized via SAP Data Services in the productive system and as SAP HANA CSV Upload in the development and test system.
Integration of Contact Master Data 2.3.1 Prerequisite Enhancement of Contact Master Data The base table for contact master data CUAND_ CE_I C_ROOT contains the extension include I NCL_EEW_CUAN_CE_I C_ROOT. This include can be used to add detailed contact fields. In order to propagate your extension to the inbound interfaces except the Webservice, the transaction HPA_CLEAR_ BUFFERS need to be executed after extension include I NCL_EEW_CUAN_ CE_I C_ROOT was enhanced. When offering values in the extension fields in the inbound interface, they are accordingly saved in the contact master data table by the system.
BAdI for Contact Master Data Upload During the upload of contacts no matter what import tool is used the Business Add-In Interaction Contact Updat e (CUAN_ CE_I C_UPDATE) is always executed. This BAdI is used to enhance an existing contact or to create a new contact based on the data of newly imported contacts. When using Contact Engagement this BAdI needs to be implemented to calculate the correct contact level. The related contact attribute is VALI DATI ON_STATUS. For more information, see documentation for SAP Customer Engagement Intelligence under Intelligence
Travel Example The travel company does not only care about where a traveler lives right now but is also interested what nationality the contact has. Therefore the contact master is enhanced with an attribute NATI ONALI TY.
As all travelers are business partners to the travel company, they should get the validation status 30. Therefore a BAdI implementation is created:
2.3.2 Import using CSV Upload Contacts can be uploaded into SAP hybris Marketing in CSV text format (code page UTF-8) by using the Import work set beneath Customer Data M anagem ent . The upload accepts commas, semicolons and tabulators as separators. A sample CSV file can be downloaded on the screen. The I D_ORI GI N of the CSV upload is SAP_ FI LE_I MPORT.
Authorization A customer copy of composite Role SAP_ CUSTOMER_ENG_I NT_ KEY_ USER must be assigned to users who want to upload a CSV file. This role is assigned to special key users for key activities and administrative tasks as well as access to export definitions for target groups and initiatives. The contained single role SAP_CEI _ KUA needs the following authorizations: ·
Authorization object to access the CSV file preview:HPA_PREV; ACTVT =03
·
Authorization object to control authorizations for access of business objects in SAP CEI: HPA_ OBJ ECT with the following field values: o
ACTVT =02,03
o
HPA_ OBJ =CUAN_ I NTERACTI ON_ CONTACT
For more information, see section Authorizations in the Security Guide for SAP CEI under Security Inform ation Security Guide (https:/ / websmp108.sapag.de/ ~sapidb/ 011000358700000803692013E).
help.sap.com/ cei
Structure For the upload, the CSV file consists of the following elements: ·
·
·
Optional: Comment rows starting with * at the beginning of the CSV file. Mandatory: Header row containing the attribute names. Only the required attributes must be contained in the header row and they can be arranged freely. Customer-specific attributes, likeNATI ONALI TY of the extension include, have to be added in the header row. If a contact that was uploaded already through a CSV upload, should be updated, the ID must be filled.
Checks During Upload During the CSV upload, the SAP hybris Marketing performs the following format checks and conversions: ·
Date values: The SAP date format (YYYYMMDD) and the date format specified in the user profile are allowed.
·
·
Integer values: Integer values with or without separators are allowed, for example 1.317.208. Timestamp values: The SAP date, SAP date & time (YYYYMMDDhhmmss), or the time stamp long (YYYYMMDDhhmmss,aaaaaaa) values are allowed with or without separators.
·
Email values are allowed in the following format: {name}@{domain}
The content validation stops with the first error. The system only saves and uploads the content if no errors occur.
2.3.3 Import Using Remote Function Call (RFC) To create and update interaction contacts the RFC CUAN_ CE_I C_POST_ FLAT is available. The RFC is used when importing data through SAP Data Services or when data is already available within the SAP HANA database.
Prerequisite A defined origin is required for using the RFC. The origin will be stored as ID_ORIGIN during data import. The origin is defined in Customizing for SAP Customer Engagement Intelligence under Social Contac t Intelligence Contact Engagement Define Origins of Contact ID .
Authorization A customer copy of single role SAP_ CEI _ ECOMMERCE_ I NTEGRATI ON must be assigned to the user that is used to log on to hybris Marketing for execution the RFC. The following authorizations are required: ·
Authorization object to control authorizations for access of business objects in SAP CEI: HPA_ OBJ ECT with the following field values: o
ACTVT =02,03
o
HPA_ OBJ =CUAN_ I NTERACTI ON_CONTACT
For more information, see section Authorizations in the Security Guide for SAP CEI under Security Inform ation Security Guide (https:/ / websmp108.sapag.de/ ~sapidb/ 011000358700000803692013E).
help.sap.com/ cei
Structure The import parameter I V_ABORT_I F_ ERROR of the RFC supports the following upload scenarios: X = Store all or nothing (default) ·
·
Empty = Store the valid values
The contacts are provided through table parameter I T_ I C_I MP_EXT_FAFL. Each row contains the data of a separate contact. The following attributes are mandatory: ·
I D_ORI GI N: defined in the prerequisite section
·
I D: identifier of contact in source system
·
TI MESTAMP: validity date of the contact data or to the date when the contact has provided them
Note
As each row of IT_IC_IMP_EXT_FAFL table parameter must refer to a separate contact, the same I D ORGI N - I D value pair must not be used in different rows.
All other attributes in the table parameter are named the same as their storage field in the database.
Success Message and Error Handling The export parameter ET_ CONTACT_KEY contains one row for each row entered in I T_ I C_I MP_EXT_FAFL in the same order. The returned fields have the following semantics: CONTACT_KEY
Internal Key of contact in SAP hybris Marketing
DBOPERATION
Indicates whether the interaction contact was updated (value = U) or newly created (value =I)
ANONYMIZED
Indicates that the contact has requested their data to be protected (value =X). The interaction contact data is cleared and cannot be updated.
FAILURE
Indicates that an error occurred (value =X). The fields MSGI D, MSGNO and MSGTY explain the error, or contain just a message.
The messages for all contacts are returned in export parameter ET_ MESSAGE. This means that the error messages appear there as well, but additionally with text and different to ET_ CONTACT_KEY the system can provide more than one message per contact.
Travel Example In case of the travel company the travelers are already replicated to the SAP HANA system beneath the hybris Marketing ABAP system. Therefore with an SE38 report the RFC is called to create contacts:
Syntax ... l s_c ont act - i d_or i gi n = ' I NDUSTRY' . l s_contact - i s_cont act = abap_t r ue. l s_ cont act - emai l _opt i n = abap_ t r ue. l s_ cont act - phone_opt i n = abap_t r ue. GET TI ME STAMP FI ELD l s_ cont act - t i mest amp. LOOP AT l t _t r avel er I NTO l s_ t r avel er . l s_cont act- i d = l s_t r avel er - i d. I F l s_t r avel er- f orm = ' Herr ' OR l s_t r avel er - f or m = ' Mr . ' . l s_ cont act - sex_f t = ' Mal e' . ELSE. l s_ cont act - sex_f t = ' Femal e' . ENDI F. l s_ cont act - name_t ext = l s_ t r avel er - name.
l s_cont act - count r y_f t = l s_t r avel er - count r y. l s_cont act - r egi on_f t = l s_t r avel er - r egi on. l s_cont act - ci t y1 = l s_t r avel er - ci t y. l s_cont act- post code1 = l s_t r avel er - post code. l s_cont act - st r eet = l s_t r avel er - st r eet . l s_ cont act - smt p_addr = l s_ t r avel er - emai l . l s_ cont act - l anguage = l s_ t r avel er - l angu. l s_cont act- t el nr_ l ong = l s_t r avel er - t el ephone. CASE l s_t r avel er- countr y. WHEN ' Uni t ed St at es' . l s_ cont act - nat i onal i t y = ' Amer i can' . WHEN ' Ger many' . l s_ cont act - nat i onal i t y = ' Ger man' . WHEN OTHERS. l s_ cont act - nat i onal i t y = ' Unknown' . ENDCASE. APPEND l s_ cont act TO l t _cont act . ENDLOOP.
* * *
CALL FUNCTI ON ' CUAN_CE_I C_POST_ FLAT' EXPORTI NG i v_abor t _i f _err or = ' X' I MPORTI NG et_ cont act _key = et _ mess age = l t _mess age TABLES i t _i c_i mp_ext _f af l = l t _cont act .
2.3.4 Import using OData Service Contacts can be imported into SAP hybris Marketing using the OData serviceCUAN_I MPORT_SRV. As a prerequisite, the frontend service is activated in the SAP Gateway system. Usually the service is activated during standard installation process of hybris Marketing. You can check if the service is fully available in transaction SI CF by testing service CUAN_ I MPORT_ SRV. The OData service is typically used if contact data is available in an external system.
To update a contact you must provide the properties Sour ceSyst emI d and Cont act I d so that the system can identify the contact to be updated. The system always updates the complete contact; partial update of a contact is not supported. This means that it is not possible to update only two attributes of a contact, for example, as the empty attributes of the update would overwrite the existing attribute entries. TheI D_ ORI GI N of an OData Import is SAP_ ODATA_ I MPORT. The ID in table CUAND_CE_I C_F CET is created out of the source system id and the contact id in that system, e.g. source system id is AI RLI NE_SYSTEMand contact id in this system is AI R1234 than the ID in table CUAND_ CE_I C_FCET is AI RLI NE_ SYSTEM$%#$AI R1234.
Authorization A customer copy of single role SAP_ CEI _ ECOMMERCE_ I NTEGRATI ON must be assigned to the user that is used to log on to hybris Marketing for execution of service CUAN_ I MPORT_ SRV. The following authorizations are required: ●
Authorization object to control authorizations for access of business objects in SAP CEI:HPA_ OBJ ECT with the following field values: ○
○
ACTVT =02,03 HPA_OBJ =CUAN_I NTERACTI ON_ CONTACT
For more information, see section Authorizations in the Security Guide for SAP CEI under Sec ur it y I nf or m at io n Sec ur it y Gu id e (https:/ / websmp108.sapag.de/ ~sapidb/ 011000358700000803692013E).
help.sap.com/ cei
Structure TheCUAN_ I MPORT_ SRV OData service consists of the following entity sets and entity types: Ent it y Set
Ent it y Type
Ent it y Type Descript ion
ImportHeaders
ImportHeader
Technical Header
Contacts
Contact
Contact
CAUTION
The OData protocol allows the import or update of one contact only. To achieve the mass create and mass update of contacts, the contacts are created by deep insert. You perform an insert on the entity and create contacts as subnodes of the import header. Import Header The entity type I mpor t Header describes the technical header of an import of contacts. The entity consists of the following properties: Propert y
Descript ion
Dat a Type
Id
Technical identifier of import run
String
Timestamp
Timestamp of import run
Date Time
Lengt h
Mandat ory
32
UserName
User Name
String
12
SourceSystemId
Identifier of source system
String
20
X
The properties I d, Ti mest amp, and User Name are used for logging the external data request. For every service request a new ID has to be provided. The Sour ceSyst emI d property allows to distinguish between different source systems and is a mandatory attribute. I d, Ti mest amp, and User Name are defaulted when no values are provided.
The entity type Cont act contains all attributes that are required to create and update a contact. The following list shows the most important properties of the entity matched to the ABAP fields explained in chapter 1.1. All properties can be seen in the metadata document under ht t ps: / / : / sap/ opu/ odat a/ sap/ CUAN_I MPORT_SRV/ $met adat a. Propert y
Descript ion
Identifier of contact in source system
Id Timestamp
Corresponding ABAP Field
ID (Prefix is SourceSystemId + ‘$%#$’)
Timestamp of import run
City
City
CITY1
CountryDescription
Name of Country
COUNTRY_FT
CustomerName
Name of company for which the person acts as contact
COMPANY_NAME
DepartmentDescription
Department
ABTNR_FT
EMailAddress
Email Address
SMTP_ADDR
EMailOptin
Opt-in for Email Address
EMAIL_OPTIN
FirstName
First Name
NAME_FIRST
FullName
Full Name
NAME_TEXT
FunctionDescription
J ob Function
PAFKT_FT
GenderDescription
Gender
SEX_FT
HouseNumber
House Number
HOUSE_NUM1
IndustryDescription
Industry
BRSCH_FT
LanguageDescription
Language
LANGUAGE
LastName
Last Name
NAME_LAST
MaritalStatusDescription
Maritual Status
MARITAL_STATUS
MobileOptin
Opt-in for Mobile Phone
MOBILE_OPTIN
MobilePhoneNumber
Mobile Phone Number
TELNR_MOBILE
PhoneNumber
PhoneNumber
TELNR_LONG
PhoneOptin
Opt-in for Phone Number
PHONE_OPTIN
PostalCode
Postal Code
POSTCODE1
PostalOptin
Opt-in for letter
POSTAL_OPTIN
RegionDescription
Region
REGION
Street
Street
STREET
TitleDescription
Title
TITLE_FT
Checks During Upload During the upload, the SAP hybris Marketing performs the following format checks and conversions: ·
If the ID of the contact is provided by the external source system, it will be generated in the back-end system. In this case an update of a contact is not possible.
Success Message and Error Handling After a successful creation or update of contacts, the system returns a success message in the following appearance:
Due to the fact that the property Sour ceSyst emI d is the only mandatory attribute, the system does not return many error messages that result from the business logic. Errors can be retrieved from the log files that the SAP Gateway stores using transaction / I WFND/ ERROR_LOG. The log file provides a detailed description of structural errors.
Travel Example As check-in information is provided by the airline system and the travelers have other ids in that system, an upload of the travelers from this system is required. Based on that upload the check-in information can be uploaded as interactions afterwards. With the help of the email address the hybris Marketing system will be able to link the travelers from the SAP ERP system to the travelers from the airline system.
2.3.5 Import using WebService Contact can be created and updated using the WebService CUANPost I nt er act i onCont act s. This service is a wrapper of the RFC CUAN_CE_I C_POST_ FLAT. See chapter 2.3.3 for explanation on import and export parameters as well as authorization settings. The WebService is one more option next to the OData Service to import contacts from external systems. The only difference between both options is, that the OData Service directly contains extension include fields.
Only short-term transaction data is uploaded into the interaction data of SAP hybris Marketing. For more information see chapter 1.2.
2.4.1 Prerequisite Enhancement of Interaction Data The base table for interaction data CUAND_ CE_I A_RT contains the extension include I NCL_EEW_CUAN_CE_I A_ROOT. This include can be used to add detailed interaction fields. In order to propagate your extension to the inbound interfaces except the Webservice, the transaction HPA_CLEAR_ BUFFERS need to be executed after enhancing extension include I NCL_ EEW_ CUAN_ CE_I A_ROOT. When offering values in the extension fields in the inbound interface, they are accordingly saved in the interaction table by the system.
BAdIs for Interaction Upload During the upload of interactions the Business Add-Ins Search Interaction Contacts t o Match N ew Interactions (CUAN_ CE_I C_FI ND) and Revise and Manage Interac tions Wh ile Uploading (CUAN_CE_I A_ UPLOAD) are always executed. The BAdI Search Interaction Contacts t o Match New Interactions is used to find an existing contact for newly imported interactions. If no existing contact can be found for the imported interaction a new contact is created automatically. The BAdI Revise and Manage Interact ions While Uploading allows to adapt the complete list of interactions that are to be created, e.g. to assign interactions to a campaign. For more information, see Customizing for SAP Customer Engagement Intelligence under Intelligence Contact Engagement Business Add-Ins (BAdIs) .
Social Cont act
Setup of Communication Media, Interaction Types, Interaction Channel and Interests Each interaction needs to be assigned to a communication medium and an interaction type. As on the User Interface the interactions are grouped in interaction channels, the communication media and interaction types need to be assigned to an interaction channel. A communication medium can be nearly any medium used for communication, such as email, phone, a data processing system, or even paper. Communication mediums are defined in customizing under Social Cont act Intelligence Contact Engagement Define Comm unication Media . An interaction type is any interaction that a contact can use or do to interfere with a company. Interaction type could be Web site visits, Web site downloads and Web site registrations. Interaction Types are defined in customizing under Social Contact Intelligence Contact Engagement Define Interaction Types . An interaction channel is used to analyze the interactions that a contact has with a company. An example are complaints. They should be grouped together no matter which communication medium was used to file the complaint. The interaction channel appears, for example, on the Interactions facet of the contact details. Interaction Channels are defined in customizing under Social Contact Intelligence Contact Engagem ent Define Interaction Channels . The assignment of communication media and interaction types to interaction channels is done in customizing under Social Contact Intelligence
Contact Engagem ent
Assign Interaction Types and Comm unication Media to
Channels .
If interactions should be assigned to interests, the interest keys must be defined in customizing under Social Contact Intelligence Contact Engagement Define Interaction Interests .
Travel Example The travel company is interested in the time when the traveler checked in. Therefore the interaction is enhanced with an attribute CHECK_I N_TI ME.
For the travel example there is no need to implement the BAdI. As communication media SAP has already delivered WEB. This one is used for the check in. As interaction type CHECK_I N is defined. As a check in is done by a contact the direction is inbound.
As interaction channel again the SAP delivered WEB entry is reused. The communication media and interaction type are added to this channel.
As travel bookings should be assigned to interest of world regions, the customizing for interests are maintained as followed:
All interest are translated in foreign languages.
2.4.2 Import using CSV Upload Interactions can be uploaded into SAP hybris Marketing in CSV text format (code page UTF-8) by using the Import work set beneath Customer Data M anagem ent . The upload accepts commas, semicolons and tabulators as separators. A sample CSV file can be downloaded on the screen. The I D_ ORI GI N of the CSV upload is SAP_ FI LE_I MPORT.
Authorization A customer copy of composite Role SAP_ CUSTOMER_ENG_I NT_ KEY_ USER must be assigned to users who want to upload a CSV file. This role is assigned to special key users for key activities and administrative tasks as well as access to export definitions for target groups and initiatives. The contained single role SAP_CEI _ KUA needs the following authorizations: ·
For more information, see section Authorizations in the Security Guide for SAP CEI under Security Inform ation Security Guide (https:/ / websmp108.sapag.de/ ~sapidb/ 011000358700000803692013E).
help.sap.com/ cei
Structure Only the required attributes must be contained in the header row and they can be arranged freely. Customerspecific attributes, like CHECK_ I N_TI ME of the extension include, have to be added in the header row.
If the interaction should be mapped to an interest the field I NTEREST_I TEMneed to be filled with the key from the customizing.
Checks During Upload During the CSV upload, the SAP hybris Marketing performs the following format checks and conversions: ·
Date values: The SAP date format (YYYYMMDD) and the date format specified in the user profile are allowed.
·
·
Integer values: Integer values with or without separators are allowed, for example 1.317.208. Timestamp values: The SAP date, SAP date & time (YYYYMMDDhhmmss), or the time stamp long (YYYYMMDDhhmmss,aaaaaaa) values are allowed with or without separators.
·
Email values are allowed in the following format: {name}@{domain}
The content validation stops with the first error. The system only saves and uploads the content if no errors occur.
2.4.3 Import Using Remote Function Call (RFC) To create interactions without assigned interests the RFC CUAN_ CE_I NTERACTI ONS_ POST_ FLAT is available. If interactions with interests should be imported the RFC CUAN_ CE_I NTERACTI ONS_ POST is available. The RFCs are used when importing data through SAP Data Services or when data is already available within the SAP HANA database.
Prerequisite A defined origin is required for using the RFC. The origin will be stored as ID_ORIGIN during data import. The origin is defined in Customizing for SAP Customer Engagement Intelligence under Social Contac t Intelligence Contact Engagement Define Origins of Contact ID .
Authorization A customer copy of single role SAP_ CEI _ ECOMMERCE_ I NTEGRATI ON must be assigned to the user that is used to log on to hybris Marketing for execution the RFC. The following authorizations are required:
Authorization object to control authorizations for access of business objects in SAP CEI: HPA_ OBJ ECT with the following field values: o
ACTVT =02,03
o
HPA_OBJ =CUAN_ I NTERACTI ON
For more information, see section Authorizations in the Security Guide for SAP CEI under Security Inform ation Security Guide (https:/ / websmp108.sapag.de/ ~sapidb/ 011000358700000803692013E).
help.sap.com/ cei
Structure The import parameter I V_ABORT_I F_ ERROR of the RFC supports the following upload scenarios: ·
X = Store all or nothing (default)
·
Empty = Store the valid values
The interactions are provided through table parameter I T_ I NTERACTI ONS. Each row contains the data of a separate interaction. The following attributes are mandatory: ·
I D_ORI GI N: defined in the prerequisite section
·
I D: identifier of contact in source system
·
COMM_MEDI UM: defined in the prerequisite section
·
I A_TYPE: defined in the prerequisite section
·
TI MESTAMP: validity date of the contact data or to the date when the contact has provided them
All other attributes in the table parameter are named the same as their storage field in the database. If interests should be assigned to the interaction and RFC CUAN_CE_INTERACTIONS_POST is used, the interests are handed over through field INTERESTS of the structure of import parameter IT_INTERACTIONS.
Success Message and Error Handling The table parameter ET_ FAI LED_I NTERACTI ONS contains all failed interactions. The messages for all interactions are returned in table parameter ET_MESSAGE.
2.4.4 Import using OData Service Interactions can be imported into SAP hybris Marketing using the OData service CUAN_ I MPORT_ SRV. As a prerequisite, the frontend service is activated in the SAP Gateway system. Usually the service is activated during standard installation process of hybris Marketing. You can check if the service is fully available in transaction SI CF by testing service CUAN_ I MPORT_ SRV. TheI D_ ORI GI N of an OData Import is SAP_ ODATA_ I MPORT.
Authorization A customer copy of single role SAP_ CEI _ ECOMMERCE_ I NTEGRATI ON must be assigned to the user that is used to log on to hybris Marketing for execution of service CUAN_ I MPORT_ SRV. The following authorizations are required: ●
Authorization object to control authorizations for access of business objects in SAP CEI:HPA_ OBJ ECT with the following field values: ○
○
ACTVT =02,03 HPA_OBJ =CUAN_I NTERACTI ON
For more information, see section Authorizations in the Security Guide for SAP CEI under Security Inform ation Security Guide (https:/ / websmp108.sapag.de/ ~sapidb/ 011000358700000803692013E).
help.sap.com/ cei
Structure TheCUAN_ I MPORT_ SRV OData service consists of the following entity sets and entity types: Ent it y Set
Ent it y Type
Ent it y Type Descript ion
ImportHeaders
ImportHeader
Technical Header
Interactions
Interaction
Interaction
Interaction Interests
Interaction Interest
Interaction Interest
CAUTION
The OData protocol allows the import or update of one interaction only. To achieve the mass creation of interactions, a dummy entity (import header) is created by deep insert. You perform an insert on the entity Import Header and create interactions as subnodes of the import header. The entity type I mpor t Header describes the technical header of an import of interactions. The entity consists of the following properties: Propert y
Descript ion
Dat a Type
Id
Technical identifier of import run
String
Timestamp
Timestamp of import run
Date Time
Lengt h
Mandat ory
32
UserName
User Name
String
12
SourceSystemId
Identifier of source system
String
20
X
The properties I d, Ti mest amp, and User Name are used for logging the external data request. For every service request a new ID has to be provided. The Sour ceSyst emI d property allows to distinguish between different source systems and is a mandatory attribute. I d, Ti mest amp, and User Name are defaulted when no values are provided. The entity type I nt er act i on contains all attributes that are required to create an interaction. The following list shows the all properties of the entity matched to the ABAP fields explained in chapter 1.2. All properties can be seen in the metadata document under ht t ps: / / : / sap/ opu/ odat a/ sap/ CUAN_I MPORT_SRV/ $met adat a. Most of the properties are used by Campaign Execution to create interactions.
The entity type I nter act i on I nt erest is an optional entity that can be used to map an interaction to interest keys from the customizing. They are handed over to the tag beneath an interaction.
Call of OData Service For a complete example how to call the OData service see the example for contacts in chapter 2.3.4. The following examples show which properties to populate for which use cases: 1.
Travel Example Based on the contacts from the airline system that were uploaded in chapter 2.3.4 the check-in information can now be uploaded. The following code example shows the properties for traveler.
2.4.5 Import using WebService Interactions can be created and updated using the WebService CUANPost I nt er act i onCont act s . This service is a wrapper of the RFC CUAN_CE_I C_POST_ FLAT. See chapter 2.3.3 for explanation on import and export parameters as well as authorization settings. The WebService is one more option next to the OData Service to import interactions from external systems. The only difference between both options is, that the OData Service directly contains extension include fields.
After the contact and interaction data is replicated and uploaded into hybris Marketing, a segmentation profile can be created. The base object for the segmentation is the contact. Hybris Marketing has delivered a segmentation profile for contacts. This segmentation profile already could be used with the uploaded data:
The segmentation profile only shows short term transactions and SAP CRM business documents. Moreover extensions of the contact master are not shown. That’s why a new segmentation profile needs to be created.
SAP HANA Modelling 3.1.1 Base View and Contact Extension Fields The delivered SAP segmentation model is used as basis. Therefore the SAP HANA view sap. hana- app. cuan. cont act / CA_C_CONTACT_ I NTERACTI ONS is copied. The view is a star join calculation view. Such views show the best performance result in usage within Audience Discovery and Targeting. In the copied SAP HANA view the extension fields of table CUAND_CE_ I C_ROOT are added in part I C_ ROOT and all joins. At the end the labels of the extension fields are maintained in the semantics part of the view.
3.1.2 Long Term Transaction Data and Client Mapping As next step dimensional calculation views are built for long term interaction data. As data from SAP ERP and SAP CRM can belong to a different client than the contact data in hybris Marketing, the client mapping needs to be implemented. Hybris Marketing delivers the customizing table CUANC_CLNTMAP. This table maps a hybris Marketing client to a dedicated SAP ERP and a dedicated SAP CRM client. When a query from hybris Marketing ABAP server is executed on a SAP HANA view containing an SLT replicated SAP ERP/ CRM table by default the session client of the ABAP database user would be taken. To overcome this problem the view property Default in the semantics section of the calculation view is set to cross client . Moreover an input parameter for the Client ERP and CRM client needs to be defined. The client is derived from table CUANC_CLNTMAP.
In order that the dimension view can be joined with the base view later on, the contact key is needed. For that reason the table CUAND_CE_I C_FCET is joined. A filter with $$cl i ent $$ on attribute MANDT is needed and a filter on attribute I D_ORI GI N with the respective value from the contact upload. The contact key is the attribute PARENT_ KEY (see also chapter 1.1). The long term transaction data is joined with table CUAND_CE_I C_F CET through an inner join with cardinality n:1.
Note
The client mapping and join to the contact key should be modeled in an own SAP HANA view as this information is needed several times in the contact factsheet.
The dimension view for long term transaction data can also include third-party data. They work the same as SLT replicated tables.
The dimension view is added to the star join of the base view through the client and contact key . The join to dimension views is always a left outer join from the data foundation to the dimension view with cardinality 1:n.
Travel Example As described in chapter 2.1and 2.2 long term transaction data for bookings is replicated through SLT, whereas flight information and flight schedule are created as CDS data model. First the base view CA_D_BOOKI NG_TO_CONTACT for client mapping and contact key mapping with the booking information is created. The traveler key in table SBOOK is CUSTOMI D. This field is joined with field I D from table CUAND_CE_I C_FCET.
As next step the dimension view CA_D_BOOKI NGS is created. The flight schedule is joined through a left outer join to the projection on viewCA_D_ BOOKI NG_ TO_CONTACT, as only the schedule information for the required flight should be added:
The last step in the dimension view is the projection. Here the semantics for the fields are setup, e.g. field FLDATE is defined as date. Also the label columns are defined and the label columns itself are set to hidden.
3.1.3 Short Term Transaction Data The short term transaction data are modelled in dimension view sap. hana- app. cuan. cont act . i nt er nal / CA_D_I NTERACTI ONS. If the interaction was not enhanced with an extension field, than there is no additional effort, as this dimension view is already part of the star join of the base view. If the interaction was enhanced with an extension field, then the dimension view needs to be copied. In the copied view similarly to the contact master in chapter 3.1.1the extension fields need to be added to part I A_ROOT and all joins. In the semantics section the labels need to be maintained. Afterwards in the base view the dimension view sap. hana- app. cuan. cont act . i nt er nal / CA_ D_I NTERACTI ONS is removed and the copied view is added. The copied dimension view is joined as left outer join from the data foundation to the dimension view with cardinality 1:n.
Travel Example The interaction was enhanced with field CHECK_I N_TI ME. Therefore the dimension view for interactions have to be copied. In the copied view the field is added to part I A_ROOT and all joins. As the ABAP Time is saved as a string in the SAP HANA database, the outcome on the user interface would be like 124000. To overcome this issue the field CHECK_I N_TI ME was set as CHECK_I N_TI ME_OLD in part I A_ROOT. In the projection of the view a calculated column CHECK_I N_TI ME is created that converts the string from CHECK_I N_TI ME_OLD into an SAP HANA time:
The copied view is added to the base view through a left outer join on MANDT and DB_KEY:
ABAP Customizing The customizing for Audience Discovery and Targeting containes several activities. As the SAP HANA view was copied from the base model for contacts, some customizing entries are created as copies of the entries for the base model. Those entries are: 1) Define Segmentation Objects The segmentation object of the base model is SAP_ CONTACT_ ENGAGEMENT_11SP5. This entry can be copied to a new segmentation object. A popup comes up asking if dependent entries should be copied. Those entries should be copied. A new description for the copied segmentation object can be maintained. 2) Define Attribute Groups for Segmentation Object As contact details and interactions are always shown, the entries for base model SAP_CONTACT_ENGAGEMENT_11SP5 and attribute group SAP_ CE_CONTACTS as well as attribute group SAP_ CE_I NTERACTI ONS can be copied. The advantage of the copy is, that the group descriptions are copied in all languages. 3) Define Segmentation Object Key Fields For the segmentation object key the entry for segmentation object SAP_CONTACT_ENGAGEMENT_11SP5 with segmentation object key field SAP_ CONTACT_ KEY can be copied.
When the base entries are copied the whole setup process can start. Therefore the customizing is maintained in the following order: 4) Define Aliases for SAP HANA Data Sources The alias defined in this activity is the link to the SAP HANA view created in chapter 3.1.1. 5) Define Attribute Groups for Segmentation Object If there are additional attribute groups, e.g. for long term transaction data, then a new attribute group must be defined. Ensure to translate the group description in all languages through menu Goto à Translation . 6) Assign SAP HANA Data Sources to Segmentation Objects In this activity the alias for the SAP HANA data source (step 4) is mapped to the segmentation object from step 1 (Define Segmentation Objects). In the deeper attributes section all attributes from the SAP HANA model are visible. They can be added to the attribute groups from step 2 and step 5. Moreover each attribute can be classified if it should be available in the export definition, visible in the segmentation and visible as dimension in the segmentation. Also the available preview types as well as the default preview type per attribute can be maintained. 7) Assign Segmentation Attributes to Object Key Fields In this activity an entry from step 3 ( Define Segmentation Object Key Fields) should be available. In the F4 help for the attribute name column the entry CONTACT_ KEY should be available. Save this entry. 8) Define Segmentation Profiles The last step is the definition of the segmentation profile. Choose a key name for the profile and add the segmentation object from step 1 and the alias for the SAP HANA data source from step 4. Save the entry. Now the button in the Set column should be available. With this button set the profile as default profile. At last enter a description and translate the description in all languages through menu Goto à Translate .
Travel Example The following entries were maintained: 1) Define Segmentation Objects
2) Define Attribute Groups for Segmentation Object
For exporting target groups or executing campaigns in hybris marketing an export definition is still missing.
Export Definition An export definition is needed if the target group member list should be exported as CSV file or campaign content like an email should be personalized with placeholders like NAME_TEXT. For the maintenance of export definitions an own workset is available for keys users of hybris Marketing. Export definitions are based on the attributes of a segmentation object which itself is mapped to a segmentation profile. In the customizing activity M a r k et i n g
A u di en c e D is c ov er y a n d Tar g et i n g
S eg m e nt a t io n
hybris
A s si gn S AP H AN A D at a So u r ce s t o S eg m e nt a t i on
Objects for each attribute the availability within the export definition can be defined. An attribute can be
available in the export definition even if it is not available in the segmentation.
Another customer activity that is required in order to create export definitions is Definitions
hybris Marketing
Export
Define Sett ings for Target of Export Definition . You can define export targets for various purposes,
for example, for mail campaigns or flyer campaigns. In addition, you can store the target system name for these export targets. You can consider the system name when submitting the export files. Furthermore, you can define characters for separators between fields or columns and between multiple attribute values within one field or column. Using these separators, you can influence the depiction of the export file data in a spreadsheet application such as Microsoft Excel. Afterwards an export definition can be created on the user interface under is
Campaign Management
Export
Definitions .
Travel Example In the travel example the attributes available within the export definition have been defined in the customizing activity. For the targets of the export definitions the following entry have been made:
The Sales Analysis facet provides two sections containing numbers that reflect the purchasing behavior of the consumer, as well as product recommendations for products to offer. A consumer is a contact having set field I S_ CONSUMER to true in the contact master.
The facet is only available if the customer has bought the license SAP hybris Marketing Insight and setup solution Customer Value Intelligence.
Travel Example The travel company does not have SAP ERP data based on table KNA1. As Customer Value Intelligence requires SAP ERP data, this solution is not setup in the industry example. Therefore the consumer factsheet only contains the facets Interactions and Scores:
Interactions This facet provides an overview of interactions, posts, interests, and SAP CRM documents (leads, opportunities, activities, including navigation to the corresponding documents in SAP CRM) together with the channel that the contact used to interact with the company. In addition, you can analyze to which campaigns the contact is assigned, and you can navigate to the corresponding campaign details. The tiles available for channels are customizable in transaction SPRO under Guide
SAP hybris Mark eting
Social Contact Intelligence
SAP Custom izing Implem entation
Cont act Engagement
Define Interac tion Channels
SAP has delivered several channels, that can be deleted if they are not applicable, e.g. if no SAP CRM system is attached than Sales Order, Opportunity and Activity will always be 0 and therefore can be deleted. They can always be restored from client 000.
4.2.1 Prerequisites for Long Term Interactions In order to show also long term interactions on the screen some customizing must be created. A channel, communication medium and interaction type need to be customized. A communication medium can be nearly any medium used for communication, such as email, phone, a data processing system, or even paper. Communication mediums are defined in customizing under
Social Contact Intelligence
Cont act Engagem ent
Define Comm unication Media .
An interaction type is any interaction that a contact can use or do to interfere with a company. Interaction type could be Web site visits, Web site downloads and Web site registrations. Interaction Types are defined in customizing under
Social Contact Intelligence
Contact Engagem ent
Define Interaction Types .
An interaction channel is used to analyze the interactions that a contact has with a company. The interaction channel appears, for example, on the Interactions facet of the contact details. Interaction Channels are defined in customizing under Social Contact Intelligence Contact Engagem ent Define Interaction Channels . The assignment of communication media and interaction types to interaction channels is done in customizing under Social Contact Intelligence
Contact Engagem ent
Assign Interaction Types and Comm unication Media to
Travel Example All channel tiles that are not relevant for the travel company have been deleted from the customizing. For the bookings a new interaction channel BOOKI NGS is created with the SAPUI5 icon for sales documents. As communication medium a TRAVEL_ AGENCY is created and as interaction type a TRAVEL_ BOOKI NG as inbound interaction. The communication medium TRAVEL_AGENCY and interaction type TRAVEL_ BOOKI NG are moreover assigned to channel BOOKI NGS. As a result an empty Bookings tile is available:
4.2.2 Channel Tiles for Long Term Interactions To show the number of long term interactions per channel tile the SAP HANA view for channel tiles must be enhanced within SAP HANA studio. The SAP HANA view for channel tiles is sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL_ CNT. In order to enhance a view the SAP HANA offers the concept of content mapping. The SAP delivered view is copied via mass copy to a new root package and the mapping from the root package to package sap is saved in the SAP HANA database. SAP applications like hybris Marketing evaluate the package mapping and route an SQL query to a mapped view if a mapped view exists. With this concept view sap. hana- app. cuan. cont act . i nt er nal / CA_CE_I NTERACTI ONS_ALL_CNT can be enhanced. The view is copied as described in the SAP HANA Modeling Guide under Mod eling Informat ion
First Aggr egat i on_1, Aggr egat i on_2 and Aggr egat i on_ 3 are removed. Afterwards the Uni on_1 is empty but the target fields of the union still exist:
The original view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL_CNT is added to the join and its attributes are mapped to the target fields. With this approach new channel tiles that are added by hybris Marketing in future are directly added to the copied view.
As next step a cube calculation view is needed per long term transaction data representing the target structure of view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL_CNT. The fields have the following types: Field Name
To generate the I A_KEY can be difficult if the identifier of the long term transaction is character based and smaller than 16 characters. To overcome that a calculated column can be created using the r aw( ) function and by putting leading zeros in front of the original id:
As the timestamp from ABAP is always stored as decimal data type instead of the SAP HANA timestamp data type, a date cannot be transformed into a timestamp with the t i me( ) function. Instead the decf l oat( ) function and a multiplication by 1.000.000 is needed:
The channel is a calculated column with the value that was entered in the customizing for this long term transaction. The channel description can be derived by a text join with table CUANC_CE_CHNNL_T:
The field I A_ CNT is created as counter on field I A_KEY:
The direction is also a calculated column with a fixed value. The possible values are an empty string for Unknown, 0 for Inbound and 1for Outbound.
In the end the view for the long term interaction is added to the union of the copied view CA_CE_I NTERACTI ONS_ALL_CNT and all mandatory fields are mapped to the target structure:
After each extension of an SAP HANA view the ABAP Business Object Metadata Framework has to be refreshed. Therefore customizing activity SAP hybris Mark eting General Sett ings Extensibility Clear BOPF Met adata from Buffer needs to be executed.
Travel Example As basis for the count interaction view of bookings the view CA_D_BOOKI NG_TO_ CONTACT is reused as it already takes care of client mapping and mapping to contact key of hybris Marketing. On top the channel description is joined. In the end the I A_KEY is created as calculated column with r aw( ‘ 00000000’ +”BOOK_I D”) . The timestamp is created as calculated colum n with decf l oat ( “ORDER_DATE”* 1000000) . The direction is a calculated column with ‘0’ as bookings are inbound interactions. The I A_ CNT is created as counter on I A_KEY.
4.2.3 Long Term Interactions in Timeline For the timeline on the right of the interactions screen the same process as for the channel tiles is used. The calculation view delivered by SAP to determine the timeline is the view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL. This view is copied as explained in chapter 4.2.2 for view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL_CNT.
First CA_I NTERACTI ONS, CA_CE_CRM_I NTERACTI ONS and CA_ CE_I NI _I NTERACTI ONS are removed from Uni on_ 2. Afterwards the Uni on_ 2 is empty but the target fields of the union still exist:
The original view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL is added to the join and its attributes are mapped to the target fields. With this approach new interactions that are added by hybris Marketing in future are directly added to the copied view.
As next step a calculation view is needed per long term transaction data representing the target structure of view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL. The fields have the following types: Field Name
Additionally for the interactions the interaction type and communication medium with descriptions is needed. The I A_TYPE is a calculated column with the fixed value from the entered customizing. The description can be derived through a text join on table CUANC_CE_ I ATYP_ T:
TheCOMM_ MEDI UM is also a calculated column with the fixed value from the entered customizing. The description can be derived through a text join on table CUANC_ CE_ CMM_M_ T. The last mandatory parameter is the description. This is the text that is displayed as last line on the interaction, e.g. Campaign ID 3, Flyer for J apan: If you have a URL that openes the specific interaction then you can also fill field SOURCE_ DATA_ URL. If a value is offered for the SOURCE_DATA_ URL, than the first line of the interaction is blue indicating a link. By clicking on the link the interaction is openned in a new window. If an interaction belongs to a specific campaign and the CAMPAI GN_GUI D is offered also a link to the campaign is offered for the interaction. If an interaction should be assigned to an interest the fields I NTEREST_I TEMand I NTEREST_ I TEM.description must be filled. Values in fields I NTEREST_I TEM can only be values from the customizing for interests under SAP hybris Mark eting Social Contact Intelligence Contact Engagem ent Define Interaction Interests . The description for the interests can be derived through a text join on table CUANC_CE_IOI_T.
In the end the view for the long term interaction is added to the union of the copied view CA_CE_I NTERACTI ONS_ALL and all mandatory fields, as well as fields like SOURCE_DATA_ URL or I NTEREST_I TEM, are mapped to the target structure:
After each extension of an SAP HANA view the ABAP Business Object Metadata Framework has to be refreshed. Therefore customizing activity SAP hybris Mark eting General Sett ings Extensibility Clear BOPF Met adata from Buffer needs to be executed.
Travel Example As basis for the interaction view of bookings the view t mp. cei _i ndust r y. vi ews/ CA_BOOKI NGS_CNT, created in chapter 4.2.2, is reused as it already takes care of client mapping, mapping to contact key of hybris Marketing, generation of I A_KEY as well as the timestamp and the channel and channel description. On top the I A_TYPE is created as calculated column with value TRAVEL_ BOOKI NG and the COMM_MEDI UMis created as calculated column with value TRAVEL_ AGENCY. The corresponding descriptions are derived from tables CUANC_CE_I ATYP_T for the interaction type and CUANC_ CE_ CMM_M_T for the communication medium.
The INTEREST is created a calculated column. Depending what the target country of a flight is, the interest is set to the corresponding customizing value.
TheDESCRI PTI ON is created as calculated column, concatenating a string with the BOOK_ I D. In this case the string Booking is not translated. If a translated string should be used the string must be stored in a text table and joined in the view.
TheSOURCE_DATA_ URL is also a calculated column of type NVARCHAR. This type can be linked with NCLOB fields. The URL is concatenated out of the URL of the booking system and the booking id:
After adding the viewt mp. cei _i ndus t r y. vi ews/ CA_BOOKI NGS_AS_I NTERACTI ON to the copied view t mp. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL the bookings are visible in the timeline:
4.2.4 Interests of Long Term Interactions in Tag Cloud If at least one interaction is assigned to an interest the calculation view for the interest tag cloud must be enhanced as well. The calculation view delivered by SAP to determine the interests for the tag cloud is the view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_I OI . This view is copied as explained in chapter 4.2.2 for viewsap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_ALL_CNT.
First Aggr egat i on_3, Aggr egat i on_2 and Aggregation_1 are removed from Uni on_1. Afterwards the Uni on_ 1 is empty but the target fields of the union still exist:
The original view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_I OI is added to the join and its attributes are mapped to the target fields. With this approach new interests that are added by hybris Marketing in future are directly added to the copied view.
As next step a cube calculation view is needed per long term transaction data with interests assigned representing the target structure of view sap. hana- app. cuan. cont act . i nt er nal / CA_ CE_I NTERACTI ONS_I OI . The fields have the following types: Field Name
In the end the view for the long term interactions with interests assigned is added to the union of the copied view CA_CE_I NTERACTI ONS_ I OI and all mandatory fields are mapped to the target structure:
After each extension of an SAP HANA view the ABAP Business Object Metadata Framework has to be refreshed. Therefore customizing activity SAP hybris Mark eting General Sett ings Extensibility Clear BOPF Met adata from Buffer needs to be executed.
Travel Example As the view tmp.cei_industry.views/ CA_BOOKING_AS_INTERACTION already contains all needed fields, this view is added to the copied view t mp. hana- app. cuan. cont act . i nt er nal / CA_CE_I NTERACTI ONS_I OI . Afterwards the interests are visible in the tag cloud and can be used as filter:
Scores The score facet shows additional attributes of a contact as well as assumptions about the future actions and decisions of this contact. They can be created in different ways: ·
·
Scores can be the outcome of predictive modeling with model training and model fitting (for example, a score lead propensity) Scores can be heuristically calculated (for example, a profile score based on individual attributes of a contact)
SAP has predelivered the following scores: ·
Activity Score: indicates the activity of a contact in percentage, based on their short term interactions
·
Age
·
Gender
·
·
·
Latest Activity: indicates whether the contact’s latest short term interaction happened a short or a long time ago Marital Status Sentiment Score: indicates the contact’s attitude towards the company and its products based on the number and ratings of the contact’s posting in social media
Scores can be removed and added to the screen through the personalization button in the first row. The removal and adding are saved for the contact system wide and not for the end user. To display a score in the header area on the left of the thing inspector the favorites icon need to be pressed.
Scoring Score Sc ores s in in Con Contact tact Factsheet Factsheet
How to create own scores is explained in the extensibility guide under help. help.sap.com/ sap.com/ cei Configura Configuration tion and ebsmp2 mp204.sap04.sapDeployment Informat ion Extensi Extensibility bility Guide chapter 11 (https:/ / webs ag.de// ~sapidb/ 01 ag.de 011 100 000358700 035870000 000830 083044201 442013E 3E). ).
Travel Example For the travel travel company the the traveler traveler status st atus is important. Therefore a score sc ore for the t he traveler traveler status is create c reated. d. It is is a heuristic score s core as it is i s based on historic data of the contact. Each traveler traveler that in average average did less than 4 bookings bookings in the last year is i s a normal traveler. t raveler. Every traveler that in average did more mor e than 4 bookings but less than 12 bookings booki ngs last year is a frequent f requent trave tra veler ler and all travelers tr avelers with more than 12 12 bookings in average last year are senators. As describ des cribed ed in the extensibi extensibility lity guide the views views and the procedure for the t he age age score are copied. c opied. In the calculation vie view w CA_CE_ CONTACT_ TRAVELER_ TRAVELER_SCO SCORE_ RE_EXT EXT the the view for the age score is deleted from the aggregation. With this the columns of the view are are also delete deleted, d, the input parameters parame ters persist. per sist. The view CA_CE_ CONTACT_ TRAVELER_ TRAVELER_SCO SCORE RE is is added to the aggregation of the _EXT the _EXT view. view. Afterwards the attributes CONTACT_ KEY KEY,, SCORE_ RE_D DESC ESC,, UNI T, T, UNI T. desc desc r i pt i on a on an nd RANK are are added as columns. The att attrib ribut ute e SCORE_ VALUE is added as aggregated column. col umn. The view need need to be activated now. After the t he activation in the semantics semantics section the unit description is not no t displayed displayed as UNI T. desc desc r i pt i on but on but as UNI T_descr i pt i on. on. To chang change e this back to UNI T. desc desc r i pt i on, on, the UNI T_descr i pt i on fir on first st need to be set as Labe L abell Column for the columnUNI column UNI T. T. Afterwards UNI T_descr i pt i on can on can be changed to UNI T. desc desc r i pt i on. on. With this chang change e the field is directly dir ectly set to Hidden H idden..
Moreover the input parameters need Moreover n eed to be mapped mapped to the view CA_CE_ CONTACT_ TACT_TRAVEL_ TRAVEL_ SCORE RE.. After the mapping the view can be activated acti vated again.
In the view CA CA_ _ CE_ CE_CO CONTACT_ TRAVELER_ TRAVELER_SCO SCORE RE three three places need to be exchanged. exchanged. First is the t he scenario id in in line 1. The T he new scenario scenario id will later be create c reated d in i n the customizing of hybris Marketing. The next exchang exchange e is done do ne in line 52. An id for the implemen is choosen. is c hoosen. Also this id will be defined defined in customizing later on. The implementation tation m ethod last exchange exchange is done in i n line 53. There the copied procedure pro cedure t mp. cei _i ndust ndust r y. vi ews. t r ave avell _s cor e/ PR_CE_CO PR_ CE_CON NTACT_ TACT_TRA TRAVELER VELER is is entered. enter ed. After the t he changed changed the view can be activated.
The pro proce cedu dure re PR_ PR_CE_CO CE_CON NTAC TACT_ T_ TRAV TRAVELER ELER is is used to call the actual score calculation. The score scor e calculation has to provide the contact key and the score value and . The view t mp. cei _ i ndust r y. vi ews ews / CA CA_ _ BOOKI NG NGS_ S_CN CNT from chapter 4.2.2 already contains the number number of bookings per contact. co ntact. As for the t he score calculation only the last year is interesting, a new script based calculated view is created with the following coding:
The new view CA_AVG_ BOOKI NGS_LAST_ YEAR is added to the procedure PR_CE_CONTACT_ TRAVELER. In the coding of the procedure also the name of the score column need to be adapted to the new view. After activation the needed SAP HANA modeling for the score calculation is done.
As per the extensibility guide as next step the customizing for Audience Discovery & Targeting is maintained: 1) Define Aliases for SAP HANA Data Sources
3) Assign SAP HANA Data Sources to Segmentation Objects
4) Define Segmentation Object Key Fields
5) Assign Segmentation Attributes to Object Key Fields
The new score should not be available within the segmentation profile of chapter 3, therefore no segmentation profile needs to be maintained. As next step the customizing for predictive scenarios is maintained:
1) Define Implementation Method The id for the implementation method was already defined in the SAP HANA view t mp. cei _i ndust r y. vi ews. t r avel er _sc or e/ CA_CE_ CONTACT_TRAVELER_ SCORE with TRAVELER_SCORE. Therefore a corresponding customizing entry is created:
2) Define Attributes for Applicable Scope There is no applicable scope for the traveler score calculation but due to architectural reasons an applicable scope is needed. It can be maintained with empty attributes:
3) Define Application Anchors There is already an anchor for the consumer factsheet CUAN_CONSUMER. 4) Define Predictive Scenarios The id for the predictive scenario was already defined in the SAP HANA view t mp. cei _i ndust r y. vi ews. t r avel er _sc or e/ CA_CE_ CONTACT_TRAVELER_ SCORE with CONTACT_ TRAVELER_SCORE. Therefore a corresponding customizing entry is created. An implementation method, applicable scope and application anchor is assigned. Moreover the scenario description is translated as the description is shown on the user interface.
5) Define Settings for Display of Predictive Scenarios on User Interface In order that the score has an icon and the information normal traveler, frequent traveler and senator status is shown on the user interface, the following customizing was maintained. The description are all translated.
Scores in Audience Discovery and Targeting How to integrate own scores in Audience Discovery and Targeting is explained in the extensibility guide under help.sap.com / cei
Industry Example The travel status created in chapter 5.1should be available in the segmentation profile created in chapter 3. The difference between a score on the contact factsheet and in the segmentation is, that in the contact factsheet the score is calculated for one contact only. In the segmentation the score is calculated for a group of contacts. If the travel status would be a quantified score, only customization would be necessary. But the travel status is a qualified score, scoring contacts as normal, frequent and senator travelers. The copied SAP HANA views t mp. cei _i ndust r y. vi ews. t r avel er _s cor e/ CA_CE_CONTACT_ TRAVELER_SCORE_EXT and t mp. cei _i ndust r y. vi ews. t r avel er _s cor e/ CA_CE_CONTACT_ TRAVELER_SCORE from the age score do not contain coding for qualified scores for a group of contacts. Therefore the coding must be enhanced. As prerequisite a view for the rank and its description is needed. The ranks are saved in table CUANC_PM_UI _THRS and the corresponding descriptions in table CUANC_PM_SCVAL_T. Both tables are joined through a text join on attributes CLI ENT, SCENARI O_ I Dand RANK :
As next step the view t mp. cei _i ndust r y. vi ews. t r avel er _scor e/ CA_ CE_CONTACT_TRAVELER_ SCORE is changed. The coding from line 61 to 100 is deleted and exchanged with the following coding:
As now the rank description is read, the output of the view must be enhanced with RANK_ DESCR. The rank description is of type NVARCHAR with length 40. The rank description is set as label column for column RANK and set to hidden.
After activation the view t mp. cei _i ndust r y. vi ews. t r avel er _ scor e/ CA_CE_CONTACT_ TRAVELER_SCORE_EXT is changed. The RANK_ DESCR as added to the output and again set as label column for column RANK .
With the changes to the views the customizing for Audience Discovery and Targeting can be maintained. In chapter 5.1the data source alias TRAVELER_ SCORE was already maintained. In chapter3.2 the segmentation object TRAVELERS for the Traveler Segmentation was maintained. The data source alias now needs to be added to the segmentation object in customizing under SAP hybris Marketing Audience Discovery and Targeting Segmentation Assign SAP HANA Data Sources to Segmentat ion Objects :
For the attributes only theRANK is interesting, as it contains the qualified information:
Afterwards the contact key needs to be added to the segmentation object key under Audience Discovery and Targeting
Segmentation
SAP hybris Marketing
Assign Segmentation Attributes to Object Key Fields :
As last step the attribute description must be maintained for the RANK. Normally the segmentation takes the attribute description from the underlying SAP HANA view. As the view t mp. cei _i ndust r y. vi ews. t r avel er _sc or e/ CA_CE_ CONTACT_TRAVELER_ SCORE_EXT was copied from an SAP delivered view the corresponding description have been copied. If the description is changed in the SAP HANA modeler only the developer description is changed instead of a language dependent description. To set the description for languages there are two possibilities: ·
SAP HANA Repository Translation Tool: The usage of the SAP HANA Repository Translation Tool is described under help.sap.com/ hana_platform Developm ent Informat ion SAP HANA Developer Guide
SAP HANA Applicat ion Lifecycle Managem ent
SAP HANA Repository Translatio n Tool
( http:/ / help.sap.com/ saphelp_hanaplatform/ helpdata/ en/ af/ a4db3987da44e8b2e9cda823e0c126/ co
View cluster VC_GSEG_OT_ T: By opening transcation SM34 and entering view cluster VC_GSEG_OT_ T in maintenance mode, the attribute description can be maintained in the hybris marketing system:
As outcome the traveler status is available as segmentation attribute. The segmentation always sorts by the count. As most travelers have a frequent status, the frequent status is on top:
Important Disclaimers on Legal Aspects This document is for informational purposes only. Its content is subject to change without notice, and SAP does not warrant that it is error free. SAP MAKES NO WARRANTIES, EXPRESS OR IMPLIED, OR OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. Coding Samples
Any software coding and/ or code lines/ strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP intentionally or by SAP's gross negligence. Internet Hyperlinks
The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. Regarding link classification, see: http:/ / help.sap.com/ disclaimer.