Skip to Content
Product Information

SAP Marketing Cloud Integration with Adobe Experience Manager (AEM)

Integration between systems is a key element for increasing the efficiency of your company’s processes and operations. It also enhances the productivity of your teams. We recently released an integration plugin for Adobe Experience Manager (AEM), which helps you facilitate and accelerate the data flow between SAP Marketing Cloud and AEM.

The plugin shipped with useful features that make life easier for marketers. They can build AEM Forms that are fully integrated with SAP Marketing Cloud, which allows personalization of the AEM Forms and the immediate submission of data. A wide range of components are shipped with the plugin, which are easily assigned to AEM Forms. These include contact fields, marketing permission objects and marketing interactions. In addition, you can enhance components with your own business-specific custom objects.

The aim of this blog is to illustrate the basic configuration steps within in each system and finally test our integration with a simple newsletter subscription scenario.

You need to prepare the following systems before going through the tutorial:

  1. SAP Marketing Cloud 1902
  2. SAP Cloud Platform Integration (CPI)
  3. Adobe Experience Manager (AEM) version 6.3

I used the following systems during authoring of this blog:

SAP Marketing Cloud Release: 1902
SAP Cloud Platform integration Build number: 2.50.13
Adobe Experience Manager Release: 6.3.0

 

Setup SAP Marketing Cloud

Setup the API authorization

In this step, we setup the technical user to enable the communication between the integration adapter and SAP Marketing Cloud, as follow:

1. Log on with the Administrator role to SAP Marketing Cloud.

2. Open the Maintain Communication Users app.

3. Click on New and enter a User Name (for example, CPI_MKT_INBOUND), a Description and a Password.

Note: To keep the tutorial simple, Basic Authentication is used. However for productive usage we recommend to use Certificate based or OAUTH 2.0.

4. Press Create.

5. Navigate back to the main cockpit and open the Communication Systems app.

6. Click on New

7. Assign System ID and System Name and then click Create.

8. In the window that opens, set the Host Name. E.g. CPI

9. Scroll down and within User for Inbound Communication click the add Icon ( + ).

10. Search for and assign the Communication User you created in the previous steps.

11. Press Ok and then Save.

12. Navigate to the main Cockpit and open the Communication Arrangements app.

13. Press New and in the window that opens select SAP_COM_0342 (Marketing – External Landing Page Data Integration).

14. Press Create.

15. In the Communication Arrangement section, select the Communication System that you created in the previous steps.

16. The User Name is assigned automatically. if not, you can select the user that we already created.

Make a note of the following URLs and the user name and password. We need them later to configure the Integration Adapter.

  • https://<YourTenant>.ondemand.com/sap/opu/odata/sap/API_MKT_LANDING_PAGE_SRV
  • https://<YourTenant>.ondemand.com/sap/opu/odata/sap/

Define Origin of Contact in SAP Marketing Cloud

You can use the Default Origin, which is SAP_HYBRIS_CONSUMER. However, It is recommended that you define a Contact Origin for the contact that is generated in AEM. You can find out more here. I setup an Origin with id: Z_AEM_FORM.

Make a note of the Contact Origin as you need to assign it during the AEM Plugin configuration as Contact Origin field.

We are now finished with configuring SAP Marketing Cloud. Let’s configure the landing page integration middle ware powered by SAP CPI.

 

Configure Landing Page Adapter on CPI

The AEM plugin relies on the External Landing Page Integration Adapter for data transformation and communication with SAP Marketing Cloud. The adapter makes it easier for you to integrate your External Landing Pages with SAP Marketing Cloud and all tasks related to mappings, buffering and data transformations are done automatically inside the adapter. The adapter provides an endpoint to make a single call for the creation of Marketing Contacts along with Permissions, interactions and even your own custom fields.The fetching of prefilled data is also handled by the Adapter.

Let’s setup the adapter before configuring the AEM Plugin.

Add Credentials to CPI Tenant

1. Logon to your SAP Cloud Platform Integration Tenant.

2. Navigate to the Operations view.

3. Open Security Material.

4. Click Add and then User Credentials.

5. Assign artifact Name, User and Password. User and Password are part of the Communication User that we created in previous steps.

Make a note of the credential Name as you need to assign it to all Integration Flows.

