cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Marketing Cloud API_MKT_CONTACT_SRV "Attribute COMM_MEDIUM is initial."

hackbu
Participant
0 Kudos

I am trying to use API_MKT_CONTACT_SRV_0002 in order to trigger EMAIL permissions for specific contacts. A double opt-in process should be used in this case. Via Postman I execute a POST request to

/ContactOriginData(ContactOrigin='{ContactOrigin}',ContactID='{ContactID}')/MarketingPermissions

I add the following body to the request:

{
 "ContactID": "FA163EA081591EDAB48400496484FXXX",
 "ContactOrigin": "SAP_HYBRIS_MKT_IC",
 "ContactPermissionOrigin": "EMAIL",
 "ContactPermissionID": "contacts.email@test.com", 
 "ContactPermission": "Y",
 "MarketingArea": "CXXGLOBAL",
 "CommunicationMedium": "EMAIL",
 "CommunicationCategory": "",
 "IsConfirmationRequired": true
}

Since I am adding the IsConfirmationRequired property, the double opt-in process should be triggered. However, this is not the case. I think the issue is because EMAIL communication medium is not considered. The pre opt-in interactions shows that it was created for WEB instead for EMAIL:


Postman returns 201. Only when I change the IsConfirmationRequired property to false, it gives me some error which hints for the communication medium:


It seems like there must be some other property for the communication medium which needs to be added. Or the service implementation is not correct because I would suppose that the CommunicationMedium property is mapped to the COMM_MEDIUM field.

Any SAP responsible who can help me with this?

BR
Christian

Accepted Solutions (1)

Accepted Solutions (1)

SCHNEIDERT
Active Contributor

Hi Christian,

sorry for the late feedback.

I checked in our scenario what is delivered by a form that we have on the website. There the permissions section in the json for the contact looks like that:

"MarketingPermissions": [{
 "ContactPermissionID": "test@test.de",             
"ContactPermissionOrigin": "EMAIL",
 "MarketingArea": "CXXGLOBAL",            
"CommunicationMedium": "EMAIL",             
"ContactPermission": "N",             
"PermissionUTCDateTime": "2020-10-26T13:45:01+01:00",             
"CommunicationDirection": "O",             
"PermissionIsExplicit": true,             
"IsConfirmationRequired": false,
"PermissionNoteText": ""

What CPI deliveres to MC looks like that:

            <d:ContactPermission>Y</d:ContactPermission>
            <d:CommunicationDirection>O</d:CommunicationDirection>
            <d:ContactPermissionID>test@test.de</d:ContactPermissionID>
            <d:PermissionSourceCommMedium>WEB</d:PermissionSourceCommMedium>
            <d:MarketingArea>CXXGLOBAL</d:MarketingArea>
            <d:CommunicationMedium>EMAIL</d:CommunicationMedium>
           <d:ContactID>test@test.de</d:ContactID>             
<d:PermissionNoteText></d:PermissionNoteText>
            <d:IsConfirmationRequired>false</d:IsConfirmationRequired>             <d:PermissionUTCDateTime>2020-10-26T13:45:51.0000000Z</d:PermissionUTCDateTime>
            <d:PermissionIsExplicit>true</d:PermissionIsExplicit>
            <d:ContactPermissionOrigin>EMAIL</d:ContactPermissionOrigin>
            <d:ContactOrigin>EMAIL</d:ContactOrigin>

So there are a few differences between that payload and yours which might be interesting: The WEB Communication Medium that you see in your interaction is set through the PermissionSouceCommMedium, not CommunicationMedium. So you might enhance your payload with that.

In addition to that we have the CommunicationDirection = O for outbound. And we hand over the Timestamp.

Maybe you can check these things if it has any impact on your scenario. Let me know if it didn't help, so that I can investigate further.

BR Tobias

hackbu
Participant
0 Kudos

Hey Tobias,

thank you for the info! Adding the PermissionSouceCommMedium property helped...
Works as expected now.

BR
Christian

SCHNEIDERT
Active Contributor
0 Kudos

Great, glad to hear that it works! 🙂

Answers (2)

Answers (2)

SCHNEIDERT
Active Contributor

Hi Christian,

just to make sure: Did you do the needed changes in Customizing before? By default for the interaction type MKT_PERM_OPTIN_PRE there are only SYSTEM and WEB maintained as communication medium. Maybe that leads to your error?

Otherwise I have to investigate further and reproduce that issue. But maybe that helps.

BR Tobias

hackbu
Participant
0 Kudos

Hey schneidert,

EMAIL is also assigned to the Pre OptIn Interaction:

Interactions still created for Web...

Is there some other customizing which I may miss?

Thank you & BR
Christian

hackbu
Participant
0 Kudos

Any outbound marketing permissions to be maintained or is this only relevant for the actual contact then?

hackbu
Participant
0 Kudos

Is it necessary to change the status of the customizing in order to apply the changes or is this just for overview purposes?

SCHNEIDERT
Active Contributor
0 Kudos

hackbu,

hm okay... I think I have to reproduce that to analyze further. This was just the first thing that came into my mind.

The Status you have to set if you want to transport your settings to P system.

The outbound communication medium has to be maintained to define, how a contact permission is handled. So, e.g. if you set it to Explizit for Germany for EMAIL like in your screenshot, the contact with Country DE has to give his explicit permission for E-Mail to be contacted.

BR Tobias

SCHNEIDERT
Active Contributor

hackbu another question: do you always use the Origin SAP_HYBRIS_MKT_IC ?

I never used that one and don't know if it may have something to do with your problem, but as you can see in the description for the origin in customizing it "is not allowed for usage".

So, regardless of your original problem, I would recommend to use another Origin.

hackbu
Participant
0 Kudos

schneidert

That's right that I should use another origin. However, I also tried it with EMAIL and got exactly the same issue. I will try other setups today but for me the error message about the initial communication medium sounds strange since I 100% fill the CommunicationMedium property...

former_member226
Employee
Employee

Hello,

Did you check the activity "Assign Contact ID Origins to Communication Media" contains an entry for your used origin ID? if not then you might need to add a corresponding combination there.

config.png

hackbu
Participant
0 Kudos

The assignment is also added. So this can not be the reason as well...