- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GetCustomerProfile Fails
Hi,
I am trying to get all the customers profiles and using
I am getting message: Multiple records found. Please refine search options.
Can anyone suggest me how will I get the customerprofileId and paymentProfile Ids when I have only email and duplicate profiles exist in the CIM?
Thanks.
โ12-16-2018 10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not just save customerProfileId in your db alongside email?
โ12-17-2018 04:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @webacers19
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.
Happy Coding!
Kaushik
โ12-26-2018 03:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @kikmak42,
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.
Thanks.
โ12-30-2018 07:01 PM - edited โ12-30-2018 07:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @webacers19
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!
Kaushik
โ01-01-2019 09:54 PM - edited โ01-01-2019 09:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks!!
โ01-01-2019 10:31 PM