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

Hybris Marketing: Marketing Permission in different countries to one contact

0 Likes
888

Hello experts,

can one of you give me ideas for an implementation in Hybris Marketing?

It should be possible to assign a contact to several marketing permissions in different countries.

Example:

Mr. Heinz Petersen lives in Germany. But has granted the marketing permission in Germany and additionally in Spain and France.

The requirement arises because registration via a user name and password is to be possible in various country shops and all this is bundled into one contact in marketing. Unfortunately, the CUAND_CE_MP_ROOT has no country flag.

But only marketing areas, but these taxes only the authorizations of the keyuser or?

I hope someone can help me.

System: Hybris Marketing 1709 SP1 (On Prem)

Accepted Solutions (1)

Accepted Solutions (1)

former_member267312
Contributor

Hi Malte,

As you have already described it: marketing areas are part of marketing permissions and this exactly how you can achieve what you're trying to do. You should load your marketing permissions with marketing areas. In your case you'd need to set up marketing areas per country (e.g. Germany, Spain, France etc). It is recommended to make use of the new API API_MKT_CONTACT to be able to load marketing permissions with marketing areas.

Furthermore, kindly read through Best Practices for Data Separation by Marketing Area

Hope this helps.

BR

Theo

Answers (3)

Answers (3)

KunalBansal
SAP Champion
SAP Champion

Dear Süßmann,

Could you first check if note #2595318 is there in your system?

Meanwhile, I will check the scenario in the internal system.

Thank you.

Best Regards,

Kunal

0 Likes

I have a problem with the nesting.

I want to add the MP to the contacts at the same time. But strangely enough, this does not go down well with the OData service.

Here's what I'm handing over to service with the PI.

<?xml version="1.0" encoding="UTF-8"?>
<batchParts>
    <batchChangeSet>
        <batchChangeSetPart>
            <method>PUT</method>
            <ContactOriginData>
                <ContactOriginData>
                    <ZZ1_TITLE_ACA1_MPS>
                    </ZZ1_TITLE_ACA1_MPS>
                    <ZZ1_PaybackNR_MPS>
                    </ZZ1_PaybackNR_MPS>
                    <ZZ1_NAME_CO_MPS>
                    </ZZ1_NAME_CO_MPS>
                    <StreetName>bahnstr.</StreetName>
                    <PhoneNumber>
                    </PhoneNumber>
                    <OriginDataLastChgUTCDateTime>2018-08-28T10:24:49</OriginDataLastChgUTCDateTime>
                    <MobileNumber>+49179999990</MobileNumber>
                    <LastName>Süßmann</LastName>
                    <Language>D</Language>
                    <GenderCode>2</GenderCode>
                    <FirstName>Malte</FirstName>
                    <EmailAddress>test@me.com</EmailAddress>
                    <Country>DE</Country>
                    <ContactPostalCode>55555</ContactPostalCode>
                    <ContactOrigin>Z_CSV_IMPORT</ContactOrigin>
                    <ContactID>Test2</ContactID>
                    <CityName>test</CityName>
                    <BirthDate>20.02.1988</BirthDate>
                    <AddressHouseNumber>22</AddressHouseNumber>
                    <MarketingPermissions>
                        <MarketingPermission>
                            <CommunicationDirection>O</CommunicationDirection>
                            <PermissionUTCDateTime>2018-08-28T10:24:49</PermissionUTCDateTime>
                            <ContactPermission>Y</ContactPermission>
                            <CommunicationCategory>1</CommunicationCategory>
                            <CommunicationMedium>EMAIL</CommunicationMedium>
                            <MarketingArea>GLOBAL</MarketingArea>
                            <ContactPermissionOrigin>EMAIL</ContactPermissionOrigin>
                            <ContactPermissionID>test@me.com</ContactPermissionID>
                            <ContactOrigin>Z_CSV_IMPORT</ContactOrigin>
                            <ContactID>Test2</ContactID>
                        </MarketingPermission>
                    </MarketingPermissions>
                </ContactOriginData>
            </ContactOriginData>
        </batchChangeSetPart>
    </batchChangeSet>
</batchParts>

Here's what's in the log later.

