๐ Introductie
De Lead vormt de intake-laag van het CRM proces. In deze fase wordt ruwe data gevalideerd, genormaliseerd en voorbereid voor conversie naar Account en Contact.
๐ Lead = pre-processing layer
๐ Focus op datakwaliteit vรณรณr conversie
๐๏ธ Architectuur
1. Namespace layer
-
onitedLead
- Isolatie per entity
2. Core dependency layer
-
onited.core.*
- Validatie en formatting
3. Transformation layer
- Lead โ Account/Contact voorbereiding
- Name composition
- Intake validatie
๐ OnLoad โ initialisatie
- waitForGlobal
- Default country via environment
- ISO2 initialisatie
- Event binding
๐ Belangrijke bindings:
- Country โ ISO2
- Infix mapping
- KvK validatie
- Phone validation
- Address handling
๐งฉ Lead data normalisatie
Fullname compositie
Persoon:
const name = [firstname, infix, lastname].filter(Boolean).join(" ");
Bedrijf + persoon:
const fullname = account
? [account, name].filter(Boolean).join(" | ")
: name;
๐ Gebruik voor matching, deduplicatie en conversie
๐ข KvK validation
- Veld:
onited_kvknumber
- Alleen actief bij NL
-
DutchValidation.isKvK
๐ Phone validation
- telephone1 & mobilephone
- Validatie + formatting
- Notifier bij fouten
๐ Address handling
- Postcode + housenumber validation
- Auto-fill adresgegevens
๐ NL enrichment: straat, stad, provincie
๐ Source code