SAP Marketing Cloud Extensibility

Size: px
Start display at page:

Download "SAP Marketing Cloud Extensibility"

Transcription

1 Customer Extensibility Guide SAP Marketing Cloud Document Version: SAP Marketing Cloud Extensibility

2 Document History Version Date Change Initial Version Remove usage of eclipse Document History 2018 SAP SE or an SAP affiliate company. All rights reserved. 2

3 Table of Contents 1 Purpose of this Document Extending SAP CRM CRM Enhancement with Application Enhancement Tool (AET) IDoc Generation Partner Profile Change Download WSDL for New IDoc Type Adapt WSDL File Extending SAP Marketing Cloud Extensions in SAP Cloud Platform Integration Adapt the Configuration of the Integration Flow Upload the WSDL File to SAP Cloud Platform Integration Generate XSD for the Target Structure Adapt the Mapping Metadata Adapt the Field Mapping Table of Contents 2018 SAP SE or an SAP affiliate company. All rights reserved. 3

4 1 Purpose of this Document This document is intended as a how-to guide for customers and partners who are facing the requirement to add custom fields to SAP CRM, and to make those fields available in the integrated Marketing solution. As a sample use case, this guide shows how to add a custom field in the lead header in SAP CRM, and what needs to be covered for the replication of the information via SAP Cloud Platform Integration, and SAP Marketing Cloud. All described functionality is available with release Purpose of this Document 2018 SAP SE or an SAP affiliate company. All rights reserved. 4

5 2 Extending SAP CRM 2.1 CRM Enhancement with Application Enhancement Tool (AET) On SAP CRM side, the application enhancement tool is available to adapt SAP CRM application according to customer needs. This chapter describes how to use the Application Enhancement Tool to add a customer field. For more information about the application enhancement tool, see Calculated Field. To perform the extension on SAP CRM side, log on to your SAP CRM system, and start the Web UI. On the Web UI, in the right upper corner, click Personalize. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 5

6 The Personalization page is displayed. Under Settings, click Personalize Settings. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 6

7 In Personalize Settings, ensure that Enable configuration mode is activated. Save the settings and navigate either to the screen Create Lead or display a lead. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 7

8 After you made the personalization settings, in the right upper corner, a new icon is displayed. When clicking the gearwheel icon, the screen is shown in configuration mode and all areas that can be enhanced with customer fields are highlighted when moving mouse over it. In this guide, the lead details area is enhanced with an additional flag. For this purpose, the lead details area must be clicked while the configuration mode is switched on. As a result, the View Configuration pop up is displayed. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 8

9 In theview Configuration pop up, select the component name for the lead detail (first entry in the table), and choose Create Field. In the next step, decide which Business Object you want to enhance, and choose the corresponding line. In this case, Lead is extended. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 9

10 On the next screen, enter the package name to that all programming objects will be assigned to and select the part of the Business Object to which the field is added. In this example, LEAD_H is selected. Confirm this step with OK. In the next step, enter the details of the new field. Mandatory properties are Field Label and Field Type. In this example, a flag with the label CRM TEST FLAG is created. Dependent on the field type, further properties like the length and decimals can be entered. Additionally, it is also possible to enter a check table or a search help to provide the user help to enter data. Under the item translation, the field label can be entered in different languages so that the field label is displayed in the user s log-on language. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 10

11 With Back, you confirm the entered data, and go back to the View Configuration Screen. On the View Configuration Screen, choose Save and Generate. In the background, the new field is generated in DDIC, and in the BDoc structures. Caution Make sure that Generate is activated for your enhancement. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 11

12 On the main configuration screen, you have switch to edit mode via the edit icon. Make sure that the first line in the configuration table is selected. Choose Show All Fields. On the left side, a pane is displayed to search for the available fields. In the search field, enter the field label name of the new field, CRM TEST FLAG. The field is displayed under Available Fields. Mark the customer field and click + to move the customer field to the lead data screen. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 12

13 The customer field is now available on the lead screen for input and the input is stored on the database. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 13

14 2.2 IDoc Generation The enhancement is now available on the screen, the database, and on the BDoc. The IDoc that is used for the communication to SAP Marketing Cloud is not extended yet. To extend the IDoc, in the SAP CRM backend system, call transaction BDFG. You can create a new IDoc type as reference to the old one, but with the new customer field. Enter the function module CRMXIF_ORDER_ SAVE, and the Business Object Type BUS Choose the Create icon. In the pop up, enter a new name for the IDoc type, the package for the development objects, the function modules for output, and for input processing and its function groups. Confirm this step with OK. Caution The function groups are not created when you enter it in the pop up. The entered function group must exist in the system. You can create a function group with transaction SE80. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 14

15 Release the IDoc type using transaction WE30 in the SAP CRM backend system. Enter the IDoc type as Obj. Name. In the Edit menu, choose Set Release. Confirm the pop with Yes. 2.3 Partner Profile Change For the connection to SAP Cloud Platform Integration, a partner profile setting is maintained. In this partner profile, you have to exchange the IDoc type CRMIF_ORDER_SAVE_M with the newly created IDoc type that contains the customer field. You can exchange the IDoc types with the transaction WE20 in the SAP CRM backend system. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 15

16 2.4 Download WSDL for New IDoc Type For the SAP Cloud Platform Integration field mapping, the metadata of the new IDoc type must be downloaded. Use the report SRT_IDOC_WSDL_NS and enter the new created IDoc type as message type and its basic type. Choose F8 to download the WSDL file. Note You can start a report with the transaction SE38 in the SAP CRM backend system. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 16