Download and Configure the Integration Adapter

1. Open the Discover section.

2. Search for “landing page” and click on “External Landing Page Data Integration with SAP Marketing Cloud”.

3. At the top right click on Copy.

4. Navigate to the Edit Section and click on the “External Landing Page Data Integration with SAP Marketing Cloud” package.

5. Open the Artifacts tab.

For each of the Integration flows assign the corresponding settings based on the table below.

Integration Flow Tab Configuration Property Configuration Value
Create External Landing Page in SAP Marketing Cloud Receiver Address https://YourTenant.ondemand.com/sap/opu/odata/sap/API_MKT_LANDING_PAGE_SRV/
Create External Landing Page in SAP Marketing Cloud Receiver Credential Name credential Name
Create Landing Page Data in SAP Marketing Cloud Receiver Credential Name credential Name
Create Landing Page Data in SAP Marketing Cloud More ServiceBaseURL https://YourTenant.ondemand.com/sap/opu/odata/sap/
Get Personalization Data from SAP Marketing Cloud Receiver Adapter Type: SAP_MKT_IA/ Credential Name credential Name
Get Personalization Data from SAP Marketing Cloud More ServiceBaseURL https://YourTenant.ondemand.com/sap/opu/odata/sap/
Retry Loading Buffered Data to SAP Marketing Cloud Receiver Address http://YourTenant.ondemand.com/sap/opu/odata/sap/API_MKT_CONTACT_SRV/$metadata
Retry Loading Buffered Data to SAP Marketing Cloud Receiver Credential Name credential Name

Once the configurations assigned, press Save and then Deploy.

After successful deployment, all deployed Integration Flows are available in the Overview section under Manage Integration Content. Please check whether the Status is Started, which indicates deployment was successful.

Make a note of the Endpoint of following artifacts:

  • Create Landing Page Data in SAP Marketing Cloud
  • Create External Landing Page in SAP Marketing Cloud

You need to assign them in the AEM Plugin configuration as Service URL and MetaData Service URL respectively.

Deploy AEM Plugin Mapping to CPI Partner Directory

The CPI Adapter is responsible for transformation of data to the SAP Marketing Cloud Schema. For that you need to deploy the mapping file to your tenant Partner Directory by following these steps:

Generate the Base64 of the Mapping File.

1. Open the integration package and then click the Documents tab.

2. Download this file: Mapping for AEM Plugin.

3. Before uploading the mapping to CPI Partner Directory, you need to generate a Base64 encoding of the zip file. You can freely use any Base64 generator, such as free online tool.

4. Upload the zip file into the Encoder(Base64 generator) and press Encode.

Note down the generated Base64 encoding.

Fetch CSRF Token of CPI Tenant

Hint: To perform API calls on the CPI Partner Directory, your user needs to be a member of AuthGroup.TenantPartnerDirectoryConfigurator group.

Open an HTTP Client, for example, Postman and make a HTTP Call with the following parameters:

Service URL

https://<Tenant Management Node>.ondemand.com/api/v1/BinaryParameters

Request Haeader: Authorization Your credentials
Request header: X-CSRF-TOKEN Fetch

After a successful call (response code: 200 OK), note the value from the response X-CSRF-TOKEN header.

Submit Mapping into the Partner Directory:
Make another HTTP Call with the following parameters:

Service URL https://<Tenant Management Node>.ondemand.com/api/v1/BinaryParameters
Method POST
Request Header: Authorization Your credentials
Request Header: X-CSRF-TOKEN X-CSRF-TOKEN header value of previous call.
Request Header: Content-Type application/json
Payload
Payload:{"Pid":"<Directory ID>","Id":"<Parameter ID>","ContentType":"zip","Value":"<Encoded Zip File>"}

Upon a successful call (response code: 201 Created),

Note down the values of Pid and Id, as you need to assign them in AEM Plugin configuration as Partner Directory ID and Mapping ID respectively.

Download and Install the AEM Plugin

1. open Adobe Experience Cloud Marketplace.

2. Search for ‘SAP Marketing Cloud‘.

3. Open the plugin catalogue.

You can download the Plugin user guide from the Installation section.

4. Press Get App, which opens the Adobe Package share.

5. Press Download and Install.

6. Open AEM Packages and press install.

7. Press Install.

