Reply
Highlighted
Member
Posts: 6
Registered: ‎12-05-2018

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. 
Highlighted
Contributor
Posts: 15
Registered: ‎12-10-2018

Re: GetCustomerProfile Fails

Why not just save customerProfileId in your db alongside email?

Highlighted
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: GetCustomerProfile Fails

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 

Highlighted
Member
Posts: 6
Registered: ‎12-05-2018

Re: GetCustomerProfile Fails

[ Edited ]

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. 

Highlighted
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: GetCustomerProfile Fails

[ Edited ]

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

Highlighted
Member
Posts: 6
Registered: ‎12-05-2018

Re: GetCustomerProfile Fails

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