Duplicate check from web-to-lead form

I have several web-to-contacts forms but there is one problem with tem - duplicates. If one person fills 2 different forms i need SuiteCRM to understand that it is ONE person and not create 2 different contacts (just create relationships - but it is another problem). How can i do it? Key fields for contacts are first, last names and birthday.
Help me please!!

It is not clear what you are trying to achieve.

Are the forms related to the same campaign? Do they carry different information?

. Would you like to check if a lead already exists as a lead with the same first, last names and birthday? (match just one or all or a combination of these)?
. Would you like to check if a lead already exists as a contact with the same first, last names and birthday? (match just one or all or a combination of these)?

What do you want to do with the “duplicate lead”?
. delete it
. keep part of the information it carries? What information and where do you want to store it?

How do you want to handle situations where two different persons have the same name/surname/birthday date or the same of a combination of these?


Please explain withouth ambiguities otherwise it will be impossible to help.

In any case I think you should be able to do all you need with a workflow without having to code.

You can use the dupli finder tool.

Hi! Thanks for your answer.
I’ll try to explain more detailed. I have module “Events”. And for every event i should have a form for registration. For example, event “Literature evening” and event “Musical evening”. A person can once register in “Literature evening” and then the CRM should create a contact of this person ( in module “Contacts”) and relationship with Events module ( that shows that a person was registred to the evening). Then this very person some time later will register in “Musical evening” and i want the CRM to understand that this person already exists in Contacts module and the CRM should just create one more relationship of this contact with module Events ( that shows that this contact was registred in Musical evening).
To be hones, i don’t know how to organise the whole process, not only with duplicate checking.
Hope it’s become clear for you and you’ll be able to help me anyway.

For a “bulk” approach, I find this technique quite original and practical:

For a one-by-one approach, have you tried going into the Detail view of a contact and pressing the “Find duplicates” button on the top? (if it’s not a button, it’s inside a dropdown menu right below the contact’s name as show in the title of the page).

If you don’t have a lot of movement, you could simply have a process of checking each new lead coming in from the site.

Thanks for your answer!
Maybe you can say where i can find the code of processes? It’s just very inconvenient to make lots of processes and i think it will be easier to code it. But i can’t find the place where i can do it.

About import : i’d like to have autochecking of duplicates because there can be lots of lead and i just want the system to identify that this person already exists so it shouldn’t create new Contact object, just needed relationship.

I don’t know what you mean by “code of processes”? Which process exactly?

There are add-ons on the SuiteCRM Store for $199 to check duplicates, I don’t think it’s worthwhile to code a solution for this…

I mean i created a workflow : when there is a new contact the system should automatically create a relationship. But there are many conditions for me and i have to create lots of workflows, so i’m intrested where i can code them? It’ll be faster i think.

Then you can look at how you create a custom Scheduler.

… or an after-save logic hook.

The book that would help you is “SuiteCRM for Developers” by Jim Mackin. You can buy the eBook online.

Don’t you know possible variants to organise duplicate checking?

Checking for duplicates is not simple.

There are various circumstances that have to be considered. For example, considering only the account name field:
. the content of the field is identical
. one or more words in one record correspond to one or more words in another record
. the initial part is identical
. the final part is identical

You may even want to perform some more complex operations such as:
. the whole content is similar, with the exception of one single letter anywhere in the field
. the whole content is similar, with the exception of one or more letters anywhere in the field

You may even go still further. Considering the latter two examples, instead of checking for just any letter, you may try to substitute only with the letters that are found nearby in the keyboard layout.

This obviously adds more complexity because the question that comes to one’s mind is: what keyboard layout? There are many layouts around! Obviously nothing stops you from mapping them all, or at least all those that you find!

Next you have to decide how many fields are we going to test. You may use things like city, website, telephone number, etc. For each of these fields you will have to consider that people do not write them always in the same way. Similarly some may add the form of the comapny (eg ltd or Ltd. or Limited, etc.) in different ways.

Once you have decided all the rules above and you have identified doubles or potential doubles you have to decide what to do with them.

For example:
. if you are using several fields and everything is identical you may have a sure thing. So will you merge them?
. you may want to add them all to a list of potential doubles and then check them by hand to make sure that they actually are doubles and then perform the merging by hand.
. etc.

From all this you understand that it’s not a simple task.
You have to:
. define strict company rules that define how you enter the data in the CRM
. define what you want to test to identify double candidates
. define further rules on what to do or how to merge the potential double candidates

As someone suggested there are are some custom commercial modules that claim to check for duplicates. The question is HOW do they do it? And is it worth the price?

Sorry if this has confused you more!
Maybe you could create a custom table and a custom scheduler that adds potential doubles to this table then you have to check them one by one.

It really depends on what you want to achieve, how important is it to you, how disciplined are the people who use the CRM and how much are you willing to invest.

1 Like

Thanks for answer.
I want to do it easier.
If there are full matchess in full name + birthdate - the system should admit it as Duplicates. I want to start from this and, if there will be opportunity, to modify checking in future.

If a system found duplicate ( for example one person registred to Musical evening via web-to-contacts form and then he registred to Poetry evening via another form) - in this case the SuiteCRM should not create a contact twice (it should merge them), just create it once and when a persong registred to Poetry evening, create a relationship between Contacts and Events.

you can try to edit the file: modules/Campaigns/WebToLeadCapture.php
and perform inside there all you want to do.
Beware that this is not Upgrade safe so you have to keep a copy and replace it or merge it when you do an upgrade of the system.

Alternatively, at the beginning of the same file it says:

  • To make your changes upgrade safe create a file called leadCapture_override.php and place the changes there

It doesn’t specify in which folder you should place this file so I would try both:
(you may create a copy and call it with that name)
(Note: I searched for that fie name and it appears only within modules/Leads/Capture.php so I am not sure that this latter method will work but you can try)

is this working

I’m locking this topic, it seems to be a favorite target for spammers. Most of the spam we get is for “assignment help” which is about selling fake schoolwork to lazy students. So the words “duplicate check” must sound relevant to them…