SITEMAP / DOCS / DATA MODEL

Event Pipeline

All data entering Waypath flows through the event pipeline, regardless of source, API ingestion, integration sync, or webhook.

01Pipeline flow

1. Data arrives (API event, integration sync, webhook)
       |
2. Normalize to MarketingEvent format
       |
3. Identity Resolution
   - Match customer by email (1.0) > phone (0.9) > externalId (0.8)
   - Create new Customer if no match
       |
4. Write to CRM Store (Pipeline)
   - Create/update person, company, or deal record
   - This is the system of record
       |
5. Intelligence Builder
   - Create/update Customer node
   - Create Touchpoint node + HAS_TOUCHPOINT edge
   - Link to Campaign (INFLUENCED_BY) if campaignId provided
   - Create/link Channel node (VIA_CHANNEL)
   - Compute stage progression (AT_STAGE, CONTRIBUTES_TO)
       |
6. WebSocket Broadcast
   - Notify all connected clients of mutations
   - Intelligence and Pipeline views update in real time

02MarketingEvent format

Every integration normalizes its data into this universal format:

interface MarketingEvent {
  type: 'track' | 'identify'
  action: string              // e.g., 'email_opened', 'page_view', 'purchase'
  customerId?: string         // existing customer ID
  email?: string              // for identity resolution
  phone?: string              // for identity resolution
  externalId?: string         // platform-specific ID
  campaignId?: string         // links to Campaign node
  channel?: string            // creates Channel node
  properties?: Record<string, unknown>
  timestamp?: string          // ISO 8601
}

03Deduplication

The pipeline uses deterministic touchpoint IDs to prevent duplicates on re-sync. If the same event is ingested twice (e.g., during an integration backfill), the existing touchpoint is updated rather than duplicated.

04Summary mode

When the Intelligence view requests data, it can use mode=summary to exclude Touchpoints from the response. This provides a lighter payload for the sidebar and stats. The full Intelligence view always uses mode=full to include all touchpoints for correlation density.