data management upload interfaces 1702 - sap · data management upload interfaces 1702. ... the...

124
Integration Guide CUSTOMER SAP Hybris Marketing On Premise Document Version: 1.02 – 2017-03-07 Data Management Upload Interfaces 1702

Upload: vocong

Post on 12-May-2018

253 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Integration Guide CUSTOMER

SAP Hybris Marketing On PremiseDocument Version: 1.02 – 2017-03-07

Data Management Upload Interfaces 1702

Page 2: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Content

1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1 Email Validation Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Interaction Contacts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Interactions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5 Companies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15

6 Product Categories and Products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

7 Best Practices and Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187.1 Recommended Package Sizes and Upload Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187.2 Optimizing Performance During OData Service Calls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

8 Import of Data Using CSV Upload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

9 Import of Data Using OData Service CUAN_IMPORT_SRV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349.1 Structure of OData Service CUAN_IMPORT_SRV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369.2 Importing Interaction Contacts Using OData Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .579.3 Importing Interactions Using OData Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .639.4 Importing Companies Using OData Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659.5 Importing Products and Product Categories Using OData Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . 679.6 Import of Marketing Locations Using an OData Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709.7 Import of Marketing Beacons Using an OData Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86

10 Import Using RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9510.1 Importing Interaction Contacts Using RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9510.2 Importing Interactions Using RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9810.3 Importing Companies Using RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9910.4 Importing Products and Product Categories Using RFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

11 Import Using Web Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10311.1 Importing Interaction Contacts Using Web Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10311.2 Importing Interactions Using Web Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10311.3 Importing Companies Using Web Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10311.4 Importing Products and Product Categories Using Web Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

12 Use Cases for Importing Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

2 C U S T O M E RData Management Upload Interfaces 1702

Content

Page 3: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

12.1 Import Contacts with Marketing Permissions from an External Source System . . . . . . . . . . . . . . . . . . 10512.2 Import Interactions for Newsletter Subscriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10712.3 Import Interactions for Marketing Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

13 Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Data Management Upload Interfaces 1702Content C U S T O M E R 3

Page 4: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Document History

Before you start, make sure you have the latest version of this document. You can find the latest version at the following location:

http://help.sap.com/mkt

The following table provides an overview of the most important document changes. If the information you are looking for is not described in this guide or if you find something described incorrectly, please send an email to mailto:[email protected] and we'll update this guide.

Table 1: Document History

Version Date Description

1.0 2017-05-09 Initial version for SAP Hybris Marketing

4 C U S T O M E RData Management Upload Interfaces 1702

Document History

Page 5: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

1 Introduction

This document describes the external interfaces that SAP Hybris Marketing provides for creating or updating Interaction Contacts, Interactions, Interests, Corporate Accounts, Product Categories, and Products. The following interfaces exist:

● CSV upload - This upload is performed manually in Import Data and is additionally documented in the Application Help, which you can access directly from the app.

● OData service

NoteThe OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to create SAP Hybris Marketing interactions from business documents from any source system. In contrast to OData service CUAN_IMPORT, CUAN_BUSINESS_DOCUMENT_IMP_SRV enables you to change interactions. Each business document is represented by an interaction, and is identified by the key of the business document in the external system. The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV is used for standard integration of SAP Hybris Marketing with SAP Hybris Cloud for Customer. It is also used in marketing-driven and sales-driven processes. For information on using the OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV see the Importing Business Documents guide at http://help.sap.com/mkt SAP Hybris Marketing Cloud SAP Hybris Marketing Cloud Product PageIntegration .

● Remote function call (RFC)● Web service

You can use the Business Add-In Interaction Contact Update (CUAN_CE_IC_UPDATE) to create new contacts or companies based on the imported interactions, interaction contacts, or companies. For more information, see Customizing for SAP Hybris Marketing under Contacts and Profiles Interaction Contacts Business Add-Ins (BAdIs) BAdI: Interaction Contact Update .

Feedback

We'd really like to know what you think of the quality, structure or content of this guide. Please send your feedback to us at mailto:[email protected].

Data Management Upload Interfaces 1702Introduction C U S T O M E R 5

Page 6: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

2 General

This chapter describes miscellaneous functions and checks.

2.1 Email Validation Checks

Email addresses are checked for validity according to RFC 3696 norm. The validation checks are listed in the table below.

The format of a valid email address is [email protected]

● The local part, found before @, is typically the user name.● A subdomain, found directly after @, is optional, for example help in [email protected]. A

subdomain can also be composed of several parts, separated by a dot, for example cloud.help.● The domain is typically the name of the business, organization or Internet service provider that owns that

domain.● The top-level domain is what appears right-most in an email address, after the domain. For example, .com in

[email protected].

Table 2:

Local Part Domain Part

Allowed Characters ● !#$%&*+-/=?^_`'{|}~.● ABCDEFGHIJKLMNOPQRSTUVWXYZ

(capital letters)● abcdefghijklmnopqrstuvwxyz

(small letters)● 0123456789 (numbers)

● Separator: . (dot)

● Whole domain part:○ ABCDEFGHIJKLMNOPQRSTUVWX

YZ (capital letters)

○ abcdefghijklmnopqrstuvwxyz (small letters)

Additional allowed characters Following \ or between ""

"(),:;<>[]@\<blank>

● Additionally for domain and subdo­main:○ - (minus sign)○ 0123456789 (numbers)

Restrictions ● Minimum 1 character● Maximum 64 characters● No dot at the start or end

● Minimum 1 character for subdo­main/domain

● Minimum 2 characters for top level domain

● Maximum 255 characters● No dot at the start or end

6 C U S T O M E RData Management Upload Interfaces 1702

General

Page 7: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Example● Abc\@[email protected] ● Fred\ [email protected]● Joe.\\[email protected]● "Abc@def"@example.com● "Fred Bloggs"@example.com● [email protected]● customer/[email protected][email protected]● !def!xyz%[email protected][email protected]

Data Management Upload Interfaces 1702General C U S T O M E R 7

Page 8: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

3 Interaction Contacts

Interaction contacts refer to contacts in SAP Hybris Marketing A contact is a natural person who interacts with a company. Contact data is collected and merged from several sources into the master data tables within SAP Hybris Marketing.

We distinguish between contacts, corporate contacts, consumers, and suspects to define the business relationship of a contact to a company. For this purpose, the contact master data contains the IS_CONTACT and IS_CONSUMER fields:

● A suspect is a natural person whose interests are unknown but who, at some future date, may be important in the interaction with a company (B2B process), or may generate sales revenue (B2C process).

● A contact is a natural person with whom a company interacts in a B2B process (IS_CONTAcT = X).● A consumer is a natural person who generates sales revenue (IS_CONSUMER = X).

A person can be a contact and a consumer at the same time.

In addition to the business relationship, the validation status and contact level is also interesting. These indicate to what extent the information about a contact is valid. For example, if a contact simply clicked on an item on your Web site, the validation status is low, meaning that the contact is unknown. Whereas if a contact filled in a form on the Web site and entered name and address data, 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, meaning that the email address is validated. If a contact is in your customer database, the contact is a business partner.

Enhancing the Interaction Contact Data

The CUAN_S_CE_IC_EXT_FAFL structure contains the attributes for interaction contacts that you can import into the SAP Hybris Marketing system. In addition to the attributes defined in the structure, you can add custom-specific attributes:

● for interaction contacts in the INCL_EEW_CUAN_CE_IC_ROOT include● for interaction contact persons in the INCL_EEW_CUAN_CE_IC_ROOT_PERS include● for interactions and interaction contacts in the INCL_EEW_CUAN_CE_IA_IC include

The attributes that are added to the include are considered automatically. If you want to add master data to the interaction contact via the interaction, use the INCL_EEW_CUAN_CE_IA_IC include.

Some of the imported data is set by implemented business logic. The Business Add-In BAdI: Interaction Contact Update (CUAN_CE_IC_UPDATE) determines the records that are picked up to create the attributes for the Interaction Contact Best Record. The BAdI also determines the validation status.

For more information, see the BAdI documentation in Customizing for SAP Hybris Marketing under Contacts and Profiles Interaction Contacts Business Add-Ins .

NoteNote about the BADI Update Interaction Contact

8 C U S T O M E RData Management Upload Interfaces 1702

Interaction Contacts

Page 9: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Two field groups are available for updating interaction contact common data - one group contains fields related to the name and one group contains fields related to the address:

● Name: NAME_TEXT, NAME_FIRST, NAME_LAST● Address: STREET, HOUSE_NUM1, POSTCODE1, CITY1, COUNTRY, COUNTRY_FT, REGION_FT

The standard logic of the BADI Contact Interaction Update is as follows as far as these two field groups are concerned. These fields are filled according to the priority assigned to an origin in step 8. For example, if data from the origin SAP_ERP_CONTACT has a higher priority than data from the origin SAP_CRM_BUPA, the fields in these groups will be filled solely with data from SAP_ERP_CONTACT. If data in certain fields is not provided from SAP_ERP_CONTACT, these fields will remain empty. Missing data will not be filled from the source with the next highest priority if it is available.

Customers can change the standard BADI logic to adjust this behavior if required.

Free Text Mapping

When you import interaction contacts from a non-SAP system, free texts cannot always be automatically mapped to the internal IDs and names used by SAP. The automatic mapping of free text values to internal ID values keeps the interface simple. If the consumer provides free text, that is, data elements with the _FT suffix, the system tries to find the matching key value. If only free text is provided, the system tries to determine the corresponding code.

Mapping is supported for the following attributes:

● Country● Region● Language● Department● Function● Industry● Gender● Marital Status● Title

During the import of interaction contacts and interactions, mapping is performed automatically. For new, unknown free texts that cannot be mapped to SAP IDs, entries are created automatically as work items. You can then map these free texts to SAP IDs in the Customizing activity Map Free Texts.

ID ORIGIN

The origin of an ID indicates the source of this ID. The ID_ORIGIN field is maintained in Customizing for SAP Hybris Marketing under Contacts and Profiles Interaction Contacts Define Origins of Contact ID the . This is relevant if you want to add a new origin. For ID origins that are not delivered by SAP, add these IDs via the contact facets. The contact facets interface is available in the RFC-enabled function module and the OData service. For CSV Upload, the ID_ORIGIN field is set to SAP_FILE_IMPORT. This is the default, but you can also define different ID origins. This allows you to update the contact with different sources. If no ID is provided in the CSV file, it is generated automatically.

Data Management Upload Interfaces 1702Interaction Contacts C U S T O M E R 9

Page 10: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Caution● You must specify a different ID Origin per source system or data source. In other words, if you import data

from multiple sources, for example, from an ERP system, a CRM system, or a third-party system, you must ensure that the ID Origin for each source is different. Otherwise the data from one source will overwrite data imported from another source.

● You are not allowed to use the origin SAP_HYBRIS_MKT_IC.

In addition, you can flag an origin as incognito. Incognito in this context means that the system does not automatically create a master data record for a contact ID with the respective origin since the origin does not contain sufficient information to relate the ID to a person. For contact IDs from origins that are not flagged as incognito, the system automatically creates a master data record with the available information.

10 C U S T O M E RData Management Upload Interfaces 1702

Interaction Contacts

Page 11: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

4 Interactions

Use

Interactions refer to communication and information exchange of any kind between a user's company and a contact, such as emails to a company, phone calls to a contact, and posts written in social networks about a company or the company's products. Interaction data consists of two parts: one part identifies, describes, and controls the interaction itself, the other part identifies and describes the contact who performed the interaction. There is no limit on the number of interactions that an interaction contact can have.

NoteWhen you upload interactions using the OData interface, you cannot upload contact data (name, address and so on) at the same time. Contact data is uploaded separately.

Prerequisites

Before interaction data can be imported, the following prerequisites must be met:

● Customizing has been maintained for the following fields:○ ID_ORIGIN in the Customizing activity Define Origins of Contact ID (CEI_CE_DEF_ORIGIN)○ IA_TYPE in the Customizing activity Define Interaction Types (CEI_CE_DEF_IA_TYPE)○ COMM_MEDIUM in Customizing activity Define Communication Media (CEI_CE_DEF_CMM_MEDIA)

● Interaction type and communication medium have been assigned to a channel in the Customizing activity Assign Interaction Types and Communication Media to Channels (CEI_CE_CH_ASGN) .

● Interests must be edited or uploaded in Business Administration Interaction Interests .

NoteIf social media posts are imported (IA_TYPE = SOCIAL_POSTING), the ID_ORIGIN must be available as social media channel code (SMI_TYPE) such as TW for Twitter (see Customizing activity Define Settings for Social Media Integration (CSAN_ICONS)). The entries for ID_ORIGIN and COMM_MEDIUM must be identical with the SMI_TYPE.

● If ID_ORIGIN is an email address (IA_TYPE = EMAIL), the ID field must contain a valid email address. This is checked in the pre-delivered implementation of the CL_CUAN_CE_IA_UPLOAD_BADI_EXMP class of the BAdI Revise and Manage Interactions While Uploading (CUAN_CE_IA_UPLOAD).

For more information, see Customizing for the Profile Dashboard under SAP Hybris Marketing Contacts and Profiles Interactions .

Data Management Upload Interfaces 1702Interactions C U S T O M E R 11

Page 12: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Semantic Key

The semantic key for interactions determines the uniqueness of an interaction record. The semantic key is defined by the following 7 fields, 5 mandatory and 2 optional:

● These 5 fields are mandatory and are checked during import:○ ID_ORIGIN: Origin of the interaction contact data (except in the case of ANONYMOUS interactions, as

described under point 2b below.)○ ID: External ID of the interaction contact data (except in the case of ANONYMOUS interactions, as

described under point 2b below.)○ IA_TYPE: Interaction type○ COMM_MEDIUM: Communication medium○ TIMESTAMP: UTC time stamp in long form (YYYYMMDDhhmmss.mmmuuun)

● These 2 semantic key fields are optional and are not checked during import:○ SOURCE_OBJECT_TYPE: Object type of the source object, for example, an opportunity in SAP Hybris

Cloud for Customer.○ SOURCE_OBJECT_ID: Object ID of the source object, for example, the GUID of the SAP Hybris Cloud for

Customer opportunity or the original post ID of the respective social media network (such as TW or FB).

NoteOne exception to this is in the case of a social posting. For a social posting, a SOURCE_OBJECT_ID is required. In this case the system checks to see whether the SOURCE_OBJECT_ID field is filled and returns an error if the field is empty. The check behavior is described in the table.

Table 3:

If

IA_TYPE is

SOURCE_OBJECT_ID should be filled with

Remarks

SOCIAL_POSTING Original Post ID of the respective so­cial media network

This is checked during upload.

SHOP_ITEM_VIEW WEB_SESSION_ID For recommendations only. Not checked during upload.

WEBSITE_SEARCH WEB_SESSION_ID For recommendations only. Not checked during upload.

CLICK_THROUGH WEB_SESSION_ID For recommendations only. Not checked during upload.

SALES_ORDER SALES_ORDER_ID For recommendations only. Not checked during upload.

12 C U S T O M E RData Management Upload Interfaces 1702

Interactions

Page 13: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Anonymous Interactions

To import anonymous interactions, activate the IS_ANONYMOUS field. The system does not create a contact for anonymous interactions.

The system behavior for anonymous interactions is as follows:

● Usual Case for Anonymous Interactions:The ID_ORIGIN is anonymous and the IS_ANONYMOUS indicator is set ("X"). The system stores the interaction as an anonymous one.

● Deviations from Usual Case:1. Termination of Import if:

1. The ID_ORIGIN is not anonymous and the IS_ANONYMOUS indicator is set ("X"). The system terminates the import with a corresponding notification.

2. The ID_ORIGIN is empty and the IS_ANONYMOUS indicator is not set (" "). The system terminates the import with a corresponding notification.

2. System Correction of Import Data:1. The ID_ORIGIN is anonymous and the IS_ANONYMOUS indicator is not set (" "). The system sets the

IS_ANONYMOUS indicator and stores the interaction as an anonymous one.2. The ID_ORIGIN is empty (and, in addition, the ID is empty) and the IS_ANONYMOUS indicator is set

("X"). The system sets the ID_ORIGIN to anonymous, stores the interaction as an anonymous one, and creates a new GUID for field ID.

Update Modes

In most cases interactions can only be added, but not updated. However, the following exception exists:

● Non-semantic key fields of interactions for social media posts and for SAP Hybris Cloud for Customer can be updated.The fields ID_ORIGIN and ID usually identify the contact. Depending on the contact update mode (fields IC_UPDATE_MODE as explained in the table below) the import behavior is as follows: If a contact has already been created, its data is updated using the fields describing a contact. For the update logic, see Interaction Contacts [page 8]. If the contact is not yet available in the system, it is created.The following contact update modes are available for the field IC_UPDATE_MODE:

Table 4: Update Modes

Update Code

Type of Update What Is Updated

N No Update Only the Contact ID is determined. If no contact is found, an error is triggered.

C Create Only the Contact ID is determined. If no contact is found, a new one is created.

F Full Update All existing fields are overwritten by imported fields. If empty fields are imported, these overwrite the corresponding filled fields of the facet.

Data Management Upload Interfaces 1702Interactions C U S T O M E R 13

Page 14: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Update Code

Type of Update What Is Updated

D Delta All imported fields that are filled overwrite existing fields of the same facet of the contact. If the contact don't already exist, it is created.

Custom Fields

For a description of all fields supported for the import of interaction data, see the Appendix [page 110].

You can use the following includes if you want to add customer-specific attributes, which are then considered automatically during the upload:

● INCL_EEW_CUAN_CE_IA_ROOT (interaction-specific fields)● INCL_EEW_CUAN_CE_IA_IC (contact-specific fields used in interactions)

14 C U S T O M E RData Management Upload Interfaces 1702

Interactions

Page 15: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

5 Companies

Companies exist as interaction contacts with the type Corporate Account. The approach for uploading companies using OData RFC, Web Service and CSV is similar to that followed for interaction contacts, but with fewer attributes available.

The CUAN_S_CE_COMP_EXT_FAFL structure contains the attributes for companies that you can import into the SAP Hybris Marketing system. In addition to the attributes defined in the structure, you can add customer-specific attributes in the INCL_EEW_CUAN_CE_IC_ROOT include for interaction contacts, INCL_EEW_CUAN_CE_IC_ROOT_COMP include for companies (similar to interaction contacts) and in the INCL_EEW_CUAN_CE_IA_IC include for interaction contacts and interactions. The attributes that are added to the include are considered automatically.

For CSV Upload, the ID_ORIGIN field is set to SAP_FILE_IMPORT. This is the default, but you can also define different ID origins. This allows you to update the company with different sources. If no ID is provided in the CSV file, it is generated automatically.

Data Management Upload Interfaces 1702Companies C U S T O M E R 15

Page 16: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

6 Product Categories and Products

Product categories and products constitute master data rather than transactional data. Products can be categorized, for example, pens, ink cartridges, and erasers can be grouped in the category Stationery.

NoteSemantic Key for Products

The semantic key for products determines the uniqueness of a product record. The following fields are mandatory for product data:

● PRODUCT_ORIGIN: Origin of the product data● PRODUCT_ID: ID of the product data

If the product is related to a category, this relationship is expressed through the category assignment. In this case, the category ID within the product data is depicted as an assignment key.

Product categories can be set up in hierarchies: All categories are fixed elements of one particular hierarchy, and can be hierarchically structured amongst themselves by means of the parent category assignment.

The description of products and product categories is language-dependent. It consists of the language key , the product or product category name such as MR-750 or Stationery, and the product or product category description such as The MR-750 computer includes 32 GB RAM. or Stationery includes pens, ink cartridges, and erasers.

You can upload product category data and product data separately. In general, you must upload category data before you upload product data (exception: the upload of product data via OData service, see Importing Products and Product Categories Using OData Service [page 67]). When you upload product data, you can include category ID and hierarchy ID of an existing product category to establish the corresponding assignment. If you do not need product category data, you can leave the fields related to the category empty.

When uploading product categories, you can import only one hierarchy per upload process.

If you want to update existing product or product category data and add new data, this is possible in one joint upload process. New data will be created while existing data will be overwritten.

Prerequisites for Product Data Upload

To import product data, you have to maintain the field PRODUCT_ORIGIN in Customizing for SAP Hybris Marketing under Contacts and Profiles Products Define Origins of Product ID .

16 C U S T O M E RData Management Upload Interfaces 1702

Product Categories and Products

Page 17: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Upload of Product Attributes via Interaction Upload

If you upload interaction data and the system recognizes that a related product is missing, the system allows you to import product data with the upload of interactions. This option is available only for the initial upload of product data, not for the update of existing product data.

When a product is initially uploaded, it is created initially and the new technical key is stored as a reference at the PRODUCT node of the Interaction business object (CUAN_INTERACTION). If the same product is uploaded a second time, the system identifies the existing product and the key is stored again to avoid the creation of duplicates. The existing product is not updated. If you want to update the existing product data, you must use the dedicated product upload. A product that is imported via the interaction upload is available in Segmentation.

The import of products via interaction upload is not possible using the CSV import but with OData or any of the other interfaces.

Data Management Upload Interfaces 1702Product Categories and Products C U S T O M E R 17

Page 18: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

7 Best Practices and Troubleshooting

This section contains recommendations for obtaining optimum results during data upload. This includes information about the optimum package size, recommendations for system security and performance optimization, as well as troubleshooting tips if errors occur.

7.1 Recommended Package Sizes and Upload Sequence

Optimum package sizes for the different object types:

Table 5:

Object Type Recommended Initial Load

Multiple ● Parallel upload of entities is not allowed since this can lead to data inconsisten­cies.

● When you upload data for multiple object types initially, you should do so in the following upload sequence:1. Product categories2. Products3. Interaction Contacts4. Interactions

Contacts OData

● Recommended load: 5000● More than 10000 will result in error● Data upload is all or nothing. In other words, if an error occurs during upload, no

data is uploaded. For this reason, it might make sense to upload smaller pack­ages, for example, 10 x 500 entities. In terms of system performance, there is no significance difference in whether you upload 500 or 5000 entities. However you should consider network latency when deciding on the package size, which depends on the quality of the customer data.

18 C U S T O M E RData Management Upload Interfaces 1702

Best Practices and Troubleshooting

Page 19: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Object Type Recommended Initial Load

Interactions NoteFor CSV and OData imports, import packages containing more than 1000 interac­tions are processed asynchronously by default. Packages with 1000 or fewer in­teractions are processed synchronously. Customers can change the default set­ting for CSV and OData if required in the Customizing table CUANC_CE_IMPSIZE.RFC and Web Service imports are always processed syn­chronously.

1. CSV○ With common contact data

○ Max. 10 000 (memory restricted)○ Recommended 5 000

○ Without common contact data (IC_UPDATE_MODE = ‚N‘):○ Max. 100 000○ Recommended 50 000

