cancel
Showing results for 
Search instead for 
Did you mean: 

GetCustomerProfile Fails

Hi, 
I am trying to get all the customers profiles and using 

GetCustomerProfileRequest. However there are duplicate profiles exist with the same email and cc information and my request to GetCustomerProfileRequest is failing. 
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. 
webacers19
Member
5 REPLIES 5

Why not just save customerProfileId in your db alongside email?

Waterhouse
Contributor

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 

kikmak42
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

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. 

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

kikmak42
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

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!!