--batch
content-type: multipart/mixed; boundary=changeset_d76f4014-26d3-4031-a48e-d46bf17635f4


--changeset_d76f4014-26d3-4031-a48e-d46bf17635f4
content-type: application/http
content-transfer-encoding: binary


PUT ContactOriginData(ContactOrigin='Z_CSV_IMPORT',ContactID='Test2') HTTP/1.1
Content-Length: 1687
Accept: application/atom+xml
Content-Type: application/atom+xml


<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://IP:9000/sap/opu/odata/SAP/API_MKT_CONTACT_SRV/">
<id>http://ip:9000/sap/opu/odata/SAP/API_MKT_CONTACT_SRV/ContactOriginData(ContactOrigin='Z_CSV_IMPORT',ContactID='Test2')</id>
<title type="text">ContactOriginData</title>
<updated>2018-08-28T10:06:49.488+02:00</updated>
<category term="API_MKT_CONTACT_SRV.ContactOriginData" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme">
</category>
<link href="ContactOriginData(ContactOrigin='Z_CSV_IMPORT',ContactID='Test2')" rel="edit" title="ContactOriginData">
</link>
<content type="application/xml">
<m:properties>
<d:ContactOrigin>Z_CSV_IMPORT</d:ContactOrigin>
<d:ContactID>Test2</d:ContactID>
<d:BirthDate></d:BirthDate>
<d:OriginDataLastChgUTCDateTime>2018-08-28T10:06:49.0000000</d:OriginDataLastChgUTCDateTime>
<d:FirstName>Malte</d:FirstName>
<d:LastName>Süßmann</d:LastName>
<d:CityName>test</d:CityName>
<d:StreetName>bahnstr.</d:StreetName>
<d:AddressHouseNumber>22</d:AddressHouseNumber>
<d:Language>D</d:Language>
<d:EmailAddress>test@me.com</d:EmailAddress>
<d:PhoneNumber>
</d:PhoneNumber>
<d:MobileNumber>+49179999990</d:MobileNumber>
<d:Country>DE</d:Country>
<d:GenderCode>2</d:GenderCode>
<d:ContactPostalCode>5555</d:ContactPostalCode>
<d:ZZ1_NAME_CO_MPS>
</d:ZZ1_NAME_CO_MPS>
<d:ZZ1_PaybackNR_MPS>
</d:ZZ1_PaybackNR_MPS>
<d:ZZ1_TITLE_ACA1_MPS>
</d:ZZ1_TITLE_ACA1_MPS>
</m:properties>
</content>
</entry>
--changeset_d76f4014-26d3-4031-a48e-d46bf17635f4--
--batch--

The contact was created but the part with the MP is completely missing...

former_member267312
Contributor
0 Likes

Hi Malte,

Are you sure that your marketing area is "GLOBAL" and not for example "CXXGLOBAL"? Please double-check in "manage your solution". Furthermore, CommunicationCategory should include leading zeros.

maik.offerle anything to add?

BR

Theo

0 Likes

The marketing area ID is "GLOBAL". That's standard. I inserted the leading zeros, but still the same result.

Even if it should be incorrect, I would expect it to be displayed at least in the trace tool and not truncated in the request.

With "cuan_import_srv" it was all a bit easier 🙂

former_member267312
Contributor
0 Likes

Hi Malte,

Please make sure to follow the payload example:

Creating Contacts with Marketing Permissions and Subscriptions

https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/1805.500/en-US/39e1b76b82274b5697ff629d...

MarketingPermissions is a separate entity and not part of ContactOriginData.

This might solve your problem.

0 Likes

Thank you for your answers and suggestions.

I have looked at the API_MKT_CONTACT. Unfortunately, I miss the Z fields that I added in the structure INCL_EEW_CUAN_CE_IA_IC.

Do I have to revise/adapt the API_MKT_CONTACT?

former_member267312
Contributor
0 Likes

Did you extend the data model using the "Custom Fields & Logic" app? It is not recommended to enhance the ABAP structures manually.

With the Custom Fields & Logic app you have the option to make the new custom field available in the OData service (by enabling the corresponding options in the "Reports & UI" tab.

Ah, thank you.

I had still used the "old" variant of append.

Thank you for your support