md-systems / crm_core

Drupal 8 port of the CRM Core module
https://www.drupal.org/project/crm_core
11 stars 10 forks source link

Provide a better name matching #23

Open mirodietiker opened 9 years ago

mirodietiker commented 9 years ago

Matching names are a complex problem: Some systems store them separately, others store it splitted up.

When matching, in many cases, the names come in without structure and need to be dynamically matched across multiple fields... or possibly a single one with different naming order. Example: company - firstname lastname firstname lastname, company And many more possible orders.

When matching a mail address, the data comes in as a single string, in my example: "Miro Dietiker, MD Systems" miro@example.org Separating the mail is easy. We could try splitting by know separators such as comma: Miro Dietiker MD Systems

And we could try splitting further by spaces. Miro, Dietiker, MD, Systems And then apply a contains (or even a equals) match on normalised name component fields. Possibly we should only consider components that are 3+ characters long and keep shorter connected? Also we could identify known titles. We could also first try the longer connected names for a full match. Full matches would receive a higher score. With partial matches of components, we possibly should divide the score by the total components somehow.

The matcher would need to offer a virtual field to pass in the combined data.

mirodietiker commented 9 years ago

See also the inmail issue that tries to extract footer data from mails that should be a nice thing to enrich contacts or match them.

Identify mail footers with contact data https://www.drupal.org/node/2412935

edurenye commented 8 years ago

I created the pull request for it #31

mirodietiker commented 8 years ago

Pull request #31 was merged. The situation improved a lot. But i guess we can still improve it a bit.