Now we need to extract the schema file which, is needed for prefilling the AEM Form.

8. Click Download.

9. Extracted the Zip file and copy the Standard_Schema.xsd from /jcr_root/schema folder.

Configure the Plugin

1. Open AEM Cloud Services.

2. Scroll down to find SAP Marketing Cloud Plug-In and click on “Configure now“.

3. Enter a Title for the service and press Create.

4. Configure the Cloud Service based on the parameters that you noted (written in green color) during the configuration. User and Password are the credentials of CPI run-time tenant.

5. Press Connect to SAP CPI to check the connection and correctness of credentials.

For a successful call, you will receive the following message which indicates both calls to CPI was correct.

Create a Form

The plugin is shipped with out-of-the-box Form components that makes creation of the SAP Marketing compatible forms much easier for you. Follow this steps to create a simple Form including contact fields along with a marketing permission.

1. From the main menu of AEM open Forms.

2. Choose Forms & Documents.

3. From top right, click Create and then choose Adaptive Form.

4. From list of the available templates choose SAP Marketing Cloud Template and press Next.

5. Enter the title.

6. Open Form Model.

7. From the Select Form drop-down choose Schema.

8. Upload the Schema that you already extracted from the package ZIP file.

9. Select the Data root node.

10. Press create and open the Form in Edit Mode.

After the initial installation of the Plugin the Form Components are not available. Follow these steps to activate the Component group.

1. From top right choose Design.

2. From the Grid Layout choose the Parent icon   and then Configure

3. The Panel Design window opens. Choose the SAP MKT Form Component.

 

4. Switch back from Design to Edit mode.

Now you are able to add the Plugin components to the form.

Some components such as Permissions and Interactions have extra settings that you can configure by double-clicking on the Component.

1. Double-click on Drag components here and choose your desired fields.

I have created a sample Form with contact fields and an Email Permission:

17. Drag and drop the Submit button from the SAP MKT Form Component group. You can also define the Marketing Area within the Properties of the button.

18. Open the Form Container properties by moving the cursor to the bottom of the Form and double-click on Adaptive Form container [Root].

19. Assign the following settings in the properties section:

 

Assign Cloud Service to the Form

You need to assign a Cloud Service to the Form to achieve data exchange between the AEM Form and SAP CPI.

1. Open the Form properties.

2. Open the CLOUD SERVICES tab.

3. From dropdown choose “

4. Press Save & Close.

In this step, you can test the Form data Submission in remove Preview mode.

5. Publish the Form.

After publishing the Form, the Plugin sends the form metadata to SAP Marketing Cloud and creates it as a Landing Page object within the Content Studio.

Hint: If you do not see the Form in Marketing Cloud, the issue might be from private key replication issue between the AEM Author and Publish instance. Please check the troubleshooting section of Plugin user guide to solve it.

End-to-End test

Now it’s time to test the integration with a sample newsletter subscription scenario.

1. Create a Newsletter within SAP Marketing Cloud.

2. Insert a Landing Page Link into the Newsletter and select the created AEM Form.

3. Press Test Email.

4. Assign an email address.

5. Open the inbox and open the email that was sent.

6. Click on the link that points to the AEM Form.

The AEM Form opens immediately and is prefilled with Contact and Permission Data from SAP Marketing Cloud. The contact identification is based on the URL parameter: sap-outbound-id, which is automatically generated and attached to the Landing Page/Form URL during the Marketing Campaign execution.

You can modify the Form data and then press Submit. The contact with updated fields from the AEM Form is instantly available in SAP Marketing Cloud!

Done! we finished with configuration and end-to-end test. The scenario described here can be enhanced in many ways, here are few example:

  1. You can enhance the Form with other contact fields and permissions such as SMS, Mobile, etc.
  2. You can add Marketing Interaction Components. With a single submission, contact fields, permissions and interactions are immediately available in SAP Marketing Cloud.
  3. You can flexibly define your own custom AEM Components and make them available in SAP Marketing cloud by enhancing the extensibility and SAP CPI mapping.
  4. You can include the Form in an AEM Page to offer a more harmonized experience within your website.

Movie time!

 

 

Further Resources:

Integration user guide for Landing Page Adapter

Be the first to leave a comment
You must be Logged on to comment or reply to a post.