cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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??

douglas_rohmann
Employee
Employee
0 Kudos

Hello Rami,

What is the request you are passing to receive the response as 0?
Is there any error message in the response?

Best regards,
Douglas

0 Kudos

Hello Douglas,

There is no error message in the response, it is just not taking the request.

in the request I fill the MarketPermission data as in the code I posted, and pass the request through my CommunicationScenario.

In the image bellow you see the request (Black arrow) and the response (Red arrow)

Kind regards,

Rami

Accepted Solutions (1)

Accepted Solutions (1)

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...

Answers (0)