2. OData○ Max. 100 000○ Without products, 1 interest: 50 000○ With 5 products, 5 Interests: 5.000

3. RFC○ CUAN_CE_INTERACTIONS_POST (IC_UPDATE_MODE = ‚N‘):

○ Max. 100 000○ Recommended: Without products, 1 interest: 50 000○ Recommended: With 5 products, 5 Interests: 5.000

○ CUAN_CE_INTERACTIONS_POST (IC_UPDATE_MODE = ‚C‘,’D’,’F’):○ Max. 10 000○ Recommended 5 000

○ CUAN_CE_INTERACTIONS_POST _FLAT (IC_UPDATE_MODE = ‘N’,‚C‘,’D’,’F’):○ Max. 10 000 (memory restricted)○ Recommended 5 000

Products 20.000 (1 Language, no category assignment)

Product Categories 50.000 (1 Language)

Interests 50.000 (2 Languages)

How to Handle Errors Involving Interactions

Data Management Upload Interfaces 1702Best Practices and Troubleshooting C U S T O M E R 19

Page 20: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 6:

Error / Error Message What It Means What You Can Do

CUAN_INTERACTION 000 Invalid entry in column &2: '&1'

Either:

● Customizing is missing● Invalid characters have been used● The format is incorrect

Maintain Customizing

Correct invalid entries: for example Phone numbers have to start with ‘+’ or ‘00’.

Timestamp is incorrect Microsoft Excel formats the timestamp incorrectly when opening the file.

Format the value in Microsoft Excel as follows:

1. Change the type of the field to num­ber.

2. Remove all decimal places.3. Remove the separator.4. Enter a valid time

(YYYYMMDDhhmmss).5. Save

Special characters are not imported The data is not loaded in utf-8 encoding. Send data in utf-8 encoding. Use an edi­tor that supports this.

CSV upload error: No content provided; empty upload

Either:

● The selected entity does not match the file content. For example, the entity Contacts has been selected for upload but the file contains Products.

● The file is really empty.● There are hidden characters in the

first column of the spreadsheet.

Select the correct option and the correct file.

Unspecific message from CSV upload: Contact your system administrator

The error is probably from the virus scanner, which is not set up correctly.

Set up your system correctly.

Interactions cannot be locked, since locked by &1

Interactions or Contacts are locked by:

● Another load in parallel (same con­tact is locked in different sessions).

● A mass change is running on inter­actions.

● Reports (delivered or written by the customer) are not closed and are locking interactions and/or con­tacts.

Avoid loading interactions when con­tacts are being changed in parallel.

Close the report.

20 C U S T O M E RData Management Upload Interfaces 1702

Best Practices and Troubleshooting

Page 21: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Error / Error Message What It Means What You Can Do

Import failed Import failed because objects are locked by another process or because of other errors..

● In the event of lock errors, imports are automatically restarted again in the background until there are no more errors.

● In the event of other errors, imports are not automatically restarted. Since the import file is stored in a staging area for up to 30 days, the administrator can use transaction SE11 or SE16 to check the file and correct errors. The import can then be restarted manually using report CUAN_CE_IA_RESTART_IMPORT.

7.2 Optimizing Performance During OData Service Calls

This section describes how to call an OData service in SAP Hybris Marketing Cloud in a way that ensures a high degree of system security and performance. The description uses CUAN_IMPORT_SRV as an example, but the method applies to all OData services in SAP Hybris Marketing Cloud.

Importing Data into the SAP Hybris Marketing Cloud System

1. Request an x-CSRF token and a session cookie by calling the metadata document, for example, https://<mkt.com>/sap/opu/odata/sap/cuan_import_srv/$metadata.

2. In the get request header, you must add the parameter name x-csrf-token and the value Fetch, as shown in the code snippet. This get request returns the x-CSRF token and session cookie in the response:

3. Create the payload with the data you want to post.4. Post the data via the corresponding endpoint and send the x-CSRF token and the session cookie that you

received in step 1.In the post request:○ In the parameter x-csrf-token enter the value from the token you received in step 1.○ In the parameter Content-type, enter the value application/json.○ Add the session cookie you received from the get metadata request, for example https://<mkt.com>/

sap.opu.odata/sap/cuan_import_srv/ImportHeaders.5. You should terminate the session cookie by calling the logoff service. For example, https://

<mkt.com>/sap/public/bc/icf/logoff. By doing this, you ensure that the session cookie and the x-CSRF token are no longer valid. In this get request, you have to add:○ The parameter ‘x-csrf-token’ and the value you received in step 1.○ The session cookie you received from the get metadata request.

Important Points to Note

● The session cookie will automatically terminate after 30 minutes idle time.● You should reuse the session cookie and the x-CSRF token for as long as you can. In other words, you should

try to avoid exceeding 30 minutes idle time.

Data Management Upload Interfaces 1702Best Practices and Troubleshooting C U S T O M E R 21

Page 22: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

● By reusing the session cookie, you avoid having additional calls to generate a new cookie every time. This leads to improved performance because you have to execute the get call only once.

● By terminating the session cookie, you secure the system because the cookie and CSRF token can no longer be used.

Example

Code Syntax

************************************************************************** * Establish the connection* get request to fetch the CSRF Token and session cookie**************************************************************************lv_header_field-name = 'x-csrf-token'.lv_header_field-value = 'Fetch'.INSERT lv_header_field INTO TABLE lt_header_fields.TRY. IF ( lt_cookies IS INITIAL ). cl_cuan_http_helper=>s_get_instance( )->http_call( EXPORTING iv_destination = '<SM59_ENTRY>' iv_url = '/sap/opu/odata/sap/cuan_import_srv/$metadata' iv_method = 'GET' it_header_fields = lt_header_fields IMPORTING ev_status_code = lv_status_code ev_x_csrf_token = lv_x_csrf_token et_cookies = lt_cookies ) CLEAR lt_header_fields. lv_header_field-name = 'x-csrf-token'. lv_header_field-value = lv_x_csrf_token. INSERT lv_header_field INTO TABLE lt_header_fields. lv_header_field-name = 'Content-Type'. Lv_header_field-value = 'application/json'. INSERT lv_header_field INTO TABLE lt_header_fields. ENDIFCATCH cx_cuan_cpred_error INTO exc_cpred_error.* Error handlingENDTRY.

Code Syntax

*************************************************************************** * Create payload and * send it via post request to the SAP Hybris Marketing Cloud***************************************************************************WHILE lv_true = abap_true.* creating the payload with your data and store it in variable lv_body*...*... TRY. cl_cuan_http_helper=>s_get_instance( )->http_call( EXPORTING iv_destination = '<SM59_ENTRY>' iv_url = '/sap/opu/odata/sap/cuan_import_srv/ImportHeaders' iv_method = 'POST' iv_body_send = lv_body it_header_fields = lt_header_fields it_cookies = lt_cookies IMPORTING ev_body_receive = lv_body_receive

22 C U S T O M E RData Management Upload Interfaces 1702

Best Practices and Troubleshooting

Page 23: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

ev_status_code = lv_status_code ). CATCH cx_cuan_cpred_error INTO exc_cpred_error.* Error handling ENDTRY. IF ( lv_status_code = '403' ).* generate new CSRF-Token and session cookie and try again go to step 1*...*... ENDIF.ENDWHILE.

Code Syntax

************************************************************************* * Terminate the session cookie*************************************************************************TRY. cl_cuan_http_helper=>s_get_instance( )->http_call( EXPORTING iv_destination = 'E3W' iv_url = '/sap/public/bc/icf/logoff' iv_method = 'GET' iv_body_send_as_string = lv_basis it_header_fields = lt_header_fields it_cookies = lt_cookies IMPORTING ev_body_receive = lv_body_receive ev_status_code = lv_status_code ).CATCH cx_cuan_cpred_error INTO exc_cpred_error.* Error handlingENDTRY.

Data Management Upload Interfaces 1702Best Practices and Troubleshooting C U S T O M E R 23

Page 24: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

8 Import of Data Using CSV Upload

Import data in CSV file format

Use

With the Import Data application, you can upload data for the following objects in Comma Separated Value (CSV) file format:

Contacts and Profiles

● Corporate Accounts● Contacts● Account Team Members● Product Categories● Products● Interests● Interactions● Marketing Locations● Marketing Beacons● Subscriptions

Others

● Brands● Custom dimensions● Actual and committed spend● Survey Response● Campaign Success

NoteIf you upload data for more than one of these object types, you must observe the following upload sequence:

1. Product categories2. Products3. Interaction Contacts4. Interactions

Prerequisites

● Your copy of the following standard roles, gives key users authorization for key activities and administrative tasks, such as uploading data using a CSV file, as well as access to export definitions for target groups and campaigns:

● The composite role Key User Access (SAP_MARKETING_BUS_ADMIN_USER)

24 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using CSV Upload

Page 25: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

● The single role Business Administration (SAP_CEI_KUA)● Before you upload data for any given object type, read the important information about it in the section,

Special Points to Note About Specific Object Types of this document.● Each example file you download contains detailed instructions on how to add values to the spreadsheet for

each object type. Read the instructions carefully before uploading data.● Assign users responsible for uploading data using a CSV file to a copy of those roles. For more information

about roles, see the section Authorizations in the Security Guide for SAP Hybris Marketing on the SAP Help Portal at http://help.sap.com/mkt Security Information ).

Objects That Can Be Extended

The attributes allowed for each object type are defined in the structures listed in the table. You can display these structures in the system using transaction SE11. Within the structures, there are also a number of fields provided with unspecified names. Add custom fields, if the predelivered fields do not meet your requirements. You can add custom fields under Import Data, as described in the following section:

Table 7:

Object Type Structure Name

Corporate accounts (companies) CUAN_S_CE_COMP_EXT_FAFL

Contacts CUAN_S_CE_IC_EXT_FAFL

Account team members CUAN_S_CE_IC_TM_EXT

Products categories CUAN_T_PROD_CAT_EXT_FLAT

Products CUAN_S_PRODUCT_EXT_FLAT

Interactions CUAN_S_CE_IA_EXT_FLAT

Interests Fixed first row: INTEREST_ITEM and ISO language keys in any sequence

Survey Response CUAN_T_CE_IA_TAG_FLAT

Adding Values and Uploading CSV Files

To import data:

1. Go to Import Data .2. Select the object type for which you want to upload data and choose Download CSV Template.3. Read the detailed instructions for the object type at the top of the file and enter the required data.4. To ensure correct handling of special characters, store the CSV file in the UTF-8 code page.5. Back on the Import Data screen, browse for the file and choose Import.

Data Management Upload Interfaces 1702Import of Data Using CSV Upload C U S T O M E R 25

Page 26: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Special Points to Note About Specific Object Types

● Corporate Accounts (Companies):○ When corporate accounts are uploaded, the origin of the content is set to SAP_FILE_IMPORT by default.○ If you want to upload the origin of contact IDs, you add the column ID_ORIGIN to the structure. If there is

a value for ID_ORIGIN, the ID column must also have a value. If IDs are provided they must be unique and cannot be used more than once in the same CSV file.

○ The uploaded data is available in Corporate Accounts. You can view details for individual corporate accounts in the corresponding fact sheet.

○ The additional fields are available as an attribute in Segmentation, and on the Additional Data facet of the Corporate Account fact sheet.

● Contacts:○ When contacts are uploaded, the origin of the content is set to SAP_FILE_IMPORT by default.○ If you want to upload the origin of contact IDs, add the column ID_ORIGIN to the structure. If there is a

value for ID_ORIGIN, the ID column must also have a value. If IDs are provided they must be unique and cannot be used more than once in the same CSV file.

○ The uploaded data is available under Contacts and as a filter value under the Profile Dashboard.○ The additional fields are available in the Additional Data section, on the Personal Data facet, of the Contact

fact sheet, and as an attribute in Segmentation.○ Marketing Permissions for Contacts:

Marketing permissions are used to control whether or not communication with a contact is allowed, using a certain communication medium, for example, e-mail. Currently, e-mail is supported as the communication medium. It is used during an automated campaign. This marketing campaign is one with an automatic system reaction, such as a trigger to open an e-mail or click a link within an e-mail.Marketing permissions can be created or updated during the import of contacts. Marketing permissions are created by providing the e-mail address field (SMTP_ADDR or SMTP_ADDR_2), and the corresponding opt-in field (OPT_IN_SMTP_ADDR or OPT_IN_SMTP_ADDR_2).

● Account Team Members○ Ensure that you have carried out the Customizing activity Define Team Member Roles and that each role

is assigned only once per interaction contact.○ Ensure that the ID_ORIGIN you want to use is not set to shareablein the Customizing activity Define

Origins of Contact ID.

○ CautionUpdate mode is full: The account team member data you upload always overwrites any existing data in the system. If you want to keep the existing assignments in the system, add these assignments to the spreadsheet to ensure that they are part of the new upload. If you don't add them, they will be overwritten by the new upload.

● Product Categories and Products:○ If you want to segment consumers who have bought a certain product or products from a certain

category, for example, you can use the uploaded data, including additional fields, for segmentation purposes in Segmentation.

○ Semantic Key: The semantic key for products determines the uniqueness of a product record. The following fields are mandatory for product data:○ PRODUCT_ORIGIN: Origin of the product data○ PRODUCT_ID: ID of the product data

26 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using CSV Upload

Page 27: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

○ For the product category: Provide the ID and the hierarchy ID in the CSV file.○ If the product category relates to more than one language, create several rows for the same product

category. Generate a separate line for each language, which is identical except for the language.● Interactions:

○ Provide the origin and the ID in the CSV file.○ Semantic Key: The semantic key for interactions determines the uniqueness of an interaction record.

The following fields are mandatory:

Table 8:

Semantic Key What It Means

ID_ORIGIN Origin of the interaction contact data

ID External ID of the interaction contact data

IA_TYPE Interaction type

COMM_MEDIUM Communication medium

TIMESTAMP UTC timestamp in long form (YYYYMMDDhhmmssmm­muuun)

RecommendationTimestamp entries are sometimes incorrectly con­verted to decimal numbers. To prevent incorrect con­verting, deactivate decimal notation and 1000 sepa­rating commas in the cell formatting settings.

NoteThe following additional semantic key fields are not checked during import. They can have values or re­main empty.

--

SOURCE_OBJECT_TYPE Object type of the source object, for example, an oppor­tunity in SAP Hybris Cloud for Customer.

SOURCE_OBJECT_ID Object ID of the source object, for example, the GUID of the SAP Hybris Cloud for Customer opportunity, or the original post ID of the relevant social media network (such as TW or FB).

Data Management Upload Interfaces 1702Import of Data Using CSV Upload C U S T O M E R 27

Page 28: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

○ By filling the field IC_UPDATE_MODE you can control how the contact data is updated. The following update modes are available for the field IC_UPDATE_MODE:

Table 9:

Update Code Type of Update What Is Updated

N No Update Only the Contact ID is determined. If no contact is found, an error is triggered

F Full Update All existing fields are overwritten by imported fields. If empty fields are imported, these imported fields overwrite the corresponding fields with values of the facet.

D Delta All imported fields that have values, overwrite existing fields of the same facet of the contact. If the contact doesn't already exist, it is created.

○ If you want to enter multiple interests for one interaction, create several rows for the same interaction due to the flat structure. In this case, only the interest differs, all other columns remain the same.

○ The uploaded data is available in the Interactions facets of the fact sheets for corporate accounts and contacts.

○ In addition, you can use the uploaded data including the additional fields for segmentation purposes under Segmentation, such as segmenting consumers who have abandoned their shopping carts in your Web shop.

● Marketing Locations○ The values for LOC_ORIGIN and TYPE must exist in the system before you can import your data.○ Semantic Key: The semantic key for marketing locations determines the uniqueness of a marketing

location record. The LOC_ID and LOC_ORIGIN are marketing location's semantic key:○ The following fields are mandatory for marketing locations:

○ LOC_ID: Location ID○ LOC_ORIGIN: Origin of Location ID○ TYPE: Location Type○ MKT_AREA_ID : Marketing Area ID

○ If a combination of LOC_ID and LOC_ORIGIN doesn’t exist in the system, the marketing location is created.

○ If a combination of LOC_ID and LOC_ORIGIN exists in the system, the marketing location is updated.○ The following fields have system default values:

○ VALID_FROM_DATE. If initial, 0000-00-00 is used○ VALID_TO_DATE. If initial, 9999-12-31 is used

● Marketing Beacons○ The following fields are mandatory for marketing beacons:

○ TYPE: Defaults to iBeacon. Currently iBeacon is the only supported beacon protocol.○ ID: The unique external ID of the beacon.○ DESCRIPTION: Description of the beacon. Used to assist in searching for a beacon.○ UUID: Beacon UUID. Mandatory if TYPE= iBeacon.○ MAJOR: Beacon major number. Mandatory if TYPE= iBeacon.○ MINOR: Beacon minor number. Mandatory if TYPE= iBeacon.

○ If a combination of TYPE, ID, UUID, MAJOR, MINOR exists in the system, the marketing beacon is updated.

28 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using CSV Upload

Page 29: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

● Survey Response:○ Provide the ID origin and the ID or the Outbound ID in the CSV file.○ After downloading survey responses from the third party survey tool SurveyMonkey, transform the data

in the required format in the Template_Survey_Response.csv file, using Microsoft Excel macro or Apple Mac Macro.

○ Semantic Key: The semantic key for interactions determines the uniqueness of an interaction record.The following fields are mandatory:

Table 10:

Semantic Key What It Means

ID_ORIGIN Origin of the interaction contact data

ID External ID of the interaction contact data

Outbound ID Unique identification of interaction that is generated when a campaign is triggered

IA_TYPE Interaction type

COMM_MEDIUM Communication medium

TIMESTAMP UTC timestamp in long form (YYYYMMDDhhmmssmm­muuun)

RecommendationTimestamp entries are sometimes incorrectly con­verted to decimal numbers. To prevent this incorrect conversion, deactivate decimal notation and 1000 separating commas in the cell formatting settings.

SURVEY_NAME Name of the survey

SURVEY_URL URL of the survey

ANSWER Answer of each survey question provided by the interac­tion contact. The format is “question: [answer]”.

NoteThe maximum length allowed for an answer is 200 characters.

● Interests○ The first column INTEREST_ITEM is fixed. If needed, you can add language columns in any order, using

the required ISO language codes.○ There must be at least one description for an interest.

● Campaign Success

Data Management Upload Interfaces 1702Import of Data Using CSV Upload C U S T O M E R 29

Page 30: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

○ Choose the campaign category for which you want to upload data. The CSV template is generated dynamically based on your selection. Each campaign category is associated to a process type, which determines the campaign type. You can upload campaign success data for campaign categories associated to the following process types:○ Externally-Executed Campaigns○ Facebook Campaigns○ Paid Search Campaigns

○ Externally-Executed, Facebook, and Paid Search Campaigns○ For externally-executed, Facebook, and Paid Search campaigns, if the value for EXT_CAMPAIGN_ID

already exists in the system, the data is automatically assigned to the campaign with this ID. If the EXT_CAMPAIGN_ID does not exist in the system, an unassigned data set is created and you can assign it to a campaign later. This is the campaign ID that was generated in an external system, in Facebook, or in Google AdWords when the campaign was created, or the externally-generated or Facebook campaign ID that you manually assigned to your campaign in the system. This is not the campaign ID generated when you create a campaign in SAP Hybris Marketing.

○ When data is uploaded for an existing EXT_CAMPAIGN_ID and REPORTING_DATE, the previous data is overwritten with the latest KPIs for that campaign.

For more information, see Assigning Success Data to Externally Executed, Facebook, and Paid Search Campaigns.

● BrandsFor each row of the input file, the following applies:○ If a brand ID does not exist in the system, the brand is created.○ If a brand description does not exist for a brand ID in the corresponding language, the brand description is

created. Otherwise, the brand description is updated with the value from the file.○ If there is invalid data in the local file, no brand data is saved.

● Custom DimensionsFor the upload of values for a custom dimension, the following applies (custom dimensions must be defined in Customizing for SAP Hybris Marketing under Planning Budget Plans Define Custom Dimensions ): :○ The file must contain the name of the custom dimension for which values are uploaded. You can only

upload values for one custom dimension for a specific file.For example, the custom dimension with ID LOB has been defined, where LOB represents Line of Business. The upload file for values for LOB custom dimension must be as follows:* LOBID,LANGUAGE,DESCRIPTIONINSURE,E,InsuranceINVEST,E,InvestmentsCONSULT,E,Consulting

● Actual and Committed SpendFor the upload of actual and committed spend, the following fields are available:○ SOURCE ID

The source ID is optional and contains 30 characters. The source ID indicates the source of the spend information, for example, it can indicate the agency from which the spend originates.

○ CAMPAIGN IDThe campaign ID is mandatory and contains 10 characters. Campaigns have been created in the Campaigns application, or in the Detailed Campaign Spend application.

○ SPEND TYPE

30 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using CSV Upload

Page 31: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Spend types are optional and have been defined in Customizing for SAP Hybris Marketing under Planning Spend Management Define Spend Types .

○ SPEND ITEM IDThe spend item ID is optional and contains 10 numeric characters. If specified, the spend item ID must exist in the campaign and the spend type must match. If no spend type is specified, the spend type is derived from the spend item of the campaign

○ REFERENCE DATEThe date is mandatory and is used for currency conversion. The reference date must be a valid date in the following format YYYYMMDD.

○ ACTUAL SPEND AMOUNTThe actual spend amount is mandatory and zero values are allowed. The actual spend amount represents the actual costs that have been incurred from marketing activities.

○ COMMITTED SPEND AMOUNTThe committed spend amount is mandatory and zero values are allowed. The committed spend amount represents the amount of already known spend based on existing requests and orders for an item, for example, from a purchasing system.

○ CURRENCYCurrency is mandatory and is the code for the spend amount.

For the upload of actual and committed spend, the following rules apply:○ If the values for a combination of source ID, campaign ID, spend type, spend item ID, and reference date

are being uploaded for the first time, the corresponding values for this combination (amounts and currency) from the local file are uploaded. If they are being uploaded a subsequent time, the corresponding values for this combination are updated with the values from the new local file.

○ Use a period (.) to separate decimals in amounts.○ If a field is optional and you do not want to include a value for it in the file, insert a comma (,) in place of

the excluded value.○ Actual and committed spend can be uploaded at any level. You are responsible for uploading data at the

level that is relevant for your campaign and your business processes. For example, you can upload data at the following levels:○ Campaign level○ Campaign and spend level○ Campaign and spend item level

If there is invalid data in the local file, no actual and committed spend amounts are uploaded and saved.The following is an example of the content of an input file:SOURCE ID,CAMPAIGN ID TYPE,SPEND ITEM ID,REFERENCE DATE,ACTUAL SPEND AMOUNT,COMMITTED SPEND AMOUNT,CURRENCY AGENCYA,11111,PRINT,,20160228,9999.99,1111.11,EUR,22222,,1,20160315,8888.88,2222.22,EUR,22222,TV,2,20160322,7777.77,5555.55,EUR,33333,,,20160331,4444.44,3333.33,EUR

● Subscriptions○ Provide the ID and the ID Origin of the Contact in the CSV file.○ Semantic Key: The semantic key for interactions determines the uniqueness of an interaction record.

Data Management Upload Interfaces 1702Import of Data Using CSV Upload C U S T O M E R 31

Page 32: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

The following fields are mandatory:

Table 11:

Semantic Key What It Means

ID_ORIGIN Origin of the interaction contact data

ID External ID of the interaction contact data

MKT_PERM_COMM_MEDIUM Outbound Communication Medium for which marketing per­mission has been given

COMM_MEDIUM Communication medium

Table 12: Other Fields

Semantic Key What It Means

TIMESTAMP This field is optional. If nothing is entered, the interaction is given the current timestamp.

COMM_CAT_ID Communication Category ID for which the subscription is set. If nothing is entered, a general Marketing Permission for the specified ID / ID Origin and Communication Medium is set.

OPT_IN This field is mandatory. Y must be entered for an opt-in, N for an opt-out.

Checks During Upload

During the upload, the system performs the format checks and conversions listed here.

The content validation stops with the first error. The system only saves and uploads the content if no errors occur.

● Date valuesThe 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.

● E-mail values are allowed in the following format: {name}@{domain}

Additional Upload Interfaces

In addition to this manual upload option, you can also import mass data into your system using one of the following upload interfaces:

● OData service● Remote function call (RFC)

32 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using CSV Upload

Page 33: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

● Web service

Note● For detailed information about the other upload interfaces and about importing the master data entities

interaction contacts, interactions, corporate accounts (companies), interests, product categories, and products using OData service CUAN_IMPORT_SRV, see the Data Management Upload Interfaces Guide for the current release at http://help.sap.com/mkt.

● For more information about importing offers using OData, see the Extensibility Guide at http://help.sap.com/mkt

● The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV is used for standard SAP Hybris Marketing integration with SAP Hybris Cloud for Customer. It is used in marketing-driven, and sales-driven processes. For information about replicating SAP Hybris Cloud for Customer business documents to SAP Hybris Marketing interactions using the OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV, see the Importing Business Documents guide at http://help.sap.com/mkt.

Data Management Upload Interfaces 1702Import of Data Using CSV Upload C U S T O M E R 33

Page 34: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

9 Import of Data Using OData Service CUAN_IMPORT_SRV

You can import interaction contacts, interactions, corporate accounts (companies), interests, product categories, and products into SAP Hybris Marketing using OData service CUAN_IMPORT_SRV. We recommend that you do not use batch processing ($batch) because error handling is more complex. A batch request can return an OK code and still have errors that have to be looked up in the response body. You can still send multiple entities in one POST request without using batch processing. See chapter 9.2 Importing Interaction Contacts Using OData Service for an example of how to do this for interactions contacts. The same procedure also applies to all other entities you import with this service.

NoteNote about importing business documents: The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to create SAP Hybris Marketing interactions from business documents from any source system. In contrast to OData service CUAN_IMPORT, CUAN_BUSINESS_DOCUMENT_IMP_SRV (Business Documents) enables you to change interactions. Each business document is represented by an interaction, and is identified by the key of the business document in the external system. The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV is used for standard integration of SAP Hybris Marketing with SAP Hybris Cloud for Customer. It is also used in marketing-driven and sales-driven processes. For information about using the OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV see https://help.sap.com/http.svc/rc/2f2c6c46ef044da7a62c01ba617d68b4/1702%20YMKT/en-US/InterfaceDocuBusinessDocumentImport_1702.pdf.

Prerequisites

●● The SICF node for the external service name CUAN_IMPORT_SRV (mass data import for SAP Hybris

Marketing) has been maintained in the SAP Hybris Marketing gateway system (which is either the SAP Hybris Marketing back-end system or a remote gateway system, depending on your setup). You can check in transaction SICF if the service is available (usually, the service is implemented during the standard installation process of SAP Hybris Marketing).

Authorization

Users who want to consume the CUAN_IMPORT_SRV OData service, must have the following authorizations:

● OData-Service CUAN_IMPORT_SRV● Action authorizations for import; Authorization Object HPA_ACTION

34 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 35: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

● Authorization to call the external service (role SAP_CEI_ECOMMERCE_INTEGRATION in transaction PFCG – this role contains all required authorizations. You can copy and adapt this role according to your requirements.For more information, see section Authorizations in the security guide for SAP Hybris Marketing under http://help.sap.com/mkt Security Information .

- HPA_ACTION HPA_OBJ ACTVT

Interactions IMPORT_EXTERNAL_INTERACTIONS

CUAN_INTERACTION 16

Team Member IMPORT_IC_TEAM_MEMBER CUAN_INTERACTION_CONTACT

16

Contacts/Companies IMPORT_INTERACTION_CONTACTS

CUAN_INTERACTION_CONTACT

16

Interests IMPORT_INTERESTS CUAN_INTEREST 16

Products IMPORT_PRODUCTS CUAN_PRODUCT 16

Product Categories IMPORT_PROD_CAT_HIERS CUAN_PROD_CATEGORY_HIERARCHY

16

Mass Import

The OData protocol allows the import or update of one object record (contact, interaction, company, product, or product category) only. To achieve the mass create and mass update of records, a dummy entity (import header) is created by deep insert. You perform an insert on the entity Import Header and create interaction contacts, interactions, companies, products, or product categories as subnodes of the import header. The metadata of the service is read by means of the OData call:

● Request URI: https://<server&port>/sap/opu/odata/sap/CUAN_IMPORT_SRV/$metadata ● HTTP Method: Get

Additional Fields

If you have created additional, custom fields for your structures, you can view the naming conventions for these fields in the OData Service using the Request URI listed above.

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 35

Page 36: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

9.1 Structure of OData Service CUAN_IMPORT_SRV

The CUAN_IMPORT_SRV OData service consists of the following entity sets and entity types:

Table 13:

Entity Set Entity Type Entity Type Description

AccountTeamMembers AccountTeam Account Team Member

Companies Company Company

Contacts Contact Interaction Contact

ContactFacets ContactFacet Additional facets

ContactMarketingAttributes ContactMarketingAttributes Marketing attributes

ContactMarketingPermissions ContactMarketingPermission Marketing permissions

ImportHeaders ImportHeader Technical Import Message Header

Interactions Interaction OData Import Interaction

InteractionAdditionalObjectReferences

InteractionAdditionalObjectReference

Additional object references of an inter­action

InteractionDigitalAssetSets InteractionDigitalAsset Digital Assets belonging to an interaction

InteractionInterests InteractionInterest Item of interest belonging to an interac­tion

InteractionOffers InteractionOffer Offers belonging to an interaction

InteractionTags InteractionTag Tags belonging to an interaction

Products Product OData Import Product

InteractionProducts InteractionProduct Product belonging to an interaction

ProductCategories ProductCategory OData Import Product Category

Interests Interest OData Import Interest

Entity Type "ImportHeader"

The entity type ImportHeader describes the technical header of an import of interaction contacts. The properties Id, Timestamp, and UserName are used for logging the external data request. For every service request a new, unique ID is required. If no ID is provided, it is defaulted internally.

36 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 37: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

The SourceSystemId property allows you to distinguish between different source systems. The value is later on used as prefix to create unique external contact IDs stored as a facet while a facet is a reference to an external system (as one and the same interaction contact can have different IDs in different systems such as ERP, Twitter, or Facebook). The SourceSystemId is a mandatory attribute. Id, Timestamp, and UserName of the back-end user are defaulted when no values are given.

ImportHeader Meta Information

Table 14:

Property Description Edm Core Type Max Length

Mandatory Key

Id Unique technical identifier of import run. If this is not pro­vided, it is defaulted internally.

If you provide the same ID twice, it will lead to an error code 500.

Edm.String 0 X

Timestamp Timestamp of the import run in the format: number of milli­seconds since midnight Jan 1, 1970. For example: "/Date(1406014140922)/"

Edm.DateTime 0

UserName User name Edm.String 0

SourceSystemType Type of source system EDM.string 3

SourceSystemId Identifier of source system Edm.String 20 X

ForceSynchronousProcessing

If this flag is set, you can firce imports to be processed syn­chronously regardless of the size of the upload file.

Edm.Boolean

Entity Type "Account Team Member"

The entity type AccountTeamMembercontains all attributes that are required to assign team members to interaction contacts (company or person). Interaction contacts are identified by the information filled in the attributes InteractionContactId and InteractionContactIdOrigin. The UserId is the identifier of a user in the system that shall be assigned as team member to the interaction contact. The role is the business role in which the team member acts for this interaction contact.

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 37

Page 38: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 15:

Property Description Edm Core Type Max Length Key

InteractionContactId

Identifier of an interac­tion contact facet

Edm.String 100 X

InteractionContactIdOrigin

Origin of Interaction Contact ID

Edm.String 20 X

UserId User ID of team mem­ber

Edm.String 12 X

Role Role Edm.String 4 X

Entity Type "Company"

The entity type Company contains all attributes that are required to create a company (corporate account) with its main facets. If the ID of the company is provided by the external source system, the system can identify the company for later updates. The IdOrigin property must exist in the system either as a value delivered by SAP and implemented during the standard installation process of SAP Hybris Marketing or as a value configured by the customer in Customizing for SAP Hybris Marketing (transaction SPRO) under Contacts and ProfilesInteraction Contacts Define Origins of Contact ID .

If no IdOrigin is provided, the system sets a technical ID Origin (SAP_ODATA_IMPORT) and concatenates the provided ID with the provided source system ID (which is derived from the property SourceSystemId of the ImportHeader. However it is not recommended to provide no ID Origin since you lose the information about the source of the data. Therefore, you should always provide an ID Origin, which describes the origin of the data and which must be unique per connected source system.

ExampleEMailAddress Property:

A company can write e-mails to a company. The EMailAddress property is the ID of this company used in this communication channel. The EMailAddress is only one facet of this company. The company may use other facets (such as Facebook, Google+, or Twitter) in other communication channels.

If the ID of the company is not provided by the external source system, it will be generated in the back-end system. In this case, an update of a company is not possible. The result ID of the update will be stored in attribute SAP_ODATA_IMPORT of the facet ID_ORIGIN, whether the ID of the company has been provided or not.

Company Meta Information

38 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 39: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 16:

Property Description Edm Core Type Max Length Key

Id Identifier provided by external system

Edm.String 100 X

IdOrigin Origin or source of ID Edm.String 20 X

Timestamp Timestamp

Format: number of mil­liseconds since mid­night Jan 1, 1970. For example: "/Date(1406014140922)/"

Edm.DateTime 0

City City as part of postal address

Edm.String 40

CountryDescription Name of country Edm.String 40

EMailAddress E-mail address Edm.String 241

EMailOptIn Opt-in for e-mail ad­dress

Edm.String 1

FacebookId Identifier for Facebook Edm.String 255

FacebookOptIn Opt-in for Facebook Edm.String 1

FaxNumber Fax number

Format: +country code region code + fax num­ber e.g. +49 6227 123456

Edm.String 30

FaxOptIn Opt-in for fax number Edm.String 1

GooglePlusId Identifier for Google + Edm.String 255

GooglePlusOptIn Opt-in for Google + Edm.String 1

HouseNumber House number as part of postal address

Edm.String 10

ImageURI Uniform Resource Identifier of image

Edm.String 1000

LanguageDescription

Name of communica­tion language

Edm.String 40

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 39

Page 40: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Key

Latitude Geographical coordi­nate

Edm.Decimal 0

Longitude Geographical coordi­nate

Edm.Decimal 0

MobilePhoneNumber Phone number for mo­bile

Format: +country code region code + phone number e.g. +49151123456

Edm.String 30

MobilePhoneOptIn Opt-in for mobile con­tact

Edm.String 1

MobileSMSOptIn Opt-in for mobile SMS Edm.String 1

Name Name of company Edm.String 80

Obsolete Contact is obsolete Edm.Boolean 0

PhoneNumber Phone number for mo­bile

Format: +country code region code + phone number e.g. +49151123456

Edm.String 30

PhoneOptIn Opt-in for mobile con­tact

Edm.String 1

PostalCode Postal code as part of postal address

Edm.String 10

RegionDescription Name of region Edm.String 40

SAPCRMBusinessPartnerId

SAP CRM Business Partner identifier

Edm.String 10

SAPCRMMarketingProspectId

SAP CRM Marketing Prospect identifier

Edm.String 10

Street Street as part of postal address

Edm.String 60

TwitterId Identifier for Twitter Edm.String 255

40 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 41: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Key

TwitterOptIn Opt-in for Twitter Edm.String 1

WebSite Web site Edm.String 1,000

Entity Type "Contact"

The entity type Contact contains all attributes that are required to create an interaction contact with its main facets.

If the ID of the contact is provided by the external source system, the system can identify the contact for later updates. The IdOrigin property must exist in the system either as a value delivered by SAP and implemented during the standard installation process of SAP Hybris Marketing, or as a value configured by the customer in Customizing for SAP Hybris Marketing (transaction SPRO) under Contacts and Profiles Interaction ContactsDefine Origins of Contact ID .

If no IdOrigin is provided, the system sets a technical ID Origin (SAP_ODATA_IMPORT) and concatenates the provided ID with the provided source system ID (which is derived from the property SourceSystemId of the ImportHeader. However it is not recommended to provide no ID Origin since you lose the information about the source of the data. Therefore, you should always provide an ID Origin, which describes the origin of the data and which must be unique per connected source system.

Some of the Contact properties are identifiers for facets under which a contact is known in the outside world.

ExampleEMailAddress Property:

A contact can write mails to a company. The EMailAddress property is the ID of this contact used in this communication channel. The EMailAddress is only one facet of this contact: The contact may use other facets (such as Facebook, Google+, or Twitter) in other communication channels.

If the ID of the contact is not 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.

The result ID of the update will be stored in attribute SAP_ODATA_IMPORT of the facet ID_ORIGIN, if the ID of the contact has been provided or not.

A contact can be classified to be used in different processes. As contact (property: IsContact = true) for persons acting as contact for an account (B2B) and as a consumer (property: IsConsumer = true) that acts as an account (B2C). A person can be both a contact and a consumer at the same time.

Contact Meta Information

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 41

Page 42: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 17:

Property Description Edm Core Type Max Length Key

Id Identifier provided by external sys­tem

Edm.String 100 X

IdOrigin Origin or source of ID Edm.String 20 X

Timestamp Timestamp

Format: number of milliseconds since midnight Jan 1, 1970. For ex­ample: "/Date(1406014140922)/"

Edm.DateTime 0

City City as part of postal address Edm.String 40

CompanyId Id of a company for which a person acts as contact

Edm.String 100

CompanyIdOrigin Origin or source of company ID Edm.String 20

CountryDescription Name of country Edm.String 40

CustomerName Name of customer for which a per­son acts as contact

Edm.String 40

DepartmentDescription

Name of department type (classi­fication as contact)

Edm.String 40

EMailAddress 1st e-mail address Edm.String 241

EMailOptIn Opt-in for e-mail contact for 1st e-mail address

Edm.String 1

EMailAddress2 2nd e-mail address Edm.String 241

EMail2OptIn Opt-in for e-mail contact for 2nd e-mail address

Edm.String 1

EMailAddress3 3rd e-mail address Edm.String 241

EMail3OptIn Opt-In for e-mail contact for 3rd eMail address

Edm.String 1

FacebookId Identifier for Facebook Edm.String 255

FacebookOptIn Opt-in for Facebook Edm.String 1

FaxNumber Fax number

Format: +country code region code + fax number e.g. +49 6227 123456

Edm.String 30

42 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 43: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Key

FaxOptIn Opt-in for fax number Edm.String 1

FirstName First name Edm.String 40

FullName Full name Edm.String 80

FunctionDescription Name of job function (classifica­tion as contact)

Edm.String 40

GenderDescription Gender description Edm.String 40

GooglePlusId Identifier for Google + Edm.String 255

GooglePlusOptIn Opt-in for Google plus Edm.String 1

HouseNumber House number as part of postal address

Edm.String 10

ImageURI Uniform Resource Identifier of image

Edm.String 1000

IndustryDescription Name of industry (classification as contact)

Edm.String 40

IsConsumer Indicates whether person is a con­sumer

Edm.Boolean 0

IsContact Indicates whether person acts as contact for an account

Edm.Boolean 0

LanguageDescription Name of communication language Edm.String 40

LastName Last name Edm.String 40

Latitude Geographical coordinate Edm.Decimal

Longitude Geographical coordinate Edm.Decimal

MaritalStatusDescription

Marital status description Edm.String 20

MobilePhoneNumber Phone number for mobile

Format: +country code region code + phone number e.g. +49151123456

Edm.String 30

MobilePhoneOptin Opt-in for mobile contact Edm.String 1

MobileSMSOptin Opt-in for mobile SMS Edm.String 1

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 43

Page 44: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Key

Obsolete Contact is obsolete Edm.Boolean 0

PhoneNumber Phone number

Format: +country code region code + phone number e.g. +49151123456

Edm.String 30

PhoneOptin Opt-in for phone contact Edm.String 1

PostalCode Postal code as part of postal ad­dress

Edm.String 10

PostalOptin Opt-in for postal contact Edm.String 1

RegionDescription Name of region Edm.String 40

SAPCRMBusinessPartnerId

SAP CRM Business Partner identi­fier (classification as contact)

Edm.String 10

SAPCRMMarketingProspectId

SAP CRM Marketing Prospect identifier

Edm.String 10

SAPERPAccountId SAP ERP Account identifier (clas­sification as contact)

Edm.String 10

SAPERPConsumerAccountId

SAP ERP Consumer account iden­tifier (classification as consumer)

Edm.String 10

SAPERPContactId SAP ERP Contact identifier (classi­fication as contact)

Edm.String 10

SAPHybrisConsumerAccountId

SAP Hybris Consumer account identifier (classification as con­sumer)

Edm.String 100

Street Street as part of postal address Edm.String 60

TitleDescription Title description Edm.String 40

TwitterId Identifier for Twitter Edm.String 255

TwitterOptIn Opt-in for Twitter Edm.String 1

Entity Type "ContactFacet"

If additional facets are needed, you must use the entity set ContactFacets based on the entity type ContactFacet. For every additional facet one instance of the ContactFacet entity type must be provided.

44 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 45: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

ContactFacet Meta Information

Table 18:

Property Description Edm Core Type Max Length Key

Id Facet Identifier Edm.String 255 X

IdOrigin Origin of facet identifier (values de­fined in Customizing view CUANV_CE_ORIGIN)

Edm.String 20 X

Timestamp (Creation) Timestamp of facet

Format: number of milliseconds since midnight Jan 1, 1970. For ex­ample: "/Date(1406014140922)/"

Edm.DateTime 0

OptIn Opt-in for contact facet Edm.String 1

If the ID of the contact is provided by the external source system, the system can identify the contact for later updates. The IdOrigin property must exist in the system either as a value delivered by SAP and implemented during the standard installation process of SAP Hybris Marketing, or as a value configured by the customer in Customizing for SAP Hybris Marketing (transaction SPRO) under Contacts and Profiles Interaction ContactsDefine Origins of Contact ID .

Entity Type "ContactLocation"

If contacts should be assigned to a marketing location, you must use the entity set ContactLocations based on the entity type ContactLocation.

Table 19: ContactLocation Meta Information

Property Description Edm Core Type Max Length Key

LocationIdOrigin Origin of a location identifier (values de­fined in Customizing view CUANV_LOC_ORI)

Edm.String 30 X

LocationId Identifier of a location Edm.String 50 X

The LocationIdOrigin can be configured by the customer in Customizing for SAP Hybris Marketing (transaction SPRO) under Contacts and Profiles Marketing Locations Define Origins of Marketing Location ID .

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 45

Page 46: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Entity Type "ContactMarketingAttribute

If marketing attributes are needed, you must use the entity set ContactMarketingAttributes based on the entity type ContactMarketingAttribute. For every marketing attribute, one instance of the ContactMarketingAttribute entity type must be provided.

Table 20: ContactMarketingAttribute Meta Information

Property Description Edm Core Type Max Length Key

CategoryId External identifier for marketing category

Edm.String 75 X

CategoryDescription

Description of market­ing category

Edm.String 40 X

LanguageDescription

Language in which cat­egory description is provided

Edm.String 16 -

Value Value of marketing at­tribute

Edm.String 255 X

Either CategoryId or CategoryDescription can be used to identify a marketing category. CategoryDescriptions are language dependent. LanguageDescription can be used to set the language of a CategoryDescription. Language belonging to LanguageDescription must exist in the system otherwise language of communication user will be used. The value is language independent.

Entity Type "ContactMarketingPermission"

If additional marketing permissions are needed, you must use the entity set ContactMarketingPermissions based on the entity type ContactMarketingPermission. For every additional marketing permission, one instance of the ContactMarketingPermission entity type must be provided.

Table 21: ContactMarketingPermission Meta Information

Property Description Edm Core Type Max Length Key

Id Facet Identifier Edm.String 255 X

IdOrigin Origin of facet identifier (values de­fined in Customizing view CUANV_CE_ORIGIN)

Edm.String 20 X

Timestamp (Creation) Timestamp of facet

Format: number of milliseconds since midnight Jan 1, 1970. For ex­ample: "/Date(1406014140922)/"

Edm.DateTime 0 -

46 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 47: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Key

OptIn Consent Edm.String 1 -

OutboundCommunicationMedium

Communication to which the con­sent is given

Edm.String 20 X

CommunicationDirection

Whether the direction of permis­sion is inbound (I) or outbound (O)

Edm.String 1 X

CommunicationCategoryId

Id of a Communication Category available in the system (e.g. news­letter)

Edm.String 10 -

If the ID of the contact is provided by the external source system, the system can identify the contact for later updates. The IdOrigin property must exist in the system either as a value delivered by SAP and implemented during the standard installation process of SAP Hybris Marketing, or as a value configured by the customer in Customizing for SAP Hybris Marketing (transaction SPRO) under Contacts and Profiles Interaction ContactsDefine Origins of Contact ID .

The OutboundCommunicationMedium property must exist in the system either as delivered value by SAP, implemented during the standard installation process of SAP Hybris Marketing, or as a value configured by the customer in Customizing of SAP Hybris Marketing (transaction SPRO) under Contacts and ProfilesInteractions Define Communication Media .

The CommunicationDirection property is not a required field. If you enter nothing, the default is O for outbound.

The CommunicationCategoryId must available in the system. The CommunicationCategoryId could represent, for example, a newsletter for which permission is given or withdrawn.

Associations for Interaction Contacts

You have the option to create several interaction contacts with several additional facets by using one OData request.

The relations are as follows:

Table 22:

Associations Principal Entity Cardinality of Princi­pal Entity

Dependent Entity Cardinality of Depend­ent Entity

CompanyContactFacets

Company One ContactFacet Many

CompanyContactMarketingAttribute

Company One ContactMarketingAttribute

Many

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 47

Page 48: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Associations Principal Entity Cardinality of Princi­pal Entity

Dependent Entity Cardinality of Depend­ent Entity

CompanyContactMarketingPermissions

Company One ContactMarketingPermission

Many

ContactContactFacets

Contact One ContactFacet Many

ContactContactMarketingAttributes

Contact One ContactMarketingAttribute

Many

ContactContactMarketingPermissions

Contact One ContactMarketingPermission

Many

HeaderContact ImportHeader One Contact Many

HeaderInteraction ImportHeader One Interaction Many

InteractionInteractionInterests

Interaction One InteractionInterest

Many

InteractionInteractionProducts

Interaction One InteractionProduct Many

Entity Type "Interaction"

Entity type Interaction contains all attributes needed to create interactions with their interests and related products.

Interaction Meta Information

Table 23:

Property Description Edm Core Type Max Length Mandatory Key

Key Identifier (GUID) of interaction in this import. Defaulted inter­nally!

Edm.String 32 X

CampaignId CRM Campaign ID Edm.String 24

CommunicationMedium

Communication Medium Edm.String 20 X

ContactId External ID of Interaction Con­tact Data

Edm.String 255

48 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 49: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Mandatory Key

ContactIdOrigin Origin of Interaction Contact Data

Edm.String 20 X

ContentData Interaction Content Data Edm.String

ContentTitle Interaction Content Title Edm.String 255

Device Device Edm.String 80

DigitalAccountId Digital Account ID Edm.String 40

DigitalAccountType

Digital Account Type Edm.String 10

InitiativeId Campaign ID Edm.String 10

InitiativeVersion Edition (Version) Edm.Int32 10

InteractionType Interaction Type Edm.String 20 X

IsAnonymous Indicates whether interaction is anonymous

Edm.Boolean n/a

Latitude Latitude of a geographical lo­cation

Edm.Decimal n/a

Longitude Longitude of a geographical lo­cation

Edm.Decimal n/a

SpatialReferenceIdentifier

Spatial Reference Identifier Edm.String 10

MarketingLocationOrigin

Origin of Marketing Location Edm.String 30

MarketingLocationId

Location ID Edm.String 50

MarketingOrchestrationId

Campaign Content Identifier Edm.Int32 10

MarketingPermissionCommunicationMedium

Communication medium for which permission has been given

Edm.String 20

MarketingPermissionDirection

Direction of the communica­tion medium for which permis­sion has been given

Edm.String 1

Quantifier Interaction Quantifier Edm.Int16 5

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 49

Page 50: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Mandatory Key

Reason Reason for a certain interac­tion

Example: Interaction Type EMAIL_BOUNCE_SOFT; nterac­tion Reason: MAILBOX_FULL

Edm.String 40

SourceDataUrl URL of Source Data Edm.String

SourceObjectId Interaction source object ID Edm.String 50

SourceObjectType Interaction Source Object type Edm.String 30

SourceObjectAdditionalId

The external object ID of the source object

Edm.String 50

SourceSystemId Interaction Source System ID Edm.String 255

SourceSystemType Interaction Source System Type

Edm.String 20

StartingPointUrl URL of Starting Point Edm.String

StartingPointText Text displayed at starting point Edm.String 255

Timestamp UTC Timestamp

Format: number of millisec­onds since midnight Jan 1, 1970. For example: "/Date(1406014140922)/"

Edm.DateTime 21 X

Valuation Interaction Valuation Edm.Int16 3

Amount Amount Edm.Decimal 31

Currency Currency Code Edm.String 3

Entity Type "InteractionInterest"

If additionally items of interest for the interactions are needed entity type InteractionInterest has to be used.

InteractionInterest Meta Information

50 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 51: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 24:

Property Description Edm Core Type Max Length Mandatory Key

Key Identifier (GUID) of interac­tion interest in this import

Defaulted internally!

Edm.String 32 X

Interest Item of interest Edm.String 40 X

Quantifier Weighting Factor Edm.Int16

Interests must exist in the system either as values deliveredby SAP or configured by the customer in Business Administration Manage Interests . .

Entity Type "InteractionProduct"

If additionally product references for interactions are needed entity type InteractionProduct has to be used.

InteractionProduct Meta Information

Table 25:

Property Description Edm Core Type Max Length Mandatory Key

Key Identifier (GUID) of interac­tion product in this import

Defaulted internally!

Edm.String 32 X

ItemId Item id Edm.String 50 X

ItemType Item type Edm.String 30 X

RecommendationModelTypeID

Product recommendation model type id

Edm.String 30

SourceSystemId Interaction source system id Edm.String 255

Amount Product related amount (re­lated currency is on root only)

Edm.Decimal 31

Description Product description Edm.String 120

ImageUrl URL of a product image Edm.String 1333

Name Product name Edm.String 40

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 51

Page 52: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Description Edm Core Type Max Length Mandatory Key

NavigationURL URL to the product details page

Edm.String 1333

Quantifier Weighting factor Edm.Int16

Quantity Product related quantity Edm.Decimal 22

UnitOfMeasure Unit of measure of product quantity

Edm.String 3

Valuation sentiment or opinion of inter­action contacts

Edm.Int16

Entity Type "InteractionProductCategory"

If additionally product category references for interactions are needed entity type InteractionProductCategory has to be used.

InteractionProductCategoryMeta Information

Table 26:

Property Description Edm Core Type Max Length Mandatory Key

HierarchyId External Identifier of a prod­uct category hierarchy

Edm.String 50 X X

CategoryId External Identifier of a prod­uct category

Edm.String 50 X

Quantifier Weighting factor Edm.Int16

Valuation Sentiment or opinion of in­teraction contacts

Edm.Int16

Entity Type "InteractionAdditionalObjectReference

If additional object references for interactions are needed, the entity type InteractionAdditionalObjectReference has to be used.

Meta Information for InteractionAdditionalObjectReference

52 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 53: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 27:

Property Description Edm Core Type Max Length Mandatory Key

ObjectType Type of the object referenced

Edm.String 30 X X

ObjectId ID of the object ref­erenced

Edm.String 50 X X

Entity Type "InteractionDigitalAsset"

If additional digital asset references for interactions are needed, the entity typeInteractionDigitalAsset has to be used.

Meta Information for InteractionDigitalAsset

Table 28:

Property Description Edm Core Type Max Length Mandatory Key

SourceSystemId Source system of the digital asset ID of the digital asset

Edm.String 255 X X

Id Source system of the digital asset ID of the digital asset

Edm.String 50 X X

Name Name of the digital asset

Edm.String 120

MIMEType MIME type of the digital asset, for ex­ample text, image, audio or video

Edm.String 256

URL URL where the digi­tal asset is located

Edm.String 1.333

CampaignID Campaign ID Edm.String 10

Entity Type "InteractionOffer"

InteractionOffer Meta Information

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 53

Page 54: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 29:

Property Description Edm Core Type Max Length Mandatory Key

Origin Origin of the offer Edm.String 30 X X

Id Identifier of the offer Edm.String 10 X X

ContentItemId ID of the content item of the offer

Edm.String 5

RecommendationScenarioId

ID of the recommendation scenario

Edm.String 50

Entity Type "InteractionTag"

If additionally tag references for interactions are needed, the entity type InteractionTag has to be used.

Meta Information for InteractionTag

Table 30:

Property Description Edm Core Type Max Length Mandatory Key

TagType Type of the tag Edm.String 75 X X

Tag ID of the tag Edm.String 200 X X

Associations for Interactions

With one OData request you can create several interactions with several additional items of interest and/or products, additional object references, digital assets, offers, or tags.

The relations are as follows:

Table 31:

Associations Principal Entity Cardinality of Princi­pal Entity

Dependent Entity Cardinality of Depend­ent Entity

HeaderInteraction ImportHeader One Interaction Many

InteractionInteractionInterests

Interaction One InteractionInterest

Many

InteractionInteractionAdditionalObjRef

Interaction One InteractionAdditionalObjectReference

Many

54 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 55: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Associations Principal Entity Cardinality of Princi­pal Entity

Dependent Entity Cardinality of Depend­ent Entity

InteractionInteractionDigitalAsset

Interaction One InteractionDigitalAsset

Many

InteractionInteractionOffer

Interaction One InteractionOffer Many

InteractionInteractionTags

Interaction One InteractionTag Many

InteractionInteractionProducts

Interaction One InteractionProduct Many

Entity Type "Interest"

Meta Information for Interest

Table 32:

Property Description Edm Core Type Max Length Mandatory Key

Description Description of the interest Edm.String 120 X -

Language Language code Edm.String 2 X X

Id ID of the interest Edm.String 40 X X

Associations for Interests

You can create several interests with several additional items of product categories with one OData request. The relations are as follows:

Table 33:

Association Principal Entity Cardinality of Princi­pal Entity

Dependent Entity Cardinality of Depend­ent Entity

InterestProductCategories

Interest one ProductCategory many

Entity Type "ProductCategory"

Entity type ProductCategory contains all attributes needed to create product categories.

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 55

Page 56: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

ProductCategory Meta Information

Table 34:

Property Description Edm Core Type Max Length Mandatory Key

Id ID of product category Edm.String 50 X

HierarchyId ID of product hierarchy Edm.String 50 X

ParentCategoryId ID of parent category Edm.String 50

Name Product category name Edm.String 40

Description Description of product cate­gory

Edm.String 512

Entity Type "Product"

Entity type Product contains all attributes needed to create product categories.

Product Meta Information

Table 35:

Property Description Edm Core Type Max Length Mandatory Key

Id ID of product Edm.String 50 X

ProductIdOrigin Origin of source of ID Edm.String 30 X X

Name Product Name Edm.String 120

Description Product Description Edm.String 512

ImageUrl URL of product image Edm.String 1.333

NavigationURL URL of navigation target Edm.String 1.333

CategoryId ID of product category Edm.String 50

HierachyId ID of product hierarchy Edm.String 50

Associations for Products and Product Categories

You have the option to create several products with several additional product categories with one OData request.

56 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 57: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

The relations are as follows:

Table 36:

Associations Principal Entity Cardinality of Princi­pal Entity

Dependent Entity Cardinality of Depend­ent Entity

HeaderProduct ImportHeader One Product Many

ProductProductCategories

Product One ProductCategory Many

HeaderProductCategory

ImportHeader One ProductCategory Many

9.2 Importing Interaction Contacts Using OData Service

To create or update interaction contacts the entity types ImportHeader, Contact and optional ContactFacet are needed.

Caution● You must specify a different ID Origin per source system or data source. In other words, if you import data

from multiple sources, for example, from an ERP system, a CRM system, or a third-party system, you must ensure that the ID Origin for each source is different. Otherwise the data from one source will overwrite data imported from another source.

● You are not allowed to use the origin SAP_HYBRIS_MKT_IC.● When you import updates for interaction contacts, you must import the full data, and not just updated

attributes. If you only import updated attributes, all other existing attributes will be deleted (that is, overwritten with an empty value).

Create Interaction Contacts

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post● Example to create two contacts with several facets. The first person, Otto Normalverbraucher, is a contact for

a company (account). The second person, Erika Mustermann, is a consumer that acts directly as an account.● In the example below, you have to replace "UserName" : "<YOUR COMMUNICATION USER>", with a valid

communication user.

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 57

Page 58: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Example

Sample Code

{ "Id" : "", "Timestamp" : "/Date(1406014140922)/", "UserName" : "<YOUR COMMUNICATION USER>", "SourceSystemType" : "EXT", "SourceSystemId" : "HYBRIS", "Contacts" : [ { "IdOrigin" : "SAP_HYBRIS_CONSUMER", "Id" : "4711", "Timestamp" : "/Date(1406014140601)/", "City" : "Kiel", "CountryDescription" : "Germany", "CustomerName" : "Stahlbau GmbH", "DepartmentDescription" : "Sales", "EMailAddress" : "[email protected]", "EMailOptIn" : "Y", "EMailAddress2" : "[email protected]", "EMail2OptIn" : "N", "EMailAddress3" : "[email protected]", "EMail3OptIn" : "", "FacebookId" : "4711", "FacebookOptIn" : "Y", "FirstName" : "Otto", "FullName" : "Otto Normalverbraucher", "FunctionDescription" : "Director", "GenderDescription" : "Male", "GooglePlusId" : "", "GooglePlusOptIn" : "", "HouseNumber" : "1", "IndustryDescription" : "Manufacturing", "IsConsumer" : false, "IsContact" : true, "LanguageDescription" : "German", "LastName" : "Normalverbraucher", "MaritalStatusDescription" : "Married", "MobilePhoneNumber" : "+49119201412191", "MobilePhoneOptIn" : "N", "MobileSMSOptIn" : "Y", "Obsolete" : false, "PhoneNumber" : "+49115", "PhoneOptin" : "", "PostalCode" : "24105", "PostalOptin" : "", "RegionDescription" : "Schleswig-Holstein", "SAPCRMBusinessPartnerId" : "", "SAPCRMMarketingProspectId" : "", "SAPERPAccountId" : "12345", "SAPERPConsumerAccountId" : "", "SAPERPContactId" : "23456", "SAPHybrisConsumerAccountId" : "4711", "Street" : "Hauptstrasse", "TitleDescription" : "Mr.", "TwitterId" : "", "TwitterOptIn" : "", "Facets" : [ { "IdOrigin" : "EMAIL", "Id" : "[email protected]", "Timestamp" : "/Date(1406014140601)/", "OptIn" : "Y" },

58 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 59: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

{ "IdOrigin" : "EMAIL", "Id" : "[email protected]", "Timestamp" : "/Date(1406014140601)/", "OptIn" : "N" } ], "MarketingPermissions" : [ { "IdOrigin" : "EMAIL", "Id" : "[email protected]", "Timestamp" : "/Date(1406014140601)/", "OptIn" : "Y", "OutboundCommunicationMedium" : "EMAIL" } ], "MarketingAttributes" : [ { "CategoryDescription" : "Hobby", "Value" : "Soccer" }, { "CategoryDescription" : "Hobby", "Value" : "Volleyball" }, { "CategoryDescription" : "Spoken Language", "Value" : "English" }, { "CategoryDescription" : "Spoken Language", "Value" : "Romanian" } ] }, { "IdOrigin" : "SAP_HYBRIS_CONSUMER", "Id" : "4712", "Timestamp" : "/Date(1406014140601)/", "City" : "Walldorf", "CountryDescription" : "Germany", "CustomerName" : "", "DepartmentDescription" : "", "EMailAddress" : "[email protected]", "EMailOptIn" : "", "EMailAddress2" : "[email protected]", "EMail2OptIn" : "N", "EMailAddress3" : "[email protected]", "EMail3OptIn" : "Y", "FacebookId" : "4712", "FacebookOptIn" : "N", "FirstName" : "Erika", "FullName" : "Erika Mustermann", "FunctionDescription" : "", "GenderDescription" : "Female", "GooglePlusId" : "4712", "GooglePlusOptIn" : "Y", "HouseNumber" : "1", "IndustryDescription" : "", "IsConsumer" : true, "IsContact" : false, "LanguageDescription" : "German", "LastName" : "Mustermann", "MaritalStatusDescription" : "Single", "MobilePhoneNumber" : "+49119201412192", "MobilePhoneOptIn" : "Y", "MobileSMSOptIn" : "Y", "Obsolete" : false,

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 59

Page 60: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

"PhoneNumber" : "+49116", "PhoneOptin" : "", "PostalCode" : "69190", "PostalOptin" : "Y", "RegionDescription" : "Baden-Wurttemberg", "SAPCRMBusinessPartnerId" : "", "SAPCRMMarketingProspectId" : "", "SAPERPAccountId" : "", "SAPERPConsumerAccountId" : "CAID-4712", "SAPERPContactId" : "", "SAPHybrisConsumerAccountId" : "4712", "Street" : "Nebenstrasse", "TitleDescription" : "Ms.", "TwitterId" : "4712", "TwitterOptIn" : "N", "Facets" : [ { "IdOrigin" : "EMAIL", "Id" : "[email protected]", "Timestamp" : "/Date(1406014140601)/", "OptIn" : "" }, { "IdOrigin" : "EMAIL", "Id" : "[email protected]", "Timestamp" : "/Date(1406014140601)/", "OptIn" : "Y" } ] } ]}

60 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 61: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Figure 1: Example of an OData Call for AccountTeamMember

Update Interaction Contacts

The update of interaction contacts is performed using the same OData service as for the creation process. You must provide the properties SourceSystemId and ContactId so that the system can identify the interaction contacts to be updated. The system always updates a complete interaction 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. If a facet is not provided anymore in the update case, the system sets this facet to obsolete in the target system.

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post● Example XML: Similar to create case (see above)

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 61

Page 62: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Success Message

After a successful creation or update of interaction contacts, the system provides you with a success message in the following appearance:

Figure 2: Success Message - XML Example

Error Handling

Due to the fact that the attribute SourceSystemId is the only mandatory attribute, the system does not provide you with many error messages that result from the business logic.

You can retrieve the log files that OData gateway stores using transaction /IWFND/ERROR_LOG. The log file provides you with a detailed description of the structural errors. In case of runtime errors, you can use transaction ST22 for deeper analyses.

Known root causes:

● The OData service is not active● The same identifier in the ImportHeader is used for more than one run

62 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 63: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

9.3 Importing Interactions Using OData Service

The following entity types are required to create interactions: ImportHeader, Interaction. The following entity types are optional: InteractionInterest, InteractionProduct, InteractionOffer, InteractionDigitalAsset, InteractionTag and/or InteractionAdditionalObjectReference.

CautionYou must specify a different ID Origin per source system or data source. In other words, if you import data from multiple sources, for example, from an ERP system, a CRM system, or a third-party system, you must ensure that the ID Origin for each source is different. Otherwise the data from one source will overwrite data imported from another source.

Create Interactions

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post● JSON example to create an interaction:

{ "Timestamp" : "/Date(1462881866000)/", "UserName" : "USER", "SourceSystemId" : "ANY", "Interactions" : [ { "CommunicationMedium" : "WEB", "ContactId" : "[email protected]", "ContactIdOrigin" : "EMAIL", "InteractionType" : "WEBSITE_VISIT", "IsAnonymous" : false, "Quantifier" : 1, "SourceDataUrl" : "http://sap.com", "Timestamp" : "/Date(1457092941000)/", "Interests" : [ { "Interest" : "SAP_COMMERCE" }, { "Interest" : "SAP_HANA" } ], "Products" : [ { "ItemId" : "PRODUCT_1", "ItemType" : "SAP_HYBRIS_PRODUCT", "Description" : "Example Description of Product1", "NavigationURL" : "http://www.sap.com" }, { "Key" : "", "ItemId" : "PRODUCT_2", "ItemType" : "SAP_HYBRIS_PRODUCT", "Description" : "Example Description of Product2", "NavigationURL" : "http://www.sap.com" }

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 63

Page 64: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

], "Tags" : [ { "TagType" : "NonStandardizedType", "Tag" : "sap" }, { "TagType" : "NonStandardizedType", "Tag" : "hana" }, { "TagType" : "NonStandardizedType", "Tag" : "marketing" } ], "Offers" : [ { "Origin" : "SAP_PMR", "Id" : "10000001", "ContentItemId" : "1", "RecommendationScenarioId" : "1" }, { "Origin" : "SAP_PMR", "Id" : "10000001", "ContentItemId" : "2", "RecommendationScenarioId" : "1" } ], "DigitalAssets" : [ { "SourceSystemId" : "SystemOfDigitalAsset", "Id" : "100001", "Name" : "Digital Asset: Product Image 01", "MIMEType" : "image", "URL" : "https://store.sap.com/sap/cpa/doc/?uuid=00163E04D1631EE2B5E812FAEC26659E&revision=20120613&modified=20130617112521.1437670", "CampaignId" : "123" }, { "SourceSystemId" : "SystemOfDigitalAsset", "Id" : "100002", "Name" : "Digital Asset: Product Image 02", "MIMEType" : "image", "URL" : "https://store.sap.com/sap/cpa/doc/?uuid=00163E04D1631EE2B5E812FAEC26659E&revision=20120613&modified=20130617112521.1437670", "CampaignId" : "124" } ], "AdditionalObjectReferences" : [ { "ObjectType" : "CUAN_PRODUCT", "ObjectId" : "PRODUCT_1" }, { "ObjectType" : "CUAN_PRODUCT", "ObjectId" : "PRODUCT_2" } ] } ] }

64 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 65: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Error Handling

You can retrieve the log files that OData gateway stores using transaction /IWFND/ERROR_LOG. The log file provides you with a detailed description of the structural errors. In case of runtime errors, you can use transaction ST22 for deeper analyses.

The business object HPA_IMPORT_HEADER also keeps track of all messages that have been raised.

Known root causes

● The OData service is not active● The same identifier in the ImportHeader is used for more than one run● See Import Using RFC [page 95]

9.4 Importing Companies Using OData Service

The approach for creating or updating companies is similar to that used for interaction contacts. The entity types ImportHeader and Company are needed. The entity types ContactMarketingPermission and ContactFacet are optional.

CautionYou must specify a different ID Origin per source system or data source. In other words, if you import data from multiple sources, for example, from an ERP system, a CRM system, or a third-party system, you must ensure that the ID Origin for each source is different. Otherwise the data from one source will overwrite data imported from another source.

Create Companies

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post● JSON example to create a company:

Sample Code

{ "Id" : "","Timestamp" : "/Date(1406014140922)/","UserName" : "anzeiger","SourceSystemType" : "EXT","SourceSystemId" : "ERP_08","Companies" : [{"IdOrigin" : "SAP_ERP_CUSTOMER","Id" : "47110815","Timestamp" : "/Date(1406014140601)/","City" : "Walldorf",

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 65

Page 66: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

"CountryDescription" : "Germany","CompanyName" : "SAP SE","EMailAddress" : "[email protected]","FacebookId" : "FB_47110815","FacebookOptIn" : "Y","HouseNumber" : "16","IndustryDescription" : "IT","LanguageDescription" : "English","PhoneNumber" : "+496227747474","PhoneOptin" : "Y","PostalCode" : "69190","Street" : "Dietmar-Hopp-Allee","Facets" : [{"IdOrigin" : "EMAIL","Id" : "[email protected]","Timestamp" : "/Date(1406014140601)/","OptIn" : "Y"},{"IdOrigin" : "SAP_CRM_BUPA","Id" : "47110815","Timestamp" : "/Date(1406014140601)/"}],"MarketingPermissions" : [{"IdOrigin" : "EMAIL","Id" : "[email protected]","Timestamp" : "/Date(1406014140601)/","OptIn" : "Y","OutboundCommunicationMedium" : "EMAIL"}],"MarketingAttributes" : [{"CategoryDescription" : "Company Size","Value" : "Big"},{"CategoryDescription" : "Spoken Language","Value" : "English"},{"CategoryDescription" : "Spoken Language","Value" : "German"},{"CategoryDescription" : "Spoken Language","Value" : "French"}]}]}

Update Companies

The update of companies is performed using the same OData service as for the creation process. You must provide the properties SourceSystemId and ContactId so that the system can identify the companies to be updated. The system always updates a complete company; partial update of a company is not supported. This

66 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 67: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

means that it is not possible to update only two attributes of a company, for example, as the empty attributes of the update would overwrite the existing attribute entries. If a facet is not provided anymore in the update case, the system sets this facet to obsolete in the target system.

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post● JSON example – same as create case (see above)

Success Message

After a successful creation or update of companies, the system issues a success message.

Error Handling

Due to the fact that the attribute SourceSystemId is the only mandatory attribute, the system does not provide you with many error messages that result from the business logic. You can retrieve the log files that OData gateway stores using transaction /IWFND/ERROR_LOG. The log file provides you with a detailed description of the structural errors. In case of runtime errors, you can use transaction ST22 for deeper analyses.

Known root causes:

● The OData service is not active● The same identifier in the ImportHeader is used for more than one run

9.5 Importing Products and Product Categories Using OData Service

To create products or product categories the entity types ImportHeader, Product and/or ProductCategory are needed. The OData service allows you to import product and product category data in one upload process as it ensures the creation of the category before the corresponding product is created and assigned.

Create Product Categories

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post

● Sample CodeJSON example to create a product:

{

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 67

Page 68: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

"Id" : "", "Timestamp" : "/Date(1406014140572)/", "UserName" : "USER", "SourceSystemId" : "ANY", "ProductCategories" : [ { "Id" : "CATEGORY-001", "HierarchyId" : "ODATA_UPLOAD-001", "ParentCategoryId" : "", "Name" : "Category Name 001", "Description" : "Product Category Description 001" }, { "Id" : "CATEGORY-002", "HierarchyId" : "ODATA_UPLOAD-001", "ParentCategoryId" : "CATEGORY-001", "Name" : "Category Name 002", "Description" : "Product Category Description 002" } ]}

Create Products

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders● HTTP Method: Post● JSON example to create a product:

Sample Code

{ "Id" : "", "Timestamp" : "/Date(1406014140572)/", "UserName" : "USER", "SourceSystemId" : "ANY", "Products" : [ { "IdOrigin" : "SAP_HYBRIS_PRODUCT", "Id" : "PRODUCT-001", "Name" : "Product Name 001", "Description" : "Product Description 001", "ImageUrl" : "http://go.sap.com/dam/application/imagelibrary/photos/275000/275296.jpg", "NavigationURL" : "http://www.sap.com", "CategoryId" : "CATEGORY-001", "HierarchyId" : "ODATA_UPLOAD-001" } ]}

Create Products and Product Categories in One Upload Process

● Request URI: /sap/opu/odata/sap/CUAN_IMPORT_SRV/ImportHeaders

68 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 69: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

● HTTP Method: Post● JSON example to create products and product categories in one upload process:

Sample Code

{ "Id" : "", "Timestamp" : "/Date(1406014140518)/", "UserName" : "USER", "SourceSystemId" : "ANY", "Products" : [ { "IdOrigin" : "SAP_HYBRIS_PRODUCT", "Id" : "PRODUCT-P-001", "Name" : "Product Name P-001", "Description" : "Product Description P-001", "ImageUrl" : "http://go.sap.com/dam/application/imagelibrary/photos/275000/275296.jpg", "NavigationURL" : "http://www.sap.com", "ProductCategories" : [ { "Id" : "CATEGORY-C-001", "HierarchyId" : "ODATA_UPLOAD-001" }, { "Id" : "CATEGORY-C-002", "HierarchyId" : "ODATA_UPLOAD-001" } ] }, { "IdOrigin" : "SAP_HYBRIS_PRODUCT", "Id" : "PRODUCT-P-002", "Name" : "Product Name P-002", "Description" : "Product Description P-002", "ImageUrl" : "http://go.sap.com/dam/application/imagelibrary/photos/275000/275296.jpg", "NavigationURL" : "http://www.sap.com", "ProductCategories" : [ { "Id" : "CATEGORY-C-001", "HierarchyId" : "ODATA_UPLOAD-001" }, { "Id" : "CATEGORY-C-002", "HierarchyId" : "ODATA_UPLOAD-001" } ] } ], "ProductCategories" : [ { "Id" : "CATEGORY-C-001", "HierarchyId" : "ODATA_UPLOAD-001", "ParentCategoryId" : "", "Name" : "Category Name C-001", "Description" : "Product Category Description C-001" }, { "Id" : "CATEGORY-C-002", "HierarchyId" : "ODATA_UPLOAD-001", "ParentCategoryId" : "", "Name" : "Category Name C-002", "Description" : "Product Category Description C-002" } ]

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 69

Page 70: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

}

Error Handling

You can retrieve the log files that OData gateway stores using transaction /IWFND/ERROR_LOG. The log file provides you with a detailed description of the structural errors. In case of runtime errors, you can use transaction ST22 for deeper analyses.

The business object HPA_IMPORT_HEADER also keeps track of all messages that have been raised.

Known Root Causes

● The OData service is not active● The same identifier in the ImportHeader is used for more than one run● See Import Using RFC [page 95]

9.6 Import of Marketing Locations Using an OData Service

A marketing location is defined as any physical or virtual location where a marketing activity can be conducted. It can be a brick and mortar store, a mall, a kiosk, a Web store, or even a beach area where marketers can distribute their coupons.

Marketing locations can be maintained using the corresponding app in the system. Additionally, they can be imported from other systems using a public OData application programming interface (API). You can use the public OData service CUAN_MARKETING_LOCATION_IMP_SRV to upload (import) and read external marketing locations.

Entity Data Model

The following tables list the details of the Marketing Location Import service entities.

Table 37:

OData Version: 2.0

Root URL: https://<Server>:<Port>/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/

Permissions: PFCG role: SAP_CEI_MARKETING_LOCATION

Support of OData Features: See the following chapters for implementation details and search behavior of the OData services.

70 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 71: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 38: Entity Data Model: Marketing Locations

Name Is Key Edm Core Type

Max Length

Creatable Updatable Sortable Nullable Filterable Complex Type Name

LocationID TRUE Edm.String

50 TRUE FALSE TRUE FALSE TRUE n.a.

Locatio­nOrigin

TRUE Edm.String

30 TRUE FALSE TRUE FALSE TRUE n.a.

Location­Name

FALSE Edm.String

80 TRUE TRUE TRUE TRUE TRUE n.a.

Company­Name

FALSE Edm.String

80 TRUE TRUE FALSE TRUE FALSE n.a.

MallName FALSE Edm.String

40 TRUE TRUE FALSE TRUE FALSE n.a.

Introduc­tion

FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

Additiona­lInforma-tion

FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

Special FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

Marketin­gAreaId

FALSE Edm.String

40 TRUE TRUE TRUE TRUE TRUE n.a.

TypeCode FALSE Edm.String

20 TRUE TRUE TRUE TRUE TRUE n.a.

Country­Code

FALSE Edm.String

3 TRUE TRUE TRUE TRUE TRUE n.a.

City FALSE Edm.String

40 TRUE TRUE TRUE TRUE TRUE n.a.

Region­Code

FALSE Edm.String

3 TRUE TRUE TRUE TRUE TRUE n.a.

Postcode FALSE Edm.String

10 TRUE TRUE FALSE TRUE FALSE n.a.

Street FALSE Edm.String

60 TRUE TRUE FALSE TRUE FALSE n.a.

House­Num

FALSE Edm.String

10 TRUE TRUE FALSE TRUE FALSE n.a.

Building FALSE Edm.String

20 TRUE TRUE FALSE TRUE FALSE n.a.

Floor FALSE Edm.String

10 TRUE TRUE FALSE TRUE FALSE n.a.

RoomNo FALSE Edm.String

10 TRUE TRUE FALSE TRUE FALSE n.a.

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 71

Page 72: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Name Is Key Edm Core Type

Max Length

Creatable Updatable Sortable Nullable Filterable Complex Type Name

TelnrLong FALSE Edm.String

30 TRUE TRUE FALSE TRUE FALSE n.a.

FaxnrLong FALSE Edm.String

30 TRUE TRUE FALSE TRUE FALSE n.a.

SmtpAddr FALSE Edm.String

241 TRUE TRUE FALSE TRUE FALSE n.a.

WebUri FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

ImageUri FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

Open­Hours

FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

Categories FALSE Edm.String

-- TRUE TRUE FALSE TRUE FALSE n.a.

Valid­FromDate

FALSE Edm.Date­Time

-- TRUE TRUE TRUE TRUE TRUE n.a.

ValidTo­Date

FALSE Edm.Date­Time

-- TRUE TRUE TRUE TRUE TRUE n.a.

Obsolete FALSE Edm.String

1 TRUE TRUE TRUE TRUE TRUE n.a.

DigitalAc­countID

FALSE Edm.String

40 TRUE TRUE TRUE TRUE TRUE n.a.

DigitalAc­countType

FALSE Edm.String

10 TRUE TRUE TRUE TRUE TRUE n.a.

Language FALSE Edm.String

1 TRUE TRUE TRUE TRUE TRUE n.a.

Latitude FALSE Edm.Deci­mal

-- TRUE TRUE TRUE TRUE TRUE n.a.

Longitude FALSE Edm.Deci­mal

-- TRUE TRUE TRUE TRUE TRUE n.a.

SpatialRe­ferenceId

FALSE Edm.String

-10 TRUE TRUE TRUE TRUE TRUE n.a.

It is possible to create and change marketing locations using OData batch processing.

The fields of the OData entities have the following meaning:

● Marketing Location○ LocationID: The unique location ID provided by the external system which serves, in the import

scenario, as part of the internal marketing location key.○ LocationOrigin: A unique identifier of the origin of the external marketing location. This origin ID also

serves in the import scenario as part of the internal marketing location key.

72 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 73: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

○ LocationName: Name of the external marketing location (free text).○ CompanyName: Name of the company associated with the external marketing location (free text).○ MallName: Name of the mall if the external marketing location is in a shopping mall (free text).○ Introduction: Introduction (free text).○ AdditionalInformation: Additional information related to the marketing location (free text).○ Special: Special Information related to the marketing location (free text).○ MarketingAreaID: The ID of the marketing area, which has to be known by the system.○ TypeCode: Marketing Location Type.

The marketing locations are defined in the configuration (CUANV_LOC_TYPE). The following default types are available:○ MALL: Shopping Mall○ ONLINE_STORE: Online Store○ PHYSICAL_STORE: Physical Store

○ CountryCode: Country code.○ City: City (free text).○ RegionCode: Marketing location region code.○ Postcode: Marketing location address postal code.○ Street: Marketing location address street name.○ Building: Marketing location address building.○ Floor: Marketing location address floor number.○ RoomNo: Marketing location address room number.○ TelnrLong: Marketing location telephone number.○ FaxnrLong: Marketing location fax number.○ SmtpAddr: Marketing location e-mail address.○ WebUri: Marketing location Web URI.○ ImageUri: URI for the image to be used to represent the marketing location.○ OpenHours: Marketing location open hours.○ Categories: Marketing location business categories (free text).○ ValidFromDate: The validity start date of the marketing location.○ ValidToDate: The validity end date of the marketing location.○ Obsolete: Do not use.

Note: If, for example, marketing locations are deleted in the original system which sends them via OData, obsolete can be set to true (X).

○ DigitalAccountID: Digital account ID associated to the marketing location.○ DigitalAccountType: Digital account type of the digital account associated to the marketing location.○ Language: Marketing location language code.○ Latitude: Latitude value of address, for example: 55,64813464.○ Longitude: Longitude value of address, for example: -3,24568414.○ SpatialReferenceId: Geo location spatial ref ID of the marketing location.

Calling the OData Service Operation

Create Request

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 73

Page 74: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

The upload of marketing locations data starts as a post request using batch processing. The following example shows the coding for creating multiple marketing locations.

URL (POST): /sap/opu/odata/sap /CUAN_MARKETING_LOCATION_IMP_SRV/$batch

Request Header

Enter Content-Type as: multipart/mixed; boundary=batch

Request Body Example

--batch Content-Type: multipart/mixed; boundary=changeset--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPOST Locations HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000<?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:LocationID>LOC1309</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1309</d:LocationName><d:CompanyName>CompanyName for LOC1309</d:CompanyName><d:MallName>MallName for LOC1309</d:MallName><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1309</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:Language>E</d:Language><d:DigitalAccountID>test222</d:DigitalAccountID><d:DigitalAccountType>WEC_SUBACC</d:DigitalAccountType><d:Longitude>1010</d:Longitude><d:Latitude>1020</d:Latitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId><d:ValidFromDate>2016-09-13T08:01</d:ValidFromDate><d:ValidToDate>2016-09-13T08:01</d:ValidToDate></m:properties></atom:content></atom:entry>--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPOST Locations HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000

74 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 75: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

<?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:LocationID>LOC1409</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1409</d:LocationName><d:CompanyName>CompanyName for LOC1409</d:CompanyName><d:MallName>MallName for LOC1409</d:MallName><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1409</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:Language>E</d:Language><d:DigitalAccountID>test222</d:DigitalAccountID><d:DigitalAccountType>WEC_SUBACC</d:DigitalAccountType><d:Longitude>1010</d:Longitude><d:Latitude>1020</d:Latitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId><d:ValidFromDate>2016-09-14T08:01</d:ValidFromDate><d:ValidToDate>2016-09-14T08:01</d:ValidToDate></m:properties></atom:content></atom:entry>--changeset----batch--

Response

Response Codes

Example for response in case of successful creation:

--C3B0988F46AC4AC9F15E17F0C060050A0 Content-Type: multipart/mixed; boundary=C3B0988F46AC4AC9F15E17F0C060050A1Content-Length: 5449--C3B0988F46AC4AC9F15E17F0C060050A1Content-Type: application/httpContent-Length: 2575content-transfer-encoding: binaryHTTP/1.1 201 CreatedContent-Type: application/atom+xml;type=entryContent-Length: 2301

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 75

Page 76: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

location: https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')dataserviceversion: 2.0<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')</id><title type="text">Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')</title><updated>2016-09-13T15:47:13Z</updated><category term="CUAN_MARKETING_LOCATION_IMP_SRV.Location" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')" rel="self" title="Location"/><content type="application/xml"><m:properties><d:LocationID>LOC1309</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1309</d:LocationName><d:CompanyName>CompanyName for LOC1309</d:CompanyName><d:MallName>MallName for LOC1309</d:MallName><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1309</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Categories/><d:ValidFromDate>2016-09-13T00:00:00</d:ValidFromDate><d:ValidToDate>2016-09-13T00:00:00</d:ValidToDate><d:Obsolete/><d:DigitalAccountID>test222</d:DigitalAccountID><d:DigitalAccountType>WEC_SUBACC</d:DigitalAccountType><d:Language>E</d:Language><d:Latitude>1020.0000000000</d:Latitude><d:Longitude>1010.0000000000</d:Longitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId></m:properties></content></entry>--C3B0988F46AC4AC9F15E17F0C060050A1Content-Type: application/httpContent-Length: 2575content-transfer-encoding: binaryHTTP/1.1 201 CreatedContent-Type: application/atom+xml;type=entryContent-Length: 2301

76 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 77: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

location: https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')dataserviceversion: 2.0<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')</id><title type="text">Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')</title><updated>2016-09-13T15:47:13Z</updated><category term="CUAN_MARKETING_LOCATION_IMP_SRV.Location" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')" rel="self" title="Location"/><content type="application/xml"><m:properties><d:LocationID>LOC1409</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1409</d:LocationName><d:CompanyName>CompanyName for LOC1409</d:CompanyName><d:MallName>MallName for LOC1409</d:MallName><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1409</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Categories/><d:ValidFromDate>2016-09-14T00:00:00</d:ValidFromDate><d:ValidToDate>2016-09-14T00:00:00</d:ValidToDate><d:Obsolete/><d:DigitalAccountID>test222</d:DigitalAccountID><d:DigitalAccountType>WEC_SUBACC</d:DigitalAccountType><d:Language>E</d:Language><d:Latitude>1020.0000000000</d:Latitude><d:Longitude>1010.0000000000</d:Longitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId></m:properties></content></entry>--C3B0988F46AC4AC9F15E17F0C060050A1----C3B0988F46AC4AC9F15E17F0C060050A0--

