This article will explain how you can integrate SAP Commerce and Emarsys through CPI.

This post can be helpful for things like Customer Register or any Item Type of SAP Commerce. We will show an approach with the out-of-the-box (OOTB) features.

This blog was built in 3 parts:

    1. Requirement – SAP Commerce set up with information from CPI;

 

    1. Integration Object setup;

 

    1. Test.

The proposal is through the store (Spartacus) to make a register of customers, capture the event with Integration Object and send it to CPI.

In CPI, we will set up the Emarsys authentication (WSSE) and create a map of fields after sending it to Emarsys.

To CPI setups and Emarsys information, access the post Integrating SAP Commerce and SAP Emarsys using Cloud Integration post by d.pietroniro.

In Emarsys, we are going to check the information sent from CPI.

 

Data Flow

 

 


1.1 Firstly, we need CPI credentials and the URL of the public endpoint. In our sample, we used Basic Credentials.

1.2 Go to SAP Commerce Backoffice of SAP Commerce

1.3 Going to the vertical menu, select Basic Credentials and add a new Basic Credential.

1.4 Put the credential generated in CPI

OK. We have the CPI credentials saved in our SAP Commerce.

We are going to save the public endpoint shared by CPI.

1.5 Again, in the vertical Backoffice menu, click on Consumed Destinations

1.6 Add the public endpoint according to the following image

1.7 Select the credential created before

1.8 Test the endpoint from CPI and check if the green message is shown.

With that steps, you have a connection with CPI.

 


2.1 At the top of Commerce, select Integration UI Tool.

To see the full extensions list necessary for this resource, click here Integration Object – Extensions.

 

2.2 Click on ‘Create Integration Object’ button

2.3 Define the name according to the context; in our case, Customer, I give the name ‘ioCustomer’ (i= Integration o= Object)

2.4 Select which Item Type of Commerce you need to capture the information; in our case, the Customer

2.5 After creating the ioCustomer, you can select the created IO.

2.6 Will be available many attributes; in our case, we selected the first level (Customer) and two attributes: ‘contactEmail’ and ‘customerID.’

2.7 Choose also the attribute that will have a unique value.

2.8 Now, you will create the Webhook; this functionality “allows SAP Commerce to send notifications to a configured destination URL when an item is saved (created or updated) or deleted.”

To see more information about Webhook, click here Webhook

2.9 In the vertical menu, select Webhook, following click on the plus button (CreateWebhookConfiguration)

2.10 In droplists, select the ‘ioCustomer,’ previously created; select ‘sendCustomer2CPI’, previously created in 1.6 item; select Event Type, in our case, ‘Item Saved.’

‘Item Saved’ events will trigger all time that object Customer went changed.

 

 

 


3.1 In our post, we are using Spartacus. “Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud. Spartacus talks to SAP Commerce Cloud exclusively through the Commerce REST API.”

3.2 We choose the electronics store

It is not necessary to use Spartacus because what triggers the event is the Commerce platform.

3.3 Click on ‘Sign/ Register’

3.4 Considering that you are a new user, select ‘Register’.

3.5 Fill in all required fields and click on ‘Register’

3.6 Return to SAP Commerce, select the perspective ‘Integration UI Tool again.’

3.7 In the vertical menu, click on ‘Monitoring → Outbound.’

3.8 The submission record must be available with a success status.

 

If the transaction is not available, put in local.properties of SAP Commerce the properties below:

 

inboundservices.monitoring.success.payload.retention=true
inboundservices.monitoring.error.payload.retention=true
inboundservices.monitoring.enabled=true

outboundservices.monitoring.success.payload.retention=true
outboundservices.monitoring.error.payload.retention=true
outboundservices.monitoring.enabled=true

3.9 If you’ve set up the CPI with Emarsys, is it possible to check your register in Emarsys

 

 

 


This work was done with my buddy d.pietroniro to explore SAP Commerce’s OOTB features for integration.

I will bring in future posts  SAP Commerce integrations directly with Emarsys.

Also, take the time to visit my colleague d.pietroniro profile to find out more information about Integrating SAP Commerce and SAP Emarsys using Cloud Integration.

And I encourage you to visit the SAP Emarsys Commerce Cloud Integration blogs to read other posts on this topic and the SAP Emarsys Commerce Cloud Integration questions to post and answer questions.

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x