17 2.5 Adapt WSDL File To upload the WSDL file to you SAP Cloud Platform Integration mapping, several changes of the content of the WSDL file are necessary. The changes are necessary to ensure that the existing field mappings do not get lost. Open the WSDL file with a text editor, and remove the target namespace from the schema element as shown below Replace all occurrences of tns: with empty value. Add maxoccurs attribute to the IDOC element to support bulking as in the original mapping. Extending SAP CRM 2018 SAP SE or an SAP affiliate company. All rights reserved. 17

18 3 Extending SAP Marketing Cloud Each maintained extensibility feature is available in the SAP Fiori App Custom Fields and Logic of business catalog role Extensibility (SAP_BCR_CORE_EXT). Extensions, such as field extensions, are created as local objects in the test system. The transport of extensions takes place in the SAP Fiori Apps Manage Software Collection of business catalog role Software Collection Export (SAP_BCR_CORE_SL_EXP) and Import Software Collection of business catalog role Software Collection Import (SAP_BCR_CORE_SL_IMP). When opening Manage Software Collection in the test system, a list of changed, deleted, and new objects is shown. You can decide to release those objects to production. The system immediately creates a transport of copies and releases this transport. In the production system, you open Import Software Collection to finally import the extensions. 1. Log on to the SAP S/4HANA Cloud System and open the app Marketing Extensibility. 2. Click the link Create Custom Fields. Extending SAP Marketing Cloud 2018 SAP SE or an SAP affiliate company. All rights reserved. 18

19 3. Choose Create and enter the values for the new fields. The Business Context must be Marketing: Interaction. Enter also a label, a technical identifier and a tooltip. In the described case, the type is a checkbox. To finish the dialog, choose Create. 4. Publish the new field by selecting it and choose Publish. Extending SAP Marketing Cloud 2018 SAP SE or an SAP affiliate company. All rights reserved. 19

20 4 Extensions in SAP Cloud Platform Integration 4.1 Adapt the Configuration of the Integration Flow Launch SAP Cloud Platform Integration Web UI and navigate to your package that contains the Integration Flow (IFlow) connecting the SAP CRM system, and your SAP Marketing Cloud system. Navigate to artifacts. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 20

21 On the very bottom, the Integration Flow CRM_OneOrder_Replication_Confirmation_yMKT_EXT is listed. Click on the right action button to this integration flow and choose Configure. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 21

22 On the configuration screen, select the link parameters to go to the parameters screen. Enter the IDoc name that you generated (see IDoc Generation) in the field IdocType. Choose Save. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 22

23 4.2 Upload the WSDL File to SAP Cloud Platform Integration The WSDL file prepared in Adapt WSDL File needs to be uploaded to the Integration Flow. Click the name of the Integration Flow CRM_OneOrder_Replication_Confirmation_yMKT_EXT. On the details screen of the Integration Flow, choose Edit. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 23

24 On edit screen, choose tab Resources, navigate to Add Schema WSDL, and upload the file created in Adapt WSDL File via file system upload. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 24

25 4.3 Generate XSD for the Target Structure To adapt the target structure of the message mapping according to the extension described in chapter Extending SAP Marketing Cloud, click the name of the IFlow CRM_OneOrder_Replication_Confirmation_yMKT_EXT. On the details screen of the IFlow, choose Edit. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 25

26 Select the OData connection to the target system and switch to tab Adapter Specific. On the Adapter Specific tab choose Select. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 26

27 Ignore the message Unable to get edmx file content. Choose Remote as Connection Source. On screen Connection to System, enter the address of you SAP Marketing Cloud system followed by the path for the OData service. Enter an appropriate authentication method and credentials and choose Step 2. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 27

28 On screen Select Entity & Define Operation, choose the appropriate Operation and Entity. Select Sub Level 5 and select all fields including your extension fields. Choose Finish to generate the XSD file for the target structure. Choose Yes on screen XSD Generation. Notes With No, the metadata for the target structure will be replaced automatically. We recommend replacing the metadata manually as described in Adapt the Mapping Metadata. This will preserve the existing metadata file for the target structure. In case you choose Yes, take notice of the popup which appears, it shows the name of the generated XDS file. Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 28

29 4.4 Adapt the Mapping Metadata The metadata for the source and target structure of the mapping needs to be adapted. For that you have to navigate to the mapping MM_IDOC_CRMXIF_ORDER_SAVE_M_to_CUAN_BD_IMP. In the mapping, click on the pencil icon on the source or target message: Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 29

30 On the Source and Target Messages screen, on the Source Messages, click the Replace Message icon, and upload the IDoc Type WSDL file that you already have in Download WSDL for new IDoc Type. On the Target Messages, click again the Replace Message icon and select the XSD file created in the previous step. Confirm this step with OK. After a structure files for the source and target message are replaced successful, the customer fields you created are displayed and can be mapped. Choose OK to accept the change in the structure. 4.5 Adapt the Field Mapping Back on the graphical mapping screen, adapt the field mapping according to your need. After the mapping is completed, close the graphical mapping screen with OK and save the IFlow as new version. To activate you modified integration Flow, choose Deploy. Notes In the mapping, the field label is NOT available, but the technical field name is. Deploying the modified IFlow will overwrite an already deployed version of the IFlow in the runtime area! Extensions in SAP Cloud Platform Integration 2018 SAP SE or an SAP affiliate company. All rights reserved. 30

31 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 for additional trademark information and notices.