cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

External Web Service Integration for Marketing Permissions in Contacts (BusinessPartner)

0 Kudos
526

Hello Experts,

I want to create marketing Permission Channels for Contacts automatically when the contact is created.

for this we need to apply an external web service integration.

1- I have downloaded the WDSL File: ManageMarketingPermissionIn

https://help.sap.com/http.svc/rc/8ed4581a228646178e4f8cc38b0cf951/1808/en-US/PSM_ISI_R_II_MANAGE_MKT...

2- Created a communication scenario (MarketingPermission.csd)

3- in root.node created an Event-BeforeSave.absl with the following code:

import ABSL;


var Request : Library::ETMarketingPermissionWS.MaintainBundle.Request;
var Response: Library::ETMarketingPermissionWS.MaintainBundle.Response;


var requestEntry : Library::ETMarketingPermissionWS.MaintainBundle.Request.MarketingPermissionBundleMaintainRequest_sync.MarketingPermission;
var channel : Library::ETMarketingPermissionWS.MaintainBundle.Request.MarketingPermissionBundleMaintainRequest_sync.MarketingPermission.ChannelPermission;
var customer = Customer.Retrieve(this.InternalID);
if (!this.InternalID.IsInitial())
{
	requestEntry.BusinessPartnerInternalID = this.InternalID;
	requestEntry.actionCode = "01";

	
	channel.actionCode = "01";
	channel.CommunicationMediumTypeCode = "FAX";	
	channel.MarketingPermissionCode = "3";
	
	requestEntry.ChannelPermission.Add(channel);

	
	Request.MarketingPermissionBundleMaintainRequest_sync.MarketingPermission.Add(requestEntry);
	
         Response = Library::ETMarketingPermissionWS.MaintainBundle(Request, " ", "MarketingPermission");
		
}


But still not able to add the marketing permission to my contact...

in the debug it goes through all the code but the response is still 0.

Have I missed something here??

View Entire Topic
0 Kudos

I have found the problem, the code was correct, the problem was in the Communication Scenario, I defined an Outbound service but did not define an Inbound Service (which should be: ManageMarketingPermission), now it is working well.

Thanks...