12-16-2018 10:12 PM
I am trying to get all the customers profiles and using
12-26-2018 03:23 AM
One can request getCustomerProfile with emailId instead of CustomerProfileId and internally we do a search and return you the result. This feature was introduced later as per our community request, but the responsblity of unique email for each customer profile remains with the integrator. Thus if there exist multiple CustomerProfile with the same email you will need to use CustomerProfileId to get the Profile.
Ideally while creating the CustomerProfile with same email you should check if a CustomerProfile already exists with the email and if it exists use the same CustomerProfile and not create a new one.
12-30-2018 07:01 PM - edited 12-30-2018 07:03 PM
Thanks for the reply.
I understand that when creating customer profile, I should check for existing profile and create only if no profile exist for the same email. However I am working on middle of a project where these multiple profiles has already been created. Hence I am getting the above error.
Is there any method available which can filter out the latest profile from these multiple profiles?
Please let me know.
01-01-2019 09:54 PM - edited 01-01-2019 09:55 PM
I understand the scenario you are in, one option I can think of if you have used merchantCustomerId along with email while creating the CustomerProfiles, and if the combination of these two is unique you can get the CustomerProfile by sending both the fields in GetCustomerProfile.
If that also doesn't work, I don't think so there is an easy way for you, you will need to get the CustomerProfile using CustomerProfileId only, and if you have not stored that you can use GetCustomerProfileIds API to get all the CustomerProfiles iterate through each and update the CustomerProfiles so that you have a single CustomerProfile against each email id.
Hope this Helps!
01-01-2019 10:31 PM
Thanks @kikmak42 for the reply.
Unfortunately we don't have merchantCustomerIDs set and we have about 10000s of records so it will be not easy way to iterate through those.
Anyways I will try and let you know if I need further help.