Example for response in case of error during creation:

--A8844D2A97F36CE1AB062A098A41423D0 Content-Type: application/httpContent-Length: 1229

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 77

Page 78: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

content-transfer-encoding: binaryHTTP/1.1 400 Bad RequestContent-Type: application/xml;charset=utf-8Content-Length: 1109dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>CX_ST_MATCH_ELEMENT/D79846DB5F914A4DA0C78A5F26310A11</code><message xml:lang="en">System expected end of element '{http://www.w3.org/2005/Atom}entry'</message><innererror><application><component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_LOCATION_IMP_SRV</service_id><service_version>0001</service_version></application><transactionid>57D7DA1FD92F1E58E10000000A445B65</transactionid><timestamp>20160913155237.0977530</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><errordetails/></innererror></error>--A8844D2A97F36CE1AB062A098A41423D0--

Update Request

The following example shows the coding for updating Multiple Marketing Locations.

URL (POST):/sap/opu/odata/sap /CUAN_MARKETING_LOCATION_IMP_SRV/$batch Request Header

Enter Request Header Content-Type as: multipart/mixed; boundary=batch

Request Body Example

--batch Content-Type: multipart/mixed; boundary=changeset--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPUT Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI') HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000<?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:LocationID>LOC1309</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1309 Update</d:LocationName><d:CompanyName>CompanyName for LOC1309 Update</d:CompanyName>

78 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 79: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

<d:MallName>MallName for LOC1309 Update</d:MallName><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1309</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:Language>E</d:Language><d:DigitalAccountID>test222</d:DigitalAccountID><d:DigitalAccountType>WEC_SUBACC</d:DigitalAccountType><d:Longitude>1010</d:Longitude><d:Latitude>1020</d:Latitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId><d:ValidFromDate>2016-09-13T08:01</d:ValidFromDate><d:ValidToDate>2016-09-13T08:01</d:ValidToDate></m:properties></atom:content></atom:entry>--changeset----batch--

Example for response in case of successful update:

--BB2970BAF345D3B9A1732E1819A3049F0 Content-Type: multipart/mixed; boundary=BB2970BAF345D3B9A1732E1819A3049F1Content-Length: 238--BB2970BAF345D3B9A1732E1819A3049F1Content-Type: application/httpContent-Length: 71content-transfer-encoding: binaryHTTP/1.1 204 No ContentContent-Length: 0dataserviceversion: 2.0--BB2970BAF345D3B9A1732E1819A3049F1----BB2970BAF345D3B9A1732E1819A3049F0—

Example for response in case of failed update:

--115619F6A9253BD869F9FD9FB247481F0 Content-Type: application/httpContent-Length: 1327content-transfer-encoding: binaryHTTP/1.1 400 Bad RequestContent-Type: application/xml;charset=utf-8Content-Length: 1207dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>/IWBEP/CM_MGW_RT/022</code><message xml:lang="en">Location Key mismatched.</message><innererror><application>

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 79

Page 80: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

<component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_LOCATION_IMP_SRV</service_id><service_version>0001</service_version></application><transactionid>57D73783D93C1E67E10000000A445B65</transactionid><timestamp>20160913174530.8639530</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><errordetails><errordetail><code>/IWBEP/CX_MGW_BUSI_EXCEPTION</code><message>Location Key mismatched</message><propertyref/><severity>error</severity><target/></errordetail></errordetails></innererror></error>--115619F6A9253BD869F9FD9FB247481F0--

Delete Request

The Delete of Marketing Locations data is started as a post request using batch processing. The Delete request will set the deleted Marketing Location property “Obsolete” to true (X).

The following example shows the coding for deleting a Marketing Location.

URL (POST): /sap/opu/odata/sap /CUAN_MARKETING_LOCATION_IMP_SRV/$batchRequest Header

Enter Content-Type as: multipart/mixed; boundary=batch

Request Body Example

--batch Content-Type: multipart/mixed; boundary=changeset--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryDELETE Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI') HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000--changeset----batch--

Response

Response Codes

Example for response in case of successful deletion:

--E39D08BA9681B0858BBE7CBCE606822C0

80 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 81: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Content-Type: multipart/mixed; boundary=E39D08BA9681B0858BBE7CBCE606822C1Content-Length: 238--E39D08BA9681B0858BBE7CBCE606822C1Content-Type: application/httpContent-Length: 71content-transfer-encoding: binaryHTTP/1.1 204 No ContentContent-Length: 0dataserviceversion: 2.0--E39D08BA9681B0858BBE7CBCE606822C1----E39D08BA9681B0858BBE7CBCE606822C0—Example for response in case of error during deletion:--919A691B78E12B52C00D5C7BE02C885F0Content-Type: application/httpContent-Length: 1990content-transfer-encoding: binaryHTTP/1.1 500 Internal Server ErrorContent-Type: application/xml;charset=utf-8Content-Length: 1860dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>/IWBEP/CM_MGW_RT/058</code><message xml:lang="en">Missing response data in changeset deferred processing mode. Diagnosis Missing response data for some operation in a changeset running in defer mode System Response Procedure Fix the programming error in data provider Procedure for System Administration</message><innererror><application><component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_LOCATION_IMP_SRV</service_id><service_version>0001</service_version></application><transactionid>57E0ADFA967D1FCFE10000000A445B65</transactionid><timestamp>20160920204523.3643380</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><longtext_url>/sap/opu/odata/iwbep/message_text;o=LOCAL_CEI/T100_longtexts(MSGID='%2FIWBEP%2FCM_MGW_RT',MSGNO='058',MESSAGE_V1='',MESSAGE_V2='',MESSAGE_V3='',MESSAGE_V4='')/$value</longtext_url><errordetails><errordetail><code>/IWBEP/CX_MGW_TECH_EXCEPTION</code><message>Missing response data in changeset deferred processing mode</message><longtext_url>/sap/opu/odata/iwbep/message_text;o=LOCAL_CEI/T100_longtexts(MSGID='%2FIWBEP%2FCM_MGW_RT',MSGNO='058',MESSAGE_V1='',MESSAGE_V2='',MESSAGE_V3='',MESSAGE_V4='')/$value</longtext_url><propertyref/><severity>error</severity><target/></errordetail></errordetails></innererror></error>--919A691B78E12B52C00D5C7BE02C885F0--

