Skip to content

Channels, Addresses & Timeline

Every ContactEntry and OrganizationEntry supports structured multi-channel communication rows, an ownership-verified address book, and an aggregated chronological interaction timeline.

Totoglu\Contacts\Domain\ChannelType supports 9 channel types:

email, phone, mobile, whatsapp, telegram, website, linkedin, instagram, and other.

ContactNormalizer automatically normalizes email channels to lowercase, formats phone/mobile/WhatsApp numbers to E.164, and guarantees at most one is_primary row per channel type.

Address Book (contacts-address & ContactAddressService)

Section titled “Address Book (contacts-address & ContactAddressService)”

Totoglu\Contacts\Domain\AddressType supports 7 address types:

billing, shipping, office, warehouse, mailing, home, and other.

Use $contacts->addresses() (ContactAddressService) for ownership-verified CRUD and default flag management (primary, billing, shipping):

<?php
declare(strict_types=1);
namespace ProcessWire;
$contacts = Contacts::requireInstance($this);
$addressService = $contacts->addresses();
// Create or update an address owned by $contact
$addr = $addressService->upsertFor($contact, [
'address_type' => 'billing',
'line1' => '14 Promenade des Anglais',
'city' => 'Nice',
'postal_code' => '06000',
'country_code' => 'FR',
'is_default_billing' => true,
]);
// Promote an existing address to primary, billing, or shipping default
$addressService->setDefaultFor($contact, $addr->id, 'shipping');
// List or pick typed defaults directly from the entity
$allAddresses = $addressService->listFor($contact);
$billing = $contact->defaultBillingAddress();
$shipping = $contact->defaultShippingAddress();
$primary = $contact->primaryAddress();
// Remove an address (ownership verified)
$addressService->removeFor($contact, $addr->id);

Notes Timeline & Scheduled Follow-Ups (contacts-notes)

Section titled “Notes Timeline & Scheduled Follow-Ups (contacts-notes)”

Open Setup -> Contacts -> Notes to track calls, emails, meetings, internal notes, and system events across your entire directory, with optional follow-up reminder dates (follow_up_at), staff assignees (assigned_user_id), and completion toggles (is_completed).

Interaction Notes track calls, emails, meetings, and system events with scheduled follow-ups surfaced on the Overview dashboard.

Totoglu\Contacts\Domain\InteractionKind defines 5 kinds: note, call, email, meeting, and system.

Logging Interactions & Aggregating Participant Timelines

Section titled “Logging Interactions & Aggregating Participant Timelines”
<?php
declare(strict_types=1);
namespace ProcessWire;
$contacts = Contacts::requireInstance($this);
// Log an actionable follow-up call
$note = $contacts->logInteraction([
'title' => 'Confirmed July Gocek 12 Islands charter hold',
'interaction_kind' => 'call',
'contact_ref' => $contact->id,
'organization_ref' => $org->id,
'follow_up_at' => time() + 86400,
'assigned_user_id' => $this->wire()->user->id,
'is_completed' => false,
'body' => 'Client requested provisioning menu and crew profile PDF before Friday.',
]);
// Fetch unified timeline (native notes + Contacts::collectTimelineItems from participant modules)
$timeline = $contacts->timelineFor($contact, limit: 30);

Next steps