๐ŸŽฏ Lead Implementation

Praktische implementatie van de Core Library binnen de Lead-entiteit.

โ† Terug naar Core Library

๐Ÿ“– 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

๐Ÿ‘‰ Download de source code:
โฌ‡๏ธ Download Lead Library