Introduction

Sometimes we have to see our customers better and to take a deeper look at their behavior on our websites.

So we can export the Customer data based on the created Campaign in Marketing Cloud into CPI Data Stores.

Using below steps you can export the Marketing Cloud Customer data into CPI Data Stores

based on the created Campaign.

This scenario is handled using Open Channel concept.

We create Open Channel Export Definitions in Marketing Cloud to export the required fields.

And we can manipulate the data based on requirement through Open Channel BADI.

After this we get the data and push it to CPI Data stores.

Implementation

1.Create Export Definition to export the required fields.

Go to Marketing Cloud.

Step 1:

Open app Export Definition.

Create New, give Definition, Select Open Channel usage, Select Segmentation Profile and

select File Export as Export Profile service id like shown in below screenshot.

Save.

 

 

Step 2:

There are 3 BAdi’s available to implement this export data functionalities.

2.1 . Open Channel: Define Implementation

– Export Table IMPLEMENTATIONS

–  Each entry in the table IMPLEMENTATIONS represents a campaign action.

–  It will appear in the campaign UI in the menu of button “Add Action”.

–  The ID is used as filter value in the next enhancements of ‘Campaign Open Channel’.

–  The ID is mandatory and has to start with character Z, e.g. ZOC_EXPORT.

Open app ‘Custom Fields and Logic’.

Create ‘+’ button and create New Open Channel Implementation.

Select Campaign as Business Context, Select (1)Open Channel:Define Implementation as  BAdi Description and give Implementation Description like shown in below screenshot.

Click Create.

Write below code to implement open channel.

APPEND VALUE #( implementation = ‘ZOC_EXPORT’

implementation_name              = ‘Customer Export’

icon_name                            = ‘Customer_Export’

communication_medium            = ‘PAPER’ ) TO implementations.

 

Save Draft and Publish.

 

Step 2.2:

We can manipulate the incoming data as per requirement in Open Channel BADI.

Implement BADI enhancement called “Open Channel: Enhance Payload for Data Transfer” and define the implementation.

This enhancement is called during campaign execution in the phase ‘Processing of package’ of the open channel action.

 

Open app ‘Custom Fields and Logic’.

Click Create ‘+’ button with (4) Open-Channel Enhance Payload for Data Transfer like shown in below screenshot.

Select Open channel Filter.

We can manipulate data like below example in BADI.

LOOP AT target_group_member_status ASSIGNING FIELD-SYMBOL(<ls_target_group_member_stat>).

**Read Origin data

READ TABLE target_group_member_data ASSIGNING FIELD-SYMBOL(<ls_origin>)   WITH KEY

tg_member_key = <ls_target_group_member_stat>-tg_member_key   attribute_id  = ‘DA-_SAP_CF_CE_CONTACT_IA_ERP_CUST-IC_ID_ORIGIN’.

lv_origin = <ls_origin>-attribute_value.

if lv_origin = ‘EMAIL’.

**Modify data

APPEND VALUE #( tg_member_key = <ls_target_group_member_data>-tg_member_key tg_member_interaction_contact =

<ls_target_group_member_data>-tg_member_interaction_contact

tg_member_interaction = <ls_target_group_member_data>-tg_member_interaction attribute_id

= ‘DA-_SAP_CF_CE_CONTACT_IA_ERP_CUST-IC_ID_ORIGIN’ attribute_value = “WEB” ) TO target_group_member_data.

endif.

ENDLOOP.

Save and publish.

 

Step 2.3:

Open Channel: Define Global Settings for Execution

– Called during campaign execution in the phase ‘Prepare Processing’ of the open channel action.

– With this parameter you can define the number of target group members processed in one package.

Open app ‘Custom Fields and Logic’.

Click Create ‘+’ button with  ‘(3) Open Channel: Define Global Settings for Execution’ like shown in below screenshot.

 

 

 

Save and Publish.

Step 3:

Iflow:

We need to create a iflow to receive the data in packages of size 1000.

So all the packages are stored in data store with given name.

HTTP Connections with user Role.

We have to pass the Data Store name to store in CPI .

Save and Deploy the iflow.

We have Endpoint URL now.

 

Step 4:

Communication Arrangement

We need to created Communication Arrangement to assign Iflow Endpoint URL to get data into iflow.

Go to app Communication Arrangement

Create New with SAP_COM_0049 – Marketing – Campaign Execution – Open Channel Integration

Select Implementation ID, Create Communication system and select with SSL Certificate and Outbound Communication.

 

And give iflow Endpoint in Service url:

Save.

 

How to Test the functionality

To test the feature, go to app Campaign and create a campaign with created Action of Export.

And select Export Definition which we created to export data.

 

Run the Campaign.

Once Campaign successfully finished we can see the data in CPI Data Stores like below.

Conclusion

It exports data periodically like daily or weekly once or etc.. as mentioned in iflow configuration as required.

Please share yours thoughts ,any questions or feedback by leaving a comment below.

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