How to avoid adding duplicate customers

Reza Zareian Fard asked on May 19, 2015 13:45

Hi there, is there anyway to avoid duplicate customers being added just like how we merge contacts? For example if couple of fields are the same (like the firstname, lastname, etc.) I want to use existing customer instead of creating a new one. Regards, Reza

Recent Answers


Charles Matvchuk answered on May 19, 2015 18:32

You could use Global Events and check before save ?

0 votesVote for this answer Mark as a Correct answer

Reza Zareian Fard answered on May 20, 2015 06:35

Hi Charles,

Thanks for your reply.

Yes we can do that but I was asking to know if there is any out of the box solution for it or not?

Seems that we have to do some coding for it and there is no functionality like contact auto-merge for it right?

0 votesVote for this answer Mark as a Correct answer

Josef Dvorak answered on May 20, 2015 12:17

Hello Reza,

You are right, there is currently no functionality for this. Usually this is not a problem, because the Customer is tied to a User account which must have an unique email address. Duplicate customer records are usually created only if the Customer selects anonymous checkout as guest, in which case the Customer records are separated on purpose.

The best place to merge the Customer with code is before the Order is submitted, for example in method FinalizeCheckout of class CMSCheckoutWebPart. If you detect the Customer is new, and has no ID, you can do a look-up of existing Customers based on the submitted email address, and substitute the Customer if you find a match.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.