Why Contacts?
When a ProcessWire site runs forms, customer accounts, email campaigns, bookings, and commerce together, contact data quickly fragments across separate templates and tables. Contacts acts as the shared directory layer so every module references one canonical contact or organization UUID.
Ad-Hoc Contact Storage vs. ProcessWire Contacts
Section titled “Ad-Hoc Contact Storage vs. ProcessWire Contacts”| Requirement | Ad-Hoc Pages / User Fields | ProcessWire Contacts |
|---|---|---|
| Shared Identity Across Modules | Separate lead tables in forms, newsletters, and bookings with mismatched emails. | Single ContactEntry and OrganizationEntry directory referenced by UUID across Forms, Account, Campaign, Commerce, Charter, Tour, and custom modules. |
| Email & Phone Normalization | Case-sensitive duplicates (Claire@... vs claire@...) and unformatted local phone numbers. |
ContactNormalizer lowercases emails, formats E.164 phone numbers, enforces unique primary flags, and guards parent-organization cycles on every single and batch save. |
| Duplicate Resolution | Manual deletion breaks foreign references and loses notes or addresses. | Atomic ContactMergeService merges channels, addresses, memberships, consents, notes, and embedded fieldsets while firing Contacts::afterMerge so downstream modules repoint UUIDs. |
| GDPR Consent & Erasure | Hard-deleting a contact breaks invoices, bookings, and audit logs. | Append-only contacts-consent ledger, full exportSubjectData() bundles, and UUID-preserving anonymizeContact() that scrubs PII, note bodies, revisions, and activity logs. |
| Address Book & Multi-Channel | Single flat phone and address text fields per user. |
Typed repeatable contacts-channel (9 types) and contacts-address (7 types with default billing/shipping) blocks plus ContactAddressService. |
| Address Book Exchange | Hand-written CSV scripts vulnerable to spreadsheet formula injection. | Built-in CSV, JSON, and vCard 4.0 exchange across 5 transfer profiles (contacts, google, microsoft, apple, zoho) with CWE-1236 formula neutralization. |