Customers

New Customer
Name Email Phone Address
Alice Müller alice@example.com +49 40 111111 Hauptstr. 45, 20123 Hamburg
Bauzentrum KG info@bauzentrum.de +49 511 222222 Gewerbepark 7, 30123 Hannover
CleanOffice GmbH hallo@cleanoffice.de +49 211 333333 Büroallee 12, 40213 Düsseldorf
Max Mustermann kunde@example.com 0987-654321 Kundenstr. 42, 12345 Musterstadt
sierk sierkconradi@googlemail.com 0919306019728 In der Weed 20
Rahul Garg rahulgrg.200@gmail.com 09306019728 #384/7 new colony adarsh gali no. 2 #384/7
Manager Review — Customer Fuzzy Matching

Verify fuzzy matching returns correct customer in top 3 for test cases.

1. Test via API (Postman or curl)

Fuzzy Match Lead → Customer:

POST /api/v1/companies/customers/match/
{
  "name": "Max Mustermann",
  "phone": "0987-654321",
  "email": "kunde@example.com",
  "address": "Kundenstr. 42, 12345 Musterstadt"
}

Expected:

  • HIGHauto_link
  • MEDIUMshow_candidates
  • LOWcreate_new
2. Check Duplicate Before Create
POST /api/v1/companies/customers/check-duplicate/
{
  "email": "kunde@example.com"
}

Should return is_duplicate: true with linked customer ID.

3. Find Top N Similar
POST /api/v1/companies/customers/find-similar/
{
  "name": "Max Musterman",
  "limit": 3
}

Verify correct customer is in top 3 results.

Acceptance Criteria:
  • Fuzzy match on: name, phone, email, address
  • Match confidence score: HIGH / MEDIUM / LOW
  • HIGH → auto-link. MEDIUM → show candidates. LOW → new customer prompt.
  • Deduplication prevention works
  • Match results in top 3 at least 90% of the time