Customer Intelligence Domain [future — Phase 3]
An event-sourced analytics domain enabling the 360° Customer Profile vision — behavioral aggregation, customer segmentation, and intelligent recommendations.
→ Hub: See domain-model.md for the bounded context map and cross-boundary integration surface.
NOTE
This context does not exist in Phase 1 or Phase 2. This section establishes its architectural intent and ensures the operational contexts emit the events it will consume. See ADR-021 for the full specification.
Planned Entities [TBD]
- CustomerActivityLog: An event-sourced ledger recording all customer touchpoints across contexts — bookings, boardings, purchases, communications, cancellations, no-shows. Consumed from domain events emitted by Commerce, Operations, Communications, and Backoffice.
- BehaviorAggregate: Materialized per-customer metrics computed from the activity log:
lifetime_revenue,total_bookings,last_booking_at,preferred_seat_position,preferred_boarding_point,no_show_count,average_booking_lead_time. - CustomerSegment: Operator-definable cohort definitions for targeted marketing (e.g., "frequent Nordsee travelers", "high-value dormant customers", "repeat no-shows"). Supports both rule-based and ML-driven segmentation.
- EngagementScore: Computed customer health metrics — NPS, satisfaction, churn risk — derived from communication response rates, booking recency, and feedback.
- RecommendationModel: ML pipeline outputs for per-user suggestions ("you may like Ostsee 5-Tage") and collaborative filtering ("passengers who booked Nordsee also booked Bodensee").
- ChannelPreference: Learned preferred communication channel per customer, fed back to Communications for optimal delivery routing.
Relationship to PersonProfile:
PersonProfile(Backoffice) remains the identity anchor — name, contact info, dietary needs. Customer Intelligence reads it viaPersonProfileUpdatedevents but never writes to it. CI exposes a CustomerInsight read model consumed by the Workspace UI alongside the profile, providing the full 360° view without coupling Backoffice to analytics logic.
Identity Anchor:
CustomerProfilecarriesperson_profile_id(soft FK to BackofficePersonProfile). CI creates aCustomerProfileonly when aPersonProfileexists — CI never creates identity, it only enriches existing identity.
Booker Attribution:
BookingConfirmedevents carrybooker_profile_id. CI attributeslifetime_revenue,booking_count, andaverage_booking_lead_timeto the booker'sCustomerProfile, not to accompanying travelers. Travelers receive travel-specific metrics (preferred seat, boarding behavior, tour preferences).
Contact Filter Rule: CI event consumers discard communication events where the originating
Contacthas noperson_profile_idlink. Pre-booking journey tracking deferred to Phase 3 — if it proves valuable, the system can backfill via event replay.
See ADR-037 for the full identity model decision.
Aggregates [TBD]
Conceptual aggregate definitions — the system will refine these when designing the event-sourced architecture in Phase 3.
CustomerProfile
| Role | Entity |
|---|---|
| Root | CustomerProfile |
| Child | BehaviorAggregate (materialized metrics) |
| Child | EngagementScore (health metrics) |
| Child | ChannelPreference (learned preferences) |
Note: BehaviorAggregate, EngagementScore, and ChannelPreference are read-model projections computed from the event store (
CustomerActivityLog). In the final event-sourced design, these may become independent read models rather than aggregate children. The aggregate boundary will be refined during Phase 3 implementation.
CustomerSegment
Single-entity aggregate. Operator-definable cohort definitions for targeted marketing.
RecommendationModel
Single-entity aggregate. ML pipeline output for per-user suggestions and collaborative filtering.