7

Export Customer data from Marketing Cloud to CPI Data Stores through Open Channe...

 1 year ago
source link: https://blogs.sap.com/2022/05/15/export-customer-data-from-marketing-cloud-to-cpi-data-stores-through-open-channel/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
May 15, 2022 4 minute read

Export Customer data from Marketing Cloud to CPI Data Stores through Open Channel

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.

Export-Definition-1.png

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.

BADI_1-1.png

Write below code to implement open channel.

BADI_2-1.png

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.

BADI_3.png

Select Open channel Filter.

We can manipulate data like below example in BADI.

BADI_4.png

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.

BADI_5.png

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.

Iflow_1.png

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

iflow_2.png

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.

CA_1.png

And give iflow Endpoint in Service url:

CA_2.png

Save.

How to Test the functionality

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

CAMP_1-1.png

And select Export Definition which we created to export data.

CAMP_2.png

Run the Campaign.

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

RESULT1.png

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.

Thanks.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK