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

Upload interface - change of an email

SauMaris
Contributor
951

Hi!

We are on on-prem version 1709 SP01 and have consumer data uploaded from external system with an old service cuan_import_srv.

In the source system it is allowed for consumers to change their email, which is their primary id. Email replacement working in the Marketing before, but now we are getting an error, because only one email is allowed per customer:

Update of SAP_HYBRIS_CONSUMER-e20f94b5-93f2-442e-83cc-d80484 data with 'EMAIL-aa@gmail.com' rejected; contact already has ID 'EMAIL-bb@gmail.com'

Is using the import BADI only option here or is there a standard way how to let the service to replace the email in such cases? As it seems to me, service wants to add a new email, but we want it to replace existing.

Shame that it was working earlier, but now it does not.

Accepted Solutions (0)

Answers (4)

Answers (4)

vervinckt_joyca
Active Contributor

Two imported customers with different email addresses but with all other attributes completely the same were merged in the past. Presumably by system error or bug.

-> I just want to add here that a report exists that might even be running in a job that is capable to perform such a merge on purpose (so not a system error or bug), it's report CUAN_CE_IC_TRIGGER_EIM and also the Cloud version has a dedicated application job for this. (you can read this reports description in the "i" button in SE38 if you want details on its working, but it can do a merge if there is an exact same name + gender + date of birth or name + address for example).

Other than that I don't know how you could look up other cases in the same scenario either...

Kr,

Joyca

SauMaris
Contributor
0 Likes

Thanks, Joyca!

I checked in our system and luckily no job has been ran for this report. Tried to import two contacts with same attributes except email in our current version and they were not merged. That was a reason for a conclusion that it is not happening anymore.

SauMaris
Contributor
0 Likes

Was digging more and got to the following situation.

Marketing receives a customer from hybris commerce with an id and email. Nothing else. After some time hybris commerce sends customer data with addresses, name, phone and with with the same email as previous, but different id. System merges both hybris commerce id's in to one and enriches the golden record.

After some time customer changes email address in the hybris commerce. Marketing system is not able to handle the situation, because only one email address is allowed - error is issued and email is not changed.

How this situation should be handled? Apparently it has changed with a version 1709 SP01, because earlier the existing email address would be set as obsolete and new address added. It is not happening anymore, because of merged records. Is that a bug?

sven-eric_eigemann
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Maris,

seems as the configuration doesn't fit to your needs.

It seems as origin EMAIL is configured as one per contact = true which is rather unusual.

The default configuration is EMAIL one-per-contact= false and also shareable = true
which means one contact may have multiple emails and one email address may belong to multiple contacts.

With the presumed configuration the system reacts correctly.

Hope that helps.

Best regards, Sven

SauMaris
Contributor
0 Likes

That is true that only one email per customer is allowed, because email address is customer's id in the hybris commerce. That is also a reason why we don't allow email sharing between accounts. It has to be unique in the system.

We don't want a customer to have an old email address in the facets, because it has been changed in the source system. It does not exist there anymore. We don't want marketing system to send marketing campaign emails to both addresses.

Technically customer can register a new account with the old email address, because it is not registered in the commerce.

sven-eric_eigemann
Product and Topic Expert
Product and Topic Expert
0 Likes

Coming back to your description:
"Marketing receives a customer from hybris commerce with an id and email. Nothing else. After some time hybris commerce sends customer data with addresses, name, phone and with with the same email as previous, but different id. System merges both hybris commerce id's in to one and enriches the golden record."

Question is: why does commerce send two records with different IDs. This is (from marketing perspective) the root cause and I don't understand the process and reason for that.

Workaround could be, to configure the commerce-origin one-per-contact=true, so the system wouldn't merge the records. However that leaves a duplicate, which again brings us back to the question, why commerce sends to records with different IDs...

SauMaris
Contributor
0 Likes

Commerce is sending duplicate records because "guest" check-outs are allowed, where customer can do a pick-up checkout anonymously by just leaving an email. To avoid duplicates, it is fine that they are merged as they belong to the same customer, but bad that email change is not possible anymore for the "golden record". Well, it was possible before 1709 SP01.

vervinckt_joyca
Active Contributor

Hi Maris,

Two ideas:

1) how are you interfacing commerce and marketing? If it's Expressway, default it uses CUAN_IMPORT_SRV to interface as it doesn't know if you're already using a marketing version with the new API's. There's some way to tell it to use the new API's; and the new API's support "PATCH" mode to update data. Maybe a change in e-mail address is handled as a PATCH, but it's just a guess.

2) Normally it shouldn't be a problem if a person's old mail address is kept in SAP Marketing as a second facet (so to allow more than one = true). The mail will only be sent to the mail address that is kept on the golden record in the root table. If your origin priorities are well defined, the newer mail address should be the one that gets persisted in the golden record and will be the one to receive all the mails. The old one will still be there as identifier so if you ever still get some data on the old email address (maybe from other channels than commerce where the person still uses his other mail address) then they can still be matched.

Hope this can help;

Joyca

SauMaris
Contributor
0 Likes

Yes, we are still using the old service.

Problem is that switching to the new service is not that simple, it is a mini project requiring investment. Until now this was working the way we wanted. It stopped after the upgrade.

SauMaris
Contributor
0 Likes

Found a job executing a report PROG_HPA_SA_CONTROL. That one is triggering something called POST_IMPRT_CLEANSING.

Found it by looking in to SLG1 logs.

Following log made me suspicious

'Check and merge candidates for merge' was 00:00:01 (hh:mm:ss)
1 origin IDs of 1 contact(s) were checked for merge
Merge of 2 contact(s) occurred 1 time(s)

Shall I stop the job or do you know a way how to influence what data is used for merging?

Maris

SauMaris
Contributor
0 Likes

It is clear now what is happening there. Two imported customers with different email addresses but with all other attributes completely the same were merged in the past. Presumably by system error or bug. Now one of these merged records is making an update and system is refusing to do that, if golden record has an email address from another record.

No idea how to find all these records or to fix them.