Read Request

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 81

Page 82: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

The Read of marketing locations data is started as a post request using batch processing. The following example shows the coding for reading a marketing location.

URL (POST): /sap/opu/odata/sap /CUAN_MARKETING_LOCATION_IMP_SRV/$batch

Request Header

Enter Content-Type as: multipart/mixed; boundary=batch

Request Body Example

--batch Content-Type: application/httpContent-Transfer-Encoding: binaryGET Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI') HTTP/1.1--batchContent-Type: application/httpContent-Transfer-Encoding: binaryGET Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI') HTTP/1.1--batch-- ResponseResponse CodesExample for response in case of successful read--C69ACC18C865F01E7D4C11B98951636C0Content-Type: application/httpContent-Length: 2428content-transfer-encoding: binaryHTTP/1.1 200 OKContent-Type: application/atom+xml;type=entryContent-Length: 2256dataserviceversion: 2.0sap-metadata-last-modified: Tue, 20 Sep 2016 17:09:27 GMT<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')</id><title type="text">Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')</title><updated>2016-09-20T20:48:51Z</updated><category term="CUAN_MARKETING_LOCATION_IMP_SRV.Location" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Locations(LocationID='LOC1309',LocationOrigin='WECHAT_POI')" rel="self" title="Location"/><content type="application/xml"><m:properties><d:LocationID>LOC1309</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1309 Update again</d:LocationName><d:CompanyName>CompanyName for LOC1309 Update</d:CompanyName><d:MallName>MallName for LOC1309 Update</d:MallName><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1309</d:Building>

82 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 83: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

<d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Categories/><d:ValidFromDate>2016-09-13T00:00:00</d:ValidFromDate><d:ValidToDate>2016-09-13T00:00:00</d:ValidToDate><d:Obsolete/><d:DigitalAccountID/><d:DigitalAccountType/><d:Language/><d:Latitude>1020.0000000000</d:Latitude><d:Longitude>1010.0000000000</d:Longitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId></m:properties></content></entry>--C69ACC18C865F01E7D4C11B98951636C0Content-Type: application/httpContent-Length: 2401content-transfer-encoding: binaryHTTP/1.1 200 OKContent-Type: application/atom+xml;type=entryContent-Length: 2229dataserviceversion: 2.0sap-metadata-last-modified: Tue, 20 Sep 2016 17:09:27 GMT<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')</id><title type="text">Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')</title><updated>2016-09-20T20:48:51Z</updated><category term="CUAN_MARKETING_LOCATION_IMP_SRV.Location" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')" rel="self" title="Location"/><content type="application/xml"><m:properties><d:LocationID>LOC1409</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1409</d:LocationName><d:CompanyName>CompanyName for LOC1409</d:CompanyName><d:MallName>MallName for LOC1409</d:MallName><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1409</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong>

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 83

Page 84: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

<d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Categories/><d:ValidFromDate>2016-09-14T00:00:00</d:ValidFromDate><d:ValidToDate>2016-09-14T00:00:00</d:ValidToDate><d:Obsolete/><d:DigitalAccountID/><d:DigitalAccountType/><d:Language/><d:Latitude>1020.0000000000</d:Latitude><d:Longitude>1010.0000000000</d:Longitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId></m:properties></content></entry>--C69ACC18C865F01E7D4C11B98951636C0--

Example for response in case of error during read:

--CD0C57931505332CF17EBF7692F71CDD0 Content-Type: application/httpContent-Length: 1361content-transfer-encoding: binaryHTTP/1.1 404 Not FoundContent-Type: application/xml;charset=utf-8Content-Length: 1243dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>/IWBEP/CM_MGW_RT/020</code><message xml:lang="en">Resource not found for segment 'Location'.</message><innererror><application><component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_LOCATION_IMP_SRV</service_id><service_version>0001</service_version></application><transactionid>57E09590967D1FD1E10000000A445B65</transactionid><timestamp>20160920205037.7722580</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><errordetails><errordetail><code>/IWBEP/CX_MGW_BUSI_EXCEPTION</code><message>Resource not found for segment 'Location'</message><propertyref/><severity>error</severity><target/></errordetail></errordetails></innererror></error>--CD0C57931505332CF17EBF7692F71CDD0Content-Type: application/httpContent-Length: 2401content-transfer-encoding: binaryHTTP/1.1 200 OK

84 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 85: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Content-Type: application/atom+xml;type=entryContent-Length: 2229dataserviceversion: 2.0sap-metadata-last-modified: Tue, 20 Sep 2016 17:09:27 GMT<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')</id><title type="text">Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')</title><updated>2016-09-20T20:50:37Z</updated><category term="CUAN_MARKETING_LOCATION_IMP_SRV.Location" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Locations(LocationID='LOC1409',LocationOrigin='WECHAT_POI')" rel="self" title="Location"/><content type="application/xml"><m:properties><d:LocationID>LOC1409</d:LocationID><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationName>Location Name for LOC1409</d:LocationName><d:CompanyName>CompanyName for LOC1409</d:CompanyName><d:MallName>MallName for LOC1409</d:MallName><d:Introduction>Best prices on the market</d:Introduction><d:AdditionalInformation>Gift Certificates available</d:AdditionalInformation><d:Special>Sales every day</d:Special><d:MarketingAreaId>MEDIA_TYPE</d:MarketingAreaId><d:TypeCode>MALL</d:TypeCode><d:CountryCode>CA</d:CountryCode><d:City>Montreal</d:City><d:RegionCode>QC</d:RegionCode><d:Postcode>H9X2R2</d:Postcode><d:Street>DUKE</d:Street><d:HouseNum>111</d:HouseNum><d:Building>Building1409</d:Building><d:Floor>FOURTH</d:Floor><d:RoomNo>LAGRANGE</d:RoomNo><d:TelnrLong>5149999999</d:TelnrLong><d:FaxnrLong>5149999999</d:FaxnrLong><d:SmtpAddr>[email protected]</d:SmtpAddr><d:WebUri>example.com</d:WebUri><d:ImageUri>example.com</d:ImageUri><d:OpenHours>Monday To Friday from 9am to 5pm</d:OpenHours><d:Categories/><d:ValidFromDate>2016-09-14T00:00:00</d:ValidFromDate><d:ValidToDate>2016-09-14T00:00:00</d:ValidToDate><d:Obsolete/><d:DigitalAccountID/><d:DigitalAccountType/><d:Language/><d:Latitude>1020.0000000000</d:Latitude><d:Longitude>1010.0000000000</d:Longitude><d:SpatialReferenceId>Ref070903</d:SpatialReferenceId></m:properties></content></entry>--CD0C57931505332CF17EBF7692F71CDD0--

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 85

Page 86: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

9.7 Import of Marketing Beacons Using an OData Service

You can import marketing beacons into SAP Hybris Marketing using the OData Service CUAN_MARKETING_BEACON_IMPORT (OData service for Marketing Beacon Import).

A marketing beacon is defined as a tiny, battery-powered, Bluetooth, low energy- based device that can be used locate a mobile app user in a precise physical location, so that a marker can conduct location- relevant marketing activities.

Entity Data Model

The following tables list the details of the Marketing Beacons Import service entities.

Table 39:

OData Version: 2.0

Root URL: https://<Server>:<Port>/sap/opu/odata/SAP/CUAN_MARKETING_LOCATION_IMP_SRV/

Permissions: PFCG role: SAP_CEI_MARKETING_LOCATION

Support of OData Features: See the following chapters for implementation details and search behavior of the OData services.

Table 40: Entity Data Model: Marketing Beacons

Name Is Key Edm Core Type

Max Length

Creatable Updatable Sortable Nullable Filterable Complex Type Name

Id TRUE Edm.String

50 TRUE FALSE TRUE FALSE TRUE n.a.

Descrip­tion

FALSE Edm.String

-- TRUE TRUE TRUE TRUE TRUE n.a.

Type FALSE Edm.String

20 TRUE TRUE TRUE TRUE TRUE n.a.

UUID FALSE Edm.String

40 TRUE TRUE TRUE TRUE TRUE n.a.

Major FALSE Edm.Int32 -- TRUE TRUE TRUE TRUE TRUE n.a.

Minor FALSE Edm.Int32 -- TRUE TRUE TRUE TRUE TRUE n.a.

Latitude FALSE Edm.Deci­mal

-- TRUE TRUE TRUE TRUE TRUE n.a.

86 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 87: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Name Is Key Edm Core Type

Max Length

Creatable Updatable Sortable Nullable Filterable Complex Type Name

Longitude FALSE Edm.Deci­mal

-- TRUE TRUE TRUE TRUE TRUE n.a.

Locatio­nOrigin

FALSE Edm.String

30 TRUE TRUE TRUE TRUE TRUE n.a.

LocationId FALSE Edm.String

50 TRUE TRUE TRUE TRUE TRUE n.a.

It is possible to create, change, and read marketing beacons using OData batch processing.

The fields of the OData entities have the following meaning:

● Marketing Beacon○ Id: The unique marketing beacon ID provided by the external system which serves, in the import

scenario, as the internal marketing beacon key.○ Description: Description of the external marketing beacon (free text).○ UUID: iBeacon Universally Unique Identifier. It contains 32 hexadecimal digits, split into 5 groups,

separated by dashes.○ Major: Major and Minor values are numbers assigned to iBeacons to identify them with greater accuracy

than only using UUID. Major values are intended to identify and distinguish a group. For example, all beacons in on a certain floor or room could be assigned a unique Major value.

○ Minor: Major and Minor values are numbers assigned to iBeacons to identify them with greater accuracy than only using UUID. Minor values are intended to identify and distinguish an individual. For example, distinguishing individual beacons within a group of beacons assigned a Major value.

○ Latitude: Latitude value of an address. For example: 55,64813464.○ Longitude: Longitude value of an address. For example: -3,24568414.○ SpatialReferenceId: Geo Beacon Spatial Ref ID of the marketing beacon.○ LocationId: Marketing location ID.○ LocationOrigin: Origin of the marketing location.

Calling the OData Service Operation

Create Request

The upload of marketing beacons data is started as a post request using batch processing. The following example shows the coding for creating multiple marketing beacons.

URL (POST): /sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/$batch

Request Header

Enter Content-Type as: multipart/mixed; boundary=batch

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 87

Page 88: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Request Body Example

--batch Content-Type: multipart/mixed; boundary=changeset--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPOST Beacons HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000 <?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:Id>BEACON1409</d:Id><d:Description>This is BEACON1409</d:Description><d:Type>IBEACON</d:Type><d:UUID>f7826da6-4fa2-4e98-8024-bc5b71e0893e</d:UUID><d:Major>782</d:Major><d:Minor>5710893</d:Minor><d:Latitude>5564813464</d:Latitude><d:Longitude>-324568414</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></atom:content></atom:entry>--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPOST Beacons HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000<?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:Id>BEACON1509</d:Id><d:Description>This is BEACON01509</d:Description><d:Type>IBEACON</d:Type><d:UUID>f7826da6-4fa2-4e98-8024-bc5b71e0893e</d:UUID><d:Major>7826</d:Major><d:Minor>5710893</d:Minor><d:Latitude>5564813464</d:Latitude><d:Longitude>-324568414</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></atom:content></atom:entry>--changeset----batch--

Response

Response Codes

88 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 89: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Example for response in case of successful creation:

--F8C2A9724F37B985A59D553A3D2061B10Content-Type: multipart/mixed; boundary=F8C2A9724F37B985A59D553A3D2061B11Content-Length: 3218--F8C2A9724F37B985A59D553A3D2061B11Content-Type: application/httpContent-Length: 1459content-transfer-encoding: binaryHTTP/1.1 201 CreatedContent-Type: application/atom+xml;type=entryContent-Length: 1221location: https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/Beacons('BEACON14092')dataserviceversion: 2.0<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/Beacons('BEACON14092')</id><title type="text">Beacons('BEACON14092')</title><updated>2016-09-14T14:08:45Z</updated><category term="CUAN_MARKETING_BEACON_IMPORT_SRV.Beacon" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Beacons('BEACON14092')" rel="self" title="Beacon"/><content type="application/xml"><m:properties><d:Id>BEACON14092</d:Id><d:Description>This is BEACON14092</d:Description><d:Type>IBEACON</d:Type><d:UUID>f7826da6-4fa2-4e98-8001-bc5b71e0893e</d:UUID><d:Major>7826</d:Major><d:Minor>5710893</d:Minor><d:Latitude>5564813464.0000000000</d:Latitude><d:Longitude>-324568414.0000000000</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></content></entry>--F8C2A9724F37B985A59D553A3D2061B11Content-Type: application/httpContent-Length: 1460content-transfer-encoding: binaryHTTP/1.1 201 CreatedContent-Type: application/atom+xml;type=entryContent-Length: 1222location: https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/Beacons('BEACON15092')dataserviceversion: 2.0<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/Beacons('BEACON15092')</id><title type="text">Beacons('BEACON15092')</title><updated>2016-09-14T14:08:45Z</updated><category term="CUAN_MARKETING_BEACON_IMPORT_SRV.Beacon" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Beacons('BEACON15092')" rel="self" title="Beacon"/><content type="application/xml"><m:properties><d:Id>BEACON15092</d:Id>

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 89

Page 90: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

<d:Description>This is BEACON015092</d:Description><d:Type>IBEACON</d:Type><d:UUID>f7826da6-4fa2-4e98-8003-bc5b71e0893e</d:UUID><d:Major>7826</d:Major><d:Minor>5710893</d:Minor><d:Latitude>5564813464.0000000000</d:Latitude><d:Longitude>-324568414.0000000000</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></content></entry>--F8C2A9724F37B985A59D553A3D2061B11----F8C2A9724F37B985A59D553A3D2061B10--

Example of response in case of error during creation:

--8D802B497485B141A6EDF3DE68FA52900 Content-Type: application/httpContent-Length: 1227content-transfer-encoding: binaryHTTP/1.1 400 Bad RequestContent-Type: application/xml;charset=utf-8Content-Length: 1107dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>CX_SY_CONVERSION_NO_NUMBER/995DB739AB5CE919E10000000A11447B</code><message xml:lang="en">The argument 'f7826da6' cannot be interpreted as a number</message><innererror><application><component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_BEACON_IMPORT_SRV</service_id><service_version>0001</service_version></application><transactionid>57D75FBFD9771E8DE10000000A445B65</transactionid><timestamp>20160914135857.6382290</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><errordetails/></innererror></error>--8D802B497485B141A6EDF3DE68FA52900--

Update Request

The following example shows the coding for updating multiple marketing beacons.

URL (POST):/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/$batchRequest Header

Enter Request Header Content-Type as: multipart/mixed; boundary=batch

90 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 91: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Request Body Example

--batch Content-Type: multipart/mixed; boundary=changeset--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPUT Beacons('BEACON14092') HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000<?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:Id>BEACON14092</d:Id><d:Description>This is BEACON14092 updated</d:Description><d:Type>IBEACON</d:Type><d:UUID>f7826da6-4fa2-4e98-8001-bc5b71e0893e</d:UUID><d:Major>782601</d:Major><d:Minor>571089301</d:Minor><d:Latitude>5564813464</d:Latitude><d:Longitude>-324568414</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></atom:content></atom:entry>--changesetContent-Type: application/httpContent-Transfer-Encoding: binaryPUT Beacons('BEACON15092') HTTP/1.1Content-Type: application/atom+xmlContent-Length: 10000<?xml version="1.0" encoding="utf-8" standalone="yes"?><atom:entry xmlns:atom="http://www.w3.org/2005/Atom"xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><atom:content type="application/xml"><m:properties><d:Id>BEACON15092</d:Id><d:Description>This is BEACON15092 updated</d:Description><d:Type>IBEACON</d:Type><d:UUID>f7826da6-4fa2-4e98-8001-bc5b71e0893e</d:UUID><d:Major>782601</d:Major><d:Minor>571089301</d:Minor><d:Latitude>5564813464</d:Latitude><d:Longitude>-324568414</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></atom:content></atom:entry>--changeset----batch--

Example for response in case of successful update:

--E8643A5BE493A2D3C214DB5895D712730 Content-Type: multipart/mixed; boundary=E8643A5BE493A2D3C214DB5895D712731Content-Length: 437--E8643A5BE493A2D3C214DB5895D712731Content-Type: application/httpContent-Length: 71

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 91

Page 92: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

content-transfer-encoding: binaryHTTP/1.1 204 No ContentContent-Length: 0dataserviceversion: 2.0--E8643A5BE493A2D3C214DB5895D712731Content-Type: application/httpContent-Length: 71content-transfer-encoding: binaryHTTP/1.1 204 No ContentContent-Length: 0dataserviceversion: 2.0--E8643A5BE493A2D3C214DB5895D712731----E8643A5BE493A2D3C214DB5895D712730--

Example for response in case of failed update:

--0A9BEE26120EBEE0946EBFF19EFD878B0 Content-Type: application/httpContent-Length: 1229content-transfer-encoding: binaryHTTP/1.1 400 Bad RequestContent-Type: application/xml;charset=utf-8Content-Length: 1109dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>CX_SY_CONVERSION_NO_NUMBER/995DB739AB5CE919E10000000A11447B</code><message xml:lang="en">The argument '571089301a' cannot be interpreted as a number</message><innererror><application><component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_BEACON_IMPORT_SRV</service_id><service_version>0001</service_version></application><transactionid>57D7A124D93C1E85E10000000A445B65</transactionid><timestamp>20160914141542.6286740</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><errordetails/></innererror></error>--0A9BEE26120EBEE0946EBFF19EFD878B0--

Read Request

The Read of marketing beacons data is started as a post request using batch processing. The following example shows the coding for reading a marketing beacon.

URL (POST):/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/$batch Request Header

Enter Content-Type as: multipart/mixed; boundary=batch

92 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 93: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Request Body Example

--batch Content-Type: application/httpContent-Transfer-Encoding: binaryGET Beacons(Id='BEACON070901') HTTP/1.1--batch--

Response

Response Codes

Example for response in case of successful read:

--ADA8B585B0BC057CDCE0A004D77C02080 Content-Type: application/httpContent-Length: 1375content-transfer-encoding: binaryHTTP/1.1 200 OKContent-Type: application/atom+xml;type=entryContent-Length: 1203dataserviceversion: 2.0sap-metadata-last-modified: Wed, 07 Sep 2016 14:37:50 GMT<?xml version="1.0" encoding="utf-8"?><entry xml:base="https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><id>https://ldciana.wdf.sap.corp:44300/sap/opu/odata/SAP/CUAN_MARKETING_BEACON_IMPORT_SRV/Beacons('BEACON070901')</id><title type="text">Beacons('BEACON070901')</title><updated>2016-09-20T20:54:24Z</updated><category term="CUAN_MARKETING_BEACON_IMPORT_SRV.Beacon" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link href="Beacons('BEACON070901')" rel="self" title="Beacon"/><content type="application/xml"><m:properties><d:Id>BEACON070901</d:Id><d:Description>This is BEACON070901 update</d:Description><d:Type>IBEACON</d:Type><d:UUID>UIUD070901U</d:UUID><d:Major>101101</d:Major><d:Minor>101101</d:Minor><d:Latitude>7090101.0000000000</d:Latitude><d:Longitude>7090101.0000000000</d:Longitude><d:SpatialReferenceId>SIRD01</d:SpatialReferenceId><d:LocationOrigin>WECHAT_POI</d:LocationOrigin><d:LocationId>286603472</d:LocationId></m:properties></content></entry>--ADA8B585B0BC057CDCE0A004D77C02080--

Example for response in case of error during read:

--5AF6C91241CBEC15A03A7454A074870F0 Content-Type: application/httpContent-Length: 1358content-transfer-encoding: binaryHTTP/1.1 404 Not FoundContent-Type: application/xml;charset=utf-8

Data Management Upload Interfaces 1702Import of Data Using OData Service CUAN_IMPORT_SRV C U S T O M E R 93

Page 94: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Content-Length: 1240dataserviceversion: 1.0<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>/IWBEP/CM_MGW_RT/020</code><message xml:lang="en">Resource not found for segment 'Beacon'.</message><innererror><application><component_id>CEC-MKT-CEI</component_id><service_namespace>/SAP/</service_namespace><service_id>CUAN_MARKETING_BEACON_IMPORT_SRV</service_id><service_version>0001</service_version></application><transactionid>57E0E025967D1FC0E10000000A445B65</transactionid><timestamp>20160920205555.8115870</timestamp><Error_Resolution><SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details</SAP_Transaction><SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note><Batch_SAP_Note>See SAP Note 1869434 for details about working with $batch (https://service.sap.com/sap/support/notes/1869434)</Batch_SAP_Note></Error_Resolution><errordetails><errordetail><code>/IWBEP/CX_MGW_BUSI_EXCEPTION</code><message>Resource not found for segment 'Beacon'</message><propertyref/><severity>error</severity><target/></errordetail></errordetails></innererror></error>--5AF6C91241CBEC15A03A7454A074870F0--

94 C U S T O M E RData Management Upload Interfaces 1702

Import of Data Using OData Service CUAN_IMPORT_SRV

Page 95: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

10 Import Using RFC

You can import interaction contacts, interactions, corporate accounts (companies), product categories, and products into your SAP Hybris Marketing system using a remote function call (RFC). The import parameter IV_ABORT_IF_ERROR for the RFC upload supports the following upload scenarios:

● X = Store all or nothing (default)● Empty: Store the valid values

Authorization

The function module checks if the authorization for accessing business objects (HPA_OBJECT) allows changes (ACTVT = 02). If this authorization is missing, the RFC aborts with an error message.

For more information, see section Authorizations in the Security Guide for SAP Hybris Marketing under http://help.sap.com/mkt Security Information .

Additional Fields

Within the structures, on which the function modules are based, you find fields with unspecified names. If you want to use these fields since the available fields with specified names do not cover your requirements, you must ensure the required additional fields are added in Data Management Import Data in SAP Hybris Marketing.

10.1 Importing Interaction Contacts Using RFC

Use

To create and update interaction contacts using RFC, call the remote-enabled function module CUAN_CE_IC_POST_FLAT (development package CUAN_CONTACT_ENGAGEMENT, function group CUAN_CE_INTEGRATION).

The function module imports the values in the table parameter IT_IC_IMP_EXT_FAFL. Each row contains the data of a separate interaction contact. The following attributes are mandatory:

● ID_ORIGINThis attribute specifies the domain in which the given ID is valid. The ID_ORIGIN value must exist in the system either as pre-delivered value or configured by the customer in maintenance view CUANV_CE_ORIGIN.

● ID

Data Management Upload Interfaces 1702Import Using RFC C U S T O M E R 95

Page 96: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

This attribute specifies the ID under which you can identify the contact in your environment.● TIMESTAMP

This attribute refers to the validity date of the interaction contact data, or to the date when the contact has provided the data.

NoteAs each row of IT_IC_IMP_EXT_FAFL table parameter must refer to a separate contact, the same ID / ID_ORIGIN attribute value pair must not be used in different rows.

The IT_IC_IMP_EXT_FAFL table parameter also contains a number of identifiers for facets under which a contact is known in the outside world. These attribute names start with ID_ or SMTP_ADDR or TELNR_LONG or FAXNR_LONG or TELNR_MOBILE. In the following attributes, for example, you can specify the interaction contact's e-mail address: SMTP_ADDR, SMTP_ADDR_2, and SMTP_ADDR_3. A contact can write e-mails to a company: SMTP_ADDR is the ID of this contact used in this special communication channel. The e-mail address is only one facet of this contact. Other facets can be used for other communication channels, such as ID_FB (Facebook), ID_GP (google +), ID_TW (twitter), and others.

For importing additional facets, you can use the IT_IC_IMP_FACETS_ADDITIONAL parameter table. For each line in the parameter table, you use the REXCORD_IDX attribute to specify the interaction contact in IT_IC_IMP_EXT_FAFL, to which the additional facet shall be added. For the third interaction contact line, for example, enter the value 3 in the RECORD_IDX attribute. Use the attribute ID to specify the contact’s alternative but unique identifier. The ID_ORIGIN attribute is used in the same way as for IT_IC_IMP_EXT_FAFL. The following attributes can be used to assign or revoke the marketing permission in addition to the facet:

● OUTBOUND_COMM_MEDIUM● OPT_IN● OPT_IN_TMSTMP● COMM_MEDIUM● COMM_DIRECTION

The system considers two or more contacts with the same mobile phone number or identifier via the attribute name starting with ID_ or additional facet as one contact and merges them into one contact.

There is one exception for the merge. Contacts that have different IDs with the same mobile phone number are not merged when the following is true:

● Both contacts have a facet with an ID_ORIGIN value starting with SAP_ (one per contact)● And the value of the corresponding ID is different for the two contacts

ExampleA contact has a SAP_CRM_BUPA facet with ID = 987654321. A second contact has a SAP_CRM_BUPA facet with ID = 123456789.

NOTE: The system regards these two contacts as different contacts as they have different CRM business partner numbers, even if they share any other ID, which would normally cause the system to merge them.

Both contacts have a mobile phone number facet with ID = [email protected]

The system then creates a third contact that serves only as container for the e-mail address and has no data apart from the e-mail facet.

96 C U S T O M E RData Management Upload Interfaces 1702

Import Using RFC

Page 97: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

NoteFor SAP Hybris Marketing 1.1 below SP06, the OBSOLETE attribute of the IT_IC_IMP_EXT_FAFL table parameter has no impact.

You can use the IT_IC_IMP_MARKETING_ATTRIBUTE parameter table for importing marketing attributes for contacts. For each line in the parameter table, you use the REXCORD_IDX attribute to specify the interaction contact in IT_IC_IMP_EXT_FAFL, to which the marketing attribute shall be added.

The following attributes can be used to assign marketing attributes:

● CATEGORY_ID● CATEGORY_DESC● VALUE● LANGU● LANGU_DES

CATEGORY_ID is the external identifier for a marketing category. CATEGORY_DESC is the language-dependent description of a marketing attribute category. You can use either CATEGORY_ID or CATEGORY_DESC to identify the category. If you use CATEGORY_DESC you can use LANGU (SAP Code value e.g. EN) or LANGU_DESC (description of language e.g. “English”) to set the language. The fallback language will be the logon language of the technical user. In the attribute VALUE you can provide a value belonging to a specific category.

The exported values are stored in the ET_CONTACT_KEY parameter. Messages are stored in the ET_MESSAGE parameter. Both parameters are tables with the following content:

● ET_CONTACT_KEY contains one row for each row entered in IT_IC_IMP_EXT_FAFL regardless of IT_IC_IMP_FACETS_ADDITIONAL. The order of entries is the same: The third row in ET_CONTACT_KEY refers to the third interaction contact (row) in IT_IC_IMP_EXT_FAFL. The following attributes are used:○ The ID_ORIGIN and ID attributes repeat the values from IT_IC_IMP_EXT_FAFL.○ CONTACT_KEY returns the database key under which the corresponding interaction contact is or was

already persisted.○ The DBOPERATION attribute indicates whether the interaction contact was updated (value = U) or newly

created (value = I).○ The ANONYMIZED attribute indicates that the contact has requested their data to be protected (value =

X’). Apart from the facets, the interaction contact data is cleared and cannot be updated.

NoteThe FACET_GROUP and MAIN_FACET attributes are not used.

● FAILURE with value X indicates that an error occurred. The MSGID, MSGNO and MSGTY explain the error, or contain just a message.

● The messages for all contacts are returned in 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.

Data Management Upload Interfaces 1702Import Using RFC C U S T O M E R 97

Page 98: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Example

IT_IC_IMP_EXT_FAFL contains two rows with interaction contacts with the same ID / ID_ORIGIN value pair. ET_CONTACT_KEY returns a corresponding row for each contact row with the following attribute values:

● FAILURE = X● MSGID = CUAN_IC● MSGNO = 029● MSGTY = E (error)

ET_MESSAGE returns one row with the following attribute values:

● TYPE = E● ID = CUAN_IC● NUMBER = 029● MESSAGE = Imported row 0000000002 contains facet <ID_ORIGIN> of other row 0000000001

10.2 Importing Interactions Using RFC

To create and update interactions using RFC, the CUAN_CE_INTEGRATION function group provides the following function modules:

● CUAN_CE_INTERACTIONS_POST● CUAN_CE_INTERACTIONS_POST_FLAT

For error handling, use the IV_ABORT_IF_ERROR interface.

The RFC returns the following data:

● The ET_MESSAGES parameter returns an info message with the number of created interactions and error messages, if applicable. Identical error messages are merged, for example, if the interaction type is wrong or not available in Customizing in all ten thousand rows, the parameter only returns one error message.

● The ET_FAILED_INTERACTIONS parameter returns all rows affected by the error.● The parameter IV_DEFAULT_IC_UPDATE_MODE defines the default behavior for all contacts to which the

interactions belong. For details of the possible values and their effects, see the Update Mode table or the corresponding table entry in the appendix.

Function Module 'CUAN_CE_INTERACTIONS_POST'

In function module CUAN_CE_INTERACTIONS_POST, the table type CUAN_T_CE_IA_EXT of the importing parameter IT_INTERACTIONS has a deep nested structure, which contains the interests and the products. The following code snippet shows the generated signatures and interfaces in the source code of the function module:

*"*"Local Interface: *" IMPORTING*" VALUE(IT_INTERACTIONS) TYPE CUAN_T_CE_IA_EXT

98 C U S T O M E RData Management Upload Interfaces 1702

Import Using RFC

Page 99: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

*" VALUE(IV_ABORT_IF_ERROR) TYPE BOOLE_D DEFAULT 'X'*" VALUE(IV_DEFAULT_IC_UPDATE_MODE) TYPE CUAN_IC_UPDATE_MODE*" DEFAULT 'D'*" VALUE(IV_LOG_HANDLE) TYPE BALLOGHNDL OPTIONAL*" VALUE(IV_SAVE_LOG) TYPE BOOLE_D OPTIONAL*" EXPORTING*" VALUE(ET_FAILED_INTERACTIONS) TYPE CUAN_T_CE_IA_EXT*" VALUE(ET_MESSAGES) TYPE BAPIRETTAB

Structure 'CUAN_CE_INTERACTIONS_POST_FLAT'

In function module CUAN_CE_INTERACTIONS_POST_FLAT, the table type CUAN_T_CE_IA_EXT_FLAT of the importing parameter IT_INTERACTIONS has a flat structure with STRING fields of type CHAR 30,000. This structure is used for SAP data services.

CautionIf the table is too big, memory issues occur because the memory is allocated to the entire row length.

The following code snippet shows the generated signatures and interfaces in the source code of the function module:

*" IMPORTING *" VALUE(IV_ABORT_IF_ERROR) TYPE BOOLE_D DEFAULT 'X'*" VALUE(IV_DEFAULT_IC_UPDATE_MODE) TYPE CUAN_IC_UPDATE_MODE*" DEFAULT 'D'*" VALUE(IV_LOG_HANDLE) TYPE BALLOGHNDL OPTIONAL*" VALUE(IV_SAVE_LOG) TYPE BOOLE_D OPTIONAL*" TABLES*" IT_INTERACTIONS STRUCTURE CUAN_S_CE_IA_EXT_FLAT*" ET_FAILED_INTERACTIONS STRUCTURE CUAN_S_CE_IA_EXT_FLAT*" OPTIONAL*" ET_MESSAGES STRUCTURE BAPIRET2 OPTIONAL

You can import more than one interest per interaction by copying the record and changing only the value in field "INTEREST_ITEM". The semantic key must be identical. The semantic key of an interaction consists of the fields ID_ORIGIN, ID, COMM_MEDIUM, IA_TYPE, TIMESTAMP, SOURCE_OBJECT_TYPE and SOURCE_OBJECT_ID. During the upload, the flat format will be normalized internally.

Error Handling

Error handling is done in the IV_ABORT_IF_ERROR interface, see Import Using RFC [page 95].

10.3 Importing Companies Using RFC

To create and update companies using RFC, call the remote-enabled function module CUAN_CE_COMPANY_POST_FLAT (development package CUAN_CONTACT_ENGAGEMENT, function group

Data Management Upload Interfaces 1702Import Using RFC C U S T O M E R 99

Page 100: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

CUAN_CE_INTEGRATION). The function module imports the values in the table parameter IT_COMP_IMP_EXT_FAFL. Each row contains the data of a separate company. The following attributes are mandatory:

● ID_ORIGINThis attribute specifies the domain in which the given ID is valid. The ID_ORIGIN value must exist in the system either as pre-delivered value or configured by the customer in maintenance view CUANV_CE_ORIGIN.

● IDThis attribute specifies the ID under which you can identify the company in your environment.

● TIMESTAMPThis attribute refers to the validity date of the company data, or to the date when the company has provided the data.

NoteAs each row of IT_COMP_IMP_EXT_FAFL table parameter must refer to a separate company, the same ID and ID_ORIGIN attribute value pair must not be used in different rows.

The IT_COMP_IMP_EXT_FAFL table parameter also contains a number of identifiers for facets under which a company is known in the outside world. These attribute names start with ID_ or SMTP_ADDR. In the attribute SMTP_ADDR for example, you can specify the company's e-mail address. A company can write e-mails to a company: SMTP_ADDR is the ID of this company used in this special communication channel. The e-mail address is only one facet of this company. Other facets can be used for other communication channels, such as ID_FB (Facebook), ID_GP (google +), ID_TW (twitter), and others.

For importing additional facets, you can use the IT_COMP_IMP_FACETS_ADDITIONAL parameter table. For each line in the parameter table, you use the REXCORD_IDX attribute to specify the company in IT_COMP_IMP_EXT_FAFL, to which the additional facet is added. For the third company line, for example, enter the value 3 in the RECORD_IDX attribute. Use the attribute ID to specify the company’s alternative, but unique identifier. The ID_ORIGIN attribute is used in the same way as for IT_COMP_IMP_EXT_FAFL. The following attributes can be used to assign or revoke the marketing permission in addition to the facet:

● OUTBOUND_COMM_MEDIUM● OPT_IN● OPT_IN_TMSTMP● COMM_MEDIUM● COMM_DIRECTION

As companies exist in the system as interaction contacts of type Account, the same rules regarding the merging of companies apply as for interaction contacts (refer to section Importing Interaction Contacts Using RFC [page 95]).

The exported values are stored in the ET_COMPANY_KEY parameter and the messages are stored in the ET_MESSAGE parameter. Both parameters are tables with the same content mentioned in the section Importing Interaction Contacts Using RFC [page 95]. You can find more examples in this paragraph.

100 C U S T O M E RData Management Upload Interfaces 1702

Import Using RFC

Page 101: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

10.4 Importing Products and Product Categories Using RFC

Products

To create and update products using RFC, the CUAN_CE_INTEGRATION function group provides the following function modules:

● CUAN_PRODUCTS_POST● CUAN_PRODUCTS_POST_FLAT

For error handling, use the IV_ABORT_IF_ERROR interface.

The RFC returns the following data:

● The ET_MESSAGES parameter returns an info message with the number of created products and error messages, if applicable. Identical error messages are merged, for example, if the product origin is wrong or not available in Customizing in all ten thousand rows, the parameter only returns one error message.

● The ET_FAILED_PRODUCTS parameter returns all rows affected by the error.

Function Module 'CUAN_PRODUCTS_POST'

In function module CUAN_PRODUCTS_POST, the table type CUAN_T_PRODUCT_EXT of the importing parameter IT_PRODUCTS has a deep nested structure, which contains the product description and the category assignment. The following code snippet shows the generated signatures and interfaces in the source code of the function module:

*" IMPORTING *" VALUE(IT_PRODUCTS) TYPE CUAN_T_PRODUCT_EXT *" VALUE(IV_ABORT_IF_ERROR) TYPE BOOLE_D DEFAULT 'X' *" EXPORTING *" VALUE(ET_FAILED_PRODUCTS) TYPE CUAN_T_PRODUCT_EXT *" VALUE(ET_MESSAGES) TYPE BAPIRETTAB

Structure 'CUAN_PRODUCTS_POST_FLAT'

In function module CUAN_PRODUCTS_POST_FLAT, the table type CUAN_T_PRODUCT_EXT_FLAT of the importing parameter IT_PRODUCTS has a flat structure.

CautionIf the table size is too is too big, memory issues occur because the memory is allocated to the entire row length.

The following code snippet shows the generated signatures and interfaces in the source code of the function module:

*" IMPORTING *" VALUE(IV_ABORT_IF_ERROR) TYPE BOOLE_D DEFAULT 'X' *" TABLES *" IT_PRODUCTS TYPE CUAN_T_PRODUCT_EXT_FLAT *" ET_FAILED_PRODUCTS TYPE CUAN_T_PRODUCT_EXT_FLAT OPTIONAL *" ET_MESSAGES TYPE BAPIRETTAB OPTIONAL

Error Handling

Error handling is done in the IV_ABORT_IF_ERROR interface, see Import Using RFC [page 95].

Data Management Upload Interfaces 1702Import Using RFC C U S T O M E R 101

Page 102: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Product Categories

To create and update product categories using RFC, the CUAN_CE_INTEGRATION function group provides the following function modules:

● CUAN_PRODUCT_CATEG_POST● CUAN_PRODUCT_CATEG_POST_FLAT

For error handling, use the IV_ABORT_IF_ERROR interface.

The RFC returns the following data:

● The ET_MESSAGES parameter returns an info message with the number of created product categories and error messages, if applicable.

● The ET_FAILED_PROD_CAT parameter returns all rows affected by the error.

Function Module 'CUAN_PRODUCT_CATEG_POST'

In function module CUAN_PRODUCT_CATEG_POST, the table type CUAN_T_PROD_CAT_EXT of the importing parameter IT_PROD_CAT has a deep nested structure, which contains the category description. The following code snippet shows the generated signatures and interfaces in the source code of the function module:

*" IMPORTING *" VALUE(IT_PROD_CAT) TYPE CUAN_T_PROD_CAT_EXT *" VALUE(IV_ABORT_IF_ERROR) TYPE BOOLE_D DEFAULT 'X' *" EXPORTING *" VALUE(ET_FAILED_PROD_CAT) TYPE CUAN_T_PROD_CAT_EXT *" VALUE(ET_MESSAGES) TYPE BAPIRETTAB

Structure 'CUAN_PRODUCT_CATEG_POST_FLAT'

In function module CUAN_PRODUCT_CATEG_POST_FLAT, the table type CUAN_T_PROD_CAT_EXT_FLAT of the importing parameter IT_PROD_CAT has a flat structure.

CautionIf the table size is too is too big, memory issues occur because the memory is allocated to the entire row length.

The following code snippet shows the generated signatures and interfaces in the source code of the function module:

*" IMPORTING *" VALUE(IV_ABORT_IF_ERROR) TYPE BOOLE_D DEFAULT 'X' *" TABLES *" IT_PROD_CAT TYPE CUAN_T_PROD_CAT_EXT_FLAT *" ET_FAILED_PROD_CAT TYPE CUAN_T_PROD_CAT_EXT_FLAT OPTIONAL *" ET_MESSAGES TYPE BAPIRETTAB OPTIONAL

Error Handling

Error handling is done in the IV_ABORT_IF_ERROR interface, see Import Using RFC [page 95].

102 C U S T O M E RData Management Upload Interfaces 1702

Import Using RFC

Page 103: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

11 Import Using Web Service

You can import interactions, interaction contacts, companies, products, and product categories into your SAP hybris Marketing system using Web services.

11.1 Importing Interaction Contacts Using Web Service

To create or update interaction contacts using web services, the CUANPOSTINTERACTIONCONTACTS service is available. The service provides the PostFlatInteractionContacts operation which is used for function module CUAN_CE_IC_POST_FLAT.

11.2 Importing Interactions Using Web Service

To create or update interactions using web services, the CUANPOSTINTERACTIONS service is available. This service provides the following two operations:

● PostInteractionsThis operation is used for function module CUAN_CE_INTERACTIONS_POST.

● PostFlatInteractionsThis operation is used for function module CUAN_CE_INTERACTIONS_POST_FLAT.

11.3 Importing Companies Using Web Service

To create or update companies using web services, the CUANPOSTICCOMPANIES service is available. The service provides the PostFlatIcCompanies operation which is used for function module CUAN_CE_COMPANY_POST_FLAT.

Data Management Upload Interfaces 1702Import Using Web Service C U S T O M E R 103

Page 104: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

11.4 Importing Products and Product Categories Using Web Service

Products

To create or update products using web services, the CUANPostProducts service is available. This service provides the following two operations:

● PostProductsThis operation is used for function module CUAN_PRODUCTS_POST.

● PostFlatProductsThis operation is used for function module CUAN_PRODUCTS_POST_FLAT.

Product Categories

To create or update product categories using web services, the CUANPostProductCategories service is available. This service provides the following two operations:

● PostProductCategoryThis operation is used for function module CUAN_PRODUCT_CATEG_POST.

● PostProductCategoryFlatThis operation is used for function module CUAN_PRODUCT_CATEG_POST_FLAT.

104 C U S T O M E RData Management Upload Interfaces 1702

Import Using Web Service

Page 105: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

12 Use Cases for Importing Data

You can create interactions that are used to import data to your system, including:

● For interactions that can be used to create newsletter subscriptions, see Import Interactions for Newsletter Subscriptions [page 107]

● For interactions needed for creating or removing marketing permissions, see Import Interactions for Marketing Permissions [page 108]

12.1 Import Contacts with Marketing Permissions from an External Source System

This use case describes how to import interaction contacts in an initial upload from an external source system that already have marketing permissions set.

The OData service CUAN_IMPORT_SRV can be used to create interaction contacts. For this you need a contact, with possibly multiple facets, and the corresponding marketing permissions, all of which are imported in one call.

As a result, it is necessary to create a contact that contains the entities of OData service CUAN_IMPORT_SRV according to the following hierarchy:

● Top Level: ImportHeader● Second Level: Contact● Third Level: ContactFacets and ContactMarketingPermissions

Example:

Max Mustermann, a consumer from a web shop, with web shop account numer 12345, living in Bahnhofstr. 1,Munich 82674, with the mobile number 01511234567 and the email address [email protected] has given permission to be contacted by email but forbidden contact by phone. The following tables outline the properties that are necessary to represent this example:

Table 41: Contact

Property Name Description

ContactId Web shop account number: 12345

ContactIdOrigin ID Origin must be WEB_SHOP_ACCOUNT

FirstName Max

LastName Mustermann

FullName Max Mustermann

Data Management Upload Interfaces 1702Use Cases for Importing Data C U S T O M E R 105

Page 106: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Name Description

GenderDescription Male

IsConsumer TRUE

Timestamp Format: number of milliseconds since midnight Jan 1, 1970. For example: "/ Date(1406014140922)/"

Street From the address: Bahnhofstrasse

HouseNumber From the address: 1

PostalCode 80000

City Munich

Country Germany

Table 42: CONTACT FACET - EMAIL

Property Name Description

ID [email protected]

IDOrigin EMAIL

Table 43: CONTACT FACET - PHONE

Property Name Description

ID 0151634789

IDOrigin MOBILE

Table 44: CONTACT MARKETING PERMISSION - EMAIL

Property Name Description

Id Facet Identifier: [email protected]

IdOrigin Origin of facet identifier (values defined in Customizing view CUANV_CE_ORIGIN): EMAIL

Timestamp Timestamp of facet. Format: number of milliseconds since midnight Jan 1, 1970. For example: "/ Date (1406014140922)/"

OptIn Consent

OutboundCommunicationMedium Communication to which the consent is given: EMAIL

CommunicationDirection Whether the direction of permission is inbound (I) or out­bound (O)

106 C U S T O M E RData Management Upload Interfaces 1702

Use Cases for Importing Data

Page 107: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 45: CONTACT MARKETING PERMISSION - PHONE

Property Name Description

Id Facet Identifier: 0151634789

IdOrigin Origin of facet identifier (values defined in Customizing view CUANV_CE_ORIGIN): PHONE

Timestamp Timestamp of facet. Format: number of milliseconds since midnight Jan 1, 1970. For example: "/ Date(1406014140922)/"

OptIn No Consent

OutboundCommunicationMedium Communication to which the consent is given: PHONE

CommunicationDirection Whether the direction of permission is inbound (I) or out­bound (O)

12.2 Import Interactions for Newsletter Subscriptions

This document describes the use case for creating interactions that are used to create newsletter subscriptions in SAP Hybris Marketing.

The OData service CUAN_IMPORT_SRV can be used to create interactions. If you want to create a newsletter subscription, you must create an interaction using the type NEWSLETTER_SUBSCR. If you want to unsubscribe a contact from a newsletter, you must create an interaction using the interaction type NEWSLETTER_UNSUBSCR. The newsletter ID must be contained in the entity InteractionAdditionalObjectReference.

As a result, it is necessary to create an interaction for both actions, subscribe and unsubscribe, which contains the entities of OData service CUAN_IMPORT_SRV according to the following hierarchy:

● Top Level: ImportHeader● Second Level: Interaction● Third Level: InteractionAdditionalObjectReference (contains the newsletter ID)

If one interaction contact has subscribed to several newsletters simultaneously, it is possible to pass several entries for entity InteractionAdditionalObjectReference for a single interaction record. The following tables outline the properties that are necessary to subscribe or unsubscribe from a newsletter:

Table 46:

Property Name Description

ContactId Email address of the interaction contact

ContactIdOrigin ID Origin must be EMAIL

Data Management Upload Interfaces 1702Use Cases for Importing Data C U S T O M E R 107

Page 108: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Name Description

InteractionType NEWSLETTER_SUBSCR

NEWSLETTER_UNSUBSCR

CommunicationMedium Describes where the subscription occurred, for example, WEB or SYSTEM

Timestamp Specify when the newsletter was subscribed to or unsubscri­bed from

MarketingPermissionCommunicationMedium EMAIL

MarketingPermissionDirection This must be O for Outbound

Table 47:

Property Name Description

ObjectType A newsletter is represented by a communication category, so you must use CUAN_COMMUNICATION_CATEGORY

ObjectID ID of the communication category; length 10

12.3 Import Interactions for Marketing Permissions

This document describes the use case for creating interactions needed for creating or removing marketing permissions in SAP Hybris Marketing.

You can import marketing permissions into the system using interactions either in CSV files or using an OData service.

If you use an OData service, you must create an interaction that contains the entities of OData service CUAN_IMPORT according to the following hierarchy:

● Top Level: ImportHeader● Second Level: Interaction

The following table outlines the properties that are necessary to create or remove marketing permissions using an OData service or CSV file:

Table 48:

Property Name Description

ContactId ID for interaction contact facet, for example, email address for an email permission or phone number for a phone permission

108 C U S T O M E RData Management Upload Interfaces 1702

Use Cases for Importing Data

Page 109: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Property Name Description

ContactIdOrigin ID origin for interaction contact facet, for example, EMAIL, PHONE, MOBILE, or FAX

InteractionType MKT_PERM_OPTIN

MKT_PERM_OPTOUT

CommunicationMedium Describe where the permission was created, for example, WEB or SYSTEM

Timestamp Specify when the permission was given

MarketingPermissionCommunicationMedium Specify what kind of permission will be given, for example, EMAIL, PHONE, or SMS

MarketingPermissionDirection This must be O for Outbound or I for an inbound permission. The default is O. Inbound permissions are only relevant for storing social media posts.

Data Management Upload Interfaces 1702Use Cases for Importing Data C U S T O M E R 109

Page 110: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

13 Appendix

Interactions

In this section, you find an overview of all fields supported for the import of interaction data together with the corresponding description according to structure CUAN_S_CE_IA_EXT.

Within the structure, you can find fields with unspecified names. If you want to use these fields because the available fields with specified names do not meet your requirements, you must ensure that the required additional fields are added in Contacts and Profiles Import Data in SAP Hybris Marketing .

Table 49:

Field (Technical Name) Used in CSV

OData Property What It Contains

ID_ORIGIN ContactIdOrigin The origin of your contact IDs. The origin of an ID indi­cates the source of this ID.

ID ContactId The external IDs of your interaction contact data such as Twitter ID, telephone number.

COMM_MEDIUM CommunicationMedium The communication medium, which is a path to use for communication such as email or text message. The com­munication medium defines by what means, by which path, something happened.

IA_TYPE InteractionType Interaction types such as Click Through, Webinar, Survey Response etc. Interaction types define what happened. They have a direction, inbound or outbound (from contact to system or from system to contact). Additionally, they can have a reason, for example Mailbox is full for the inter­action type Soft Bounce.

TIMESTAMP Timestamp The timestamp in long form (YYYYMMDDhhmmss.mmmuuun). The timestamp refers to the time the interaction took place, not to the time the record was created on the database.

Examples for OData Format:

● Number of milliseconds since midnight Jan 1, 1970. /Date(1406014140922)/

● YY-MM-DDThh:mm:ss

SOURCE_OBJECT_TYPE SourceObjectType The object type of the source object, for example, an op­portunity in SAP Hybris Cloud for Customer.

110 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 111: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

SOURCE_OBJECT_ID SourceObjectId The object ID of the source object, for example, the GUID of the SAP Hybris Cloud for Customer opportunity or the original post ID of the respective social media network (such as TW or FB).

INTERESTS Interests The interaction interests of your contacts. In a deep struc­ture, it is a table, in a flat structure it is identical with INTEREST_ITEM.

● INTEREST_ITEM: interaction interest

● INTEREST_QUANTIFIER: This field is a weighing fac­tor for the interest, which you can use if the standard mechanism of handling interests is not sufficient for your purposes.

● INTEREST_VALUATION: This field contains the senti­ment or opinion of interaction contacts (positive or negative) regarding the interest, which you can use if the standard mechanism of handling valuation is not sufficient for your purposes.

● CUAN_E_CE_IA_INT: Dummy field in extension in­cludeINCL_EEW_CUAN_CE_IA_INTEREST

Data Management Upload Interfaces 1702Appendix C U S T O M E R 111

Page 112: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

PRODUCTS

● OBJECT_TYPE● OBJECT_ID● PRODUCT_QUANTIFIER● PRODUCT_VALUATION● PRODUCT_IMAGE_URL● PRODUCT_NAV_URL● PRODUCT_NAME● PRODUCT_DESC● AMOUNT● QUANTITY● UNIT_OF_MEASURE● PRECO_MODEL_TYPE● PRECO_SYSTEM● IA_PROD_STATUS● IA_PROD_REASON

Products

● ItemType● ItemId● Quantifier● Valuation● ImageUrl● NavigationURL● Name● Description● Amount● Quantity● UnitOfMeasure● RecommendationModelTy

peID● SourceSystemId● Not in ODdata● Not in OData

The interaction products of your contacts. In a deep structure, it is a table. In a flat structure, it is not available.

● This field contains the product origin as defined in Customizing.

● This field contains the ID of the product.● This field is a weighing factor for the product, which

you can use if the standard mechanism of handling products is not sufficient for your purposes.

● This field contains the sentiment or opinion of inter­action contacts (positive or negative) regarding the product, which you can use if the standard mecha­nism of handling valuation is not sufficient for your purposes.

● This field contains the URL of the product image.● This field contains the product details URL containing

images, descriptions and pricing and shipping infor­mation, for example.

● This field contains the name of the product.● This field contains the detailed descriptions of the

product.● This field contains the product amount. The related

currency is located on/in/at the interaction itself.● This field contains the quantity of the product.● This field contains the unit of measure of the product.● This field contains the Product Recommendation

Model Type ID. This field should be filled if an interac­tion is related to a Product Recommendation (Click Through/Conversion).

● This field contains the Product Recommendation Scenario ID. This field should be filled if an interaction is related to a Product Recommendation (Click Through/Conversion).

● This field contains the status of a line item of an inter­action. For information about importing business documents using the OData service CUAN_BUSI­NESS_DOCUMENT_IMP_SRV, see the Importing Business Documents guide at http://

help.sap.com/mkt SAP Hybris Marketing Cloud

SAP Hybris Marketing Cloud Product Page

Integration .● This field contains the reason for changes in the line

item

112 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 113: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

● CUAN_E_CE_IA_PRD: Dummy field in extension in­clude INCL_EEW_CUAN_CE_IA_PRODUCT

TAGS

● TAG_TYPE● TAG:

Tags:

● TagType● Tag

In a deep structure, it is a table. In a flat structure, it is not available.

● This field contains the tag type as defined in Custom­izing.

● This field contains the tag itself.

DIGITAL_ASSETS

● DIGITAL_ASSET_SYSTEM.

● DIGITAL_ASSET_ID.● DIGITAL_ASSET_NAME● DIGITAL_ASSET_MIME_T

YPE● DIGITAL_ASSET_URL:● INITIATIVE_ID

DigitalAssets:

● SourceSystemId● Id● Name● MIMEType● URL● CampaignId

The digital assets. In a deep structure, it is a table. In a flat structure, it is not available.

● This field contains the system of the digital asset.● This field contains the ID of the digital asset.● This field contains the name of the digital asset● This field contains the MIME type of the digital asset

(for example text, image, audio or video).● This field contains the URL where the digital asset is

located● This field contains the initiative ID.● CUAN_E_CE_IA_DA: Dummy field in extension in­

clude INCL_EEW_CUAN_CE_IA_DGTL_ASSET

ADD_OBJ_REFS

● OBJECT_TYPE● OBJECT_ID

AdditionalObjectReferences:

● ObjectType● ObjectId

In a deep structure, it is a table. In a flat structure, it is not available.

● This field contains the type of the object referenced, for example CUAN_OFFER.

● This field contains the ID of the object referenced.

Data Management Upload Interfaces 1702Appendix C U S T O M E R 113

Page 114: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

OFFERS

● OFFER_ORIGIN ● OFFER_ID● OFFER_CONTENT_ITEM_I

D● RECO_SCENARIO

Offers:

● Origin● Id● ContentItemId● RecommendationScenari

oId

The offers. In a deep structure, it is a table. In a flat struc­ture, it is not available.

● This field contains the Indicator for the offer origin used when importing offers from another system, e.g. SAP_PMR for offers from SAP Promotion Man­agement for Retail.

● This field contains the identifier of the offer.● This field contains the ID of the content item of the

offer. Together with Language and CommunicationMedium of the Interaction Header, the offer content can be identified.

● This field contains recommendation scenario ID. If you use Offer Recommendation Intelligence (ORI), this field indicates the recommendation scenario used to recommend this offer.

● CUAN_E_CE_IA_OFR: Dummy field in extension in­clude INCL_EEW_CUAN_CE_IA_OFFER

CAMPAIGN_ID - The ID of a campaign in SAP CRM.

INITIATIVE_ID - The ID of the campaign in SAP Hybris Marketing (formerly initiative).

INI_VERSION - The ID of the campaign version, which is derived from or belongs to the campaign ID. A campaign version is cre­ated for campaigns that are based on dynamic target groups once they are executed.

MARKETING_ORCHESTRATION_ID

- The ID of the campaign content (in SP05, the descriptor of this field was Marketing Engagement ID; renamed to Campaign Content ID in SP06).

LOC_ORIGIN - The origin of your Marketing Location IDs. The origin of an ID indicates the source of this ID.

LOC_ID - The ID of the Marketing Location where the interaction took place such as a Mall or Shop

DIGACC_ID - Digital Account ID, mit der Kontakt aufgenommen wurde

DIGACC_TYPE - The Digital Account Type is the Type of Digital Account ID

QUANTIFIER - This field is a weighing factor, which you can use if the standard mechanism of counting interactions is not suffi­cient for your purposes.

114 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 115: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

VALUATION Valuation The sentiment or opinion of interaction contacts (positive or negative).

IA_STATUS Not in OData Status of an interaction (typically replicated from a busi­ness document).

For information about replicating SAP Hybris Cloud for Customer business documents to SAP Hybris Marketing interactions using the OData service CUAN_BUSI­NESS_DOCUMENT_IMP_SRV see the Importing Busi­ness Documents guide at http://help.sap.com/mkt

SAP Hybris Marketing Cloud SAP Hybris Marketing

Cloud Product Page Integration .

IA_REASON Reason The potential reasons for an interaction, for example, the soft bounce of an email due to a recipient's full mailbox.

IA_LANGUAGE Not in OData Language of the text of the interaction. This can differ from the user’s language. It can be used for example in newsletters.

IS_ANONYMOUS IsAnonymous Information as to whether an interaction is anonymous or not. Anonymous interactions do not refer to a contact person.

AMOUNT Amount An amount of money which is related to an interaction. The amount is concatenated to the field CURRENCY.

CURRENCY Currency The currency which is related to an interaction. The cur­rency is concatenated to the field AMOUNT.

MKT_PERM_DIRECTION MarketingPermissionDirection

Direction of the marketing permission information of an interaction contact per communication medium (I = in­bound or O = outbound)

MKT_PERM_COMM_MEDIUM MarketingPermissionCommunicationMedium

The marketing permission information of an interaction contact per communication medium. For example, an in­teraction contact has given consent to be contacted via email.

LATITUDE Latitude The latitude of a geographical location where the interac­tion took place.

LONGITUDE Longitude The longitude of a geographical location where the inter­action took place.

UNIT - This field is obsolete. Do not use.

Data Management Upload Interfaces 1702Appendix C U S T O M E R 115

Page 116: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

SRID SpatialReferenceId Spatial Reference Identifier is a unique value used to un­ambiguously identify projected, unprojected, and local spatial coordinate system definitions. Defines, where lati­tude and longitude belong.

DEVICE_FT Device Name of the device used in this interaction

SOURCE_SYSTEM_TYPE SourceSystemType The type of system which stores the raw data or detailed information such as a clickstream monitoring tool.

SOURCE_SYSTEM_ID SourceSystemId The ID of the system which stores the raw data or detailed information such as a clickstream monitoring ID.

SOURCE_OBJECT_ADD_ID SourceObjectAdditionalId The external object ID of the source object, for example, the ID of the SAP Hybris Cloud for Customer opportunity.

SOURCE_OBJECT_STATUS_CODE

- Information about the status of the source object such as Completed for a SAP Hybris Cloud for Customer opportu­nity.

SOURCE_DATA_URL SourceDataUrl The navigation URL of the source object, for example, the URL of a Twitter post.

SOURCE_TIMESTAMP Not in OData of the Import Serv­ice but inOData of Business Documents

Timestamp of the source object in the source system

For example, the timestamp when a contract was created in the source system. This is different from the timestamp of the last change date of the contract.

For information about importing business documents us­ing the OData service CUAN_BUSINESS_DOCU­MENT_IMP_SRV, see the Importing Business Docu­

ments guide at http://help.sap.com/mkt SAP Hybris

Marketing Cloud SAP Hybris Marketing Cloud Product

Page Integration .

LAUNCH_URL StartingPointUrl The starting point URL of an interaction such as a link in an email of a campaign for interaction type CLICK_THROUGH.

LAUNCH_TEXT StartingPointText The text of the starting point URL of an interaction such as the link text "More Information" in an email of a cam­paign for interaction type CLICK_THROUGH.

LAUNCH_LINK_KEY - The key of the starting point URL of an interaction such as the key of the link in an email of a campaign for interaction type CLICK_THROUGH that an interaction contact has clicked.

116 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 117: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

IC_UPDATE_MODE - Values defining how an interaction contact is to be up­dated. The allowed values are N (= no update), F (= full update), or D (= delta update).

CONTENT_TITLE ContentTitle The title of the respective content, for example, email subject or the social media post (abbreviated). If the con­tent title is empty, the field is filled with the content data (see field CONTENT_DATA).

CONTENT_DATA ContentData The content of an email or a social media post.

NAME_TEXT - The full name of the interaction contact (first name and last name).

NAME_FIRST - The first name of the interaction contact.

NAME_LAST - The last name of the interaction contact.

TITLE - The key for the title of the interaction contact such as 0001.

TITLE_FT - A free text for the title of the interaction contact.

COUNTRY - The country key of the interaction contact such as DE, US.

COUNTRY_FT - A free text for the country the interaction contact.

REGION - The region key of the interaction contact such as 08, CA.

REGION_FT - A free text for the region of the interaction contact.

CITY1 - The name of the city of the interaction contact.

POSTCODE1 - The postal code of the city of the interaction contact.

STREET - The street of the interaction contact.

HOUSE_NUM1 - The house number of the interaction contact.

LANGUAGE - The language key.

LANGUAGE_FT - A free text for the language.

SEX - The key for the sex of the interaction contact such as 1, 2, … .

SEX_FT - A free text for the sex of the interaction contact.

Data Management Upload Interfaces 1702Appendix C U S T O M E R 117

Page 118: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

MARITAL_STATUS - The key for the marital status of your interaction contacts such as 01, 02.

MARITAL_STATUS_FT - A free text for the marital status of the interaction con­tact.

CONSUMER_ACCOUNT_ID - The account ID of a consumer in B2C.

KUNNR - The account ID of a company in B2B.

COMPANY_NAME - A free text for the company of your interaction contacts.

BRSCH - This field contains the industry key of your interaction contacts.

BRSCH_FT - A free text for the industry of your interaction contacts.

ABTNR - The department key of your interaction contacts.

ABTNR_FT - A free text for the department of your interaction con­tacts.

PAFKT - The function key of your interaction contacts.

PAFKT_FT - A free text for the function of your interaction contacts.

SMTP_ADDR - This field contains the SMTP address of the email ad­dress.

TELNR_LONG - This field contains the long version of a telephone number including dialing code, number, and extension.

Format: +country code region code + phone number e.g. +49151123456

TELNR_MOBILE - The long version of a mobile phone number including dial­ing code, number, and extension.

Format: +country code region code + phone number e.g. +49151123456

FAXNR_LONG - The long version of a fax number including dialing code, number, and extension.

Format: +country code region code + fax number e.g. +49151123456

DATE_OF_BIRTH - The date of birth of an interaction contact.

118 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 119: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV

OData Property What It Contains

IS_CONTACT - Information as to whether an interaction contact is a con­tact or not.

IS_CONSUMER - Information as to whether an interaction contact is a con­sumer or not.

OBSOLETE - Information as to whether an object is obsolete or not.

EMAIL_OPTIN - Information as to whether an interaction contact allows to be contacted by email or not, or if this information is not available.

PHONE_OPTIN - Information as to whether an interaction contact allows to be contacted by landline phone or not, or if this informa­tion is not available.

MOBILE_OPTIN - Information as to whether an interaction contact allows to be contacted by mobile phone or not, or if this information is not available.

FAX_OPTIN - Information as to whether an interaction contact allows to be contacted by fax or not, or if this information is not available.

POSTAL_OPTIN - Information as to whether an interaction contact allows to be contacted by mail or not, or if this information is not available.

WEB_URI - A Web address that is related to a company, for example.

IMAGE_URI - A Web address that is related to a contact image.

CUAN_E_CE_IA_RT - Dummy field in extension include INCL_EEW_CUAN_CE_IA_ROOT

CUAN_E_CE_IA_IC_RT - Dummy field in extension include INCL_EEW_CUAN_CE_IA_IC

Products

In the following, you find an overview of all fields supported for the import of product data together with a corresponding description according to structure CUAN_S_PRODUCT_EXT.

Within the structure, you find fields with unspecified names. If you want to use these fields since the available fields with specified names do not cover your requirements, you must ensure the required additional fields are added in Contacts and Profiles Import Data in SAP Hybris Marketing the .

Data Management Upload Interfaces 1702Appendix C U S T O M E R 119

Page 120: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 50:

Field (Technical Name) Used in CSV

OData Property What It Contains

PRODUCT_ORIGIN IdOrigin This field contains the origin of a product indicating the source of this product such as SAP Hybris Commerce Product.

The allowed values are defined in Customizing for SAP Hybris

Marketing under Data Management Interaction Contact

Person .

PRODUCT_ID Id This field contains the external product ID from the source of this product.

IMAGE_URL ImageUrl This field contains a URL to an image of the product.

NAV_URL NavigationURL This field contains a URL to the details of the product.

DESCRIPTIONS

● LANGU ● NAME● DESCRIPTION

Descriptions:

● Language● Name● Description

This is a component with a table containing the following fields:

● This field contains the language key of the product de­scription.

● This field contains the name of the product such as MR-750.

● This field contains the actual description of the product such as The MR-750 computer provides 32 GB RAM.

CATEGORIES:

● HierarchyId● CategoryId

Categories:

● HIERARCHY_ID● CATEGORY_ID

This is a component with a table containing the following fields:

● This field contains the external ID of the hierarchy data to which the product is assigned.

● This field contains the external ID of the category data to which the product is assigned.

Product Categories

In the following, you find an overview of all fields supported for the import of product data together with a corresponding description according to structure CUAN_S_PROD_CAT_EXT.

Within the structure, you find fields with unspecified names. If you want to use these fields since the available fields with specified names do not cover your requirements, you must ensure the required additional fields are added in Contacts and Profiles Import Data in SAP Hybris Marketing the .

120 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 121: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Table 51:

Field (Technical Name) Used in CSV

OData Property What It Contains

HIERARCHY_ID HierarchyId This field contains the external ID of the hierarchy data to which the product category is assigned.

CATEGORY_ID Id This field contains the ID of the product category.

PARENT_CATEGORY_ID

ParentCategoryId This field contains the ID of a category that serves as the pa­rent for another category.

CATEGORY_DESCRIPTIONS

● LANGU ● NAME● DESCRIPTION

Category Descriptions:

● Language● Name● Description

This is a component with a table containing the following fields:

● This field contains the language key of the product cate­gory description.

● This field contains the name of the product category such as Stationery.

● This field contains the actual description of the product category such as Stationery includes pens, erasers, ink cartridges.

Interests

The following table contains an overview of all fields supported for the import of interest data, together with the corresponding description according to structure CUAN_S_INTEREST_EXT.

Table 52: Interests

Field (Technical Name) Used in CSV OData Property What It Contains

INTEREST_ITEM Id This field contains the interest ID, such as SAP_HYBRIS_MARKETING.

DESCRIPTION:

● SPRAS● INTEREST_ITEM_DESC

● Language● Description

This is a component with a table contain­ing the following fields:

● This field contains the language key of the product description.

● This field contains the actual de­scription of the interest, such as BIG DATA.

Data Management Upload Interfaces 1702Appendix C U S T O M E R 121

Page 122: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Field (Technical Name) Used in CSV OData Property What It Contains

CATEGORIES :

● HIERARCHY_ID● CATEGORY_IDC

AssignedProductCategories

● HierarchyId● Id

This is a component with a table contain­ing the following fields:

● This field contains the hierarchy ID of the product category.

● This field contains the product cate­gory ID.

TAGS :

● TAG_ORIGIN● TAG_TYPE● TAG

Not in OData This is a component with a table contain­ing the following fields:

● This field contains the origin of the tag (currently set to SAP_HDB_TA)

● This field contains the tag type as defined in Customizing. Tag types are used in the text analysis of en­tity types.

● This field contains the tag itself.

122 C U S T O M E RData Management Upload Interfaces 1702

Appendix

Page 123: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

Important Disclaimers and Legal Information

Coding SamplesAny 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.

AccessibilityThe information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.

Gender-Neutral LanguageAs far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet HyperlinksThe 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. All links are categorized for transparency (see: http://help.sap.com/disclaimer).

Data Management Upload Interfaces 1702Important Disclaimers and Legal Information C U S T O M E R 123

Page 124: Data Management Upload Interfaces 1702 - SAP · Data Management Upload Interfaces 1702. ... The OData service CUAN_BUSINESS_DOCUMENT_IMP_SRV should be used to ... subdomain can also

go.sap.com/registration/contact.html

© 2017 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.