Skip to main content

Canonical communication-channel enum and lead-source registry

Project description

unitpulse-channels

Single source of truth for UnitPulse's communication-channel and lead-source vocabulary. Import it everywhere a channel or lead_source value is produced so services stop re-declaring (and drifting) their own lists.

Concepts

Three distinct things that were historically conflated into one free-form field:

concept field governance
channel per-message medium CLOSED enum (Channel)
first_touch_channel mode of first contact (prospect) same Channel enum
lead_source acquisition / attribution OPEN curated registry (LEAD_SOURCES)

channel is closed: unknown input → other (+ WARN log). lead_source is an open curated registry: unknown input → other but the original raw string is preserved so new sources can be promoted by review.

Usage

from unitpulse_channels import (
    normalize_channel, normalize_lead_source, classify_prospect_source,
)

normalize_channel("FB Messenger")        # -> "fb messenger"
normalize_channel("call in")             # -> "phone"
normalize_channel("walk in")             # -> "in_person"

normalize_lead_source("ZILLOW").value    # -> "zillow"
normalize_lead_source("1133 Hope")       # -> LeadSource(value="other", raw="1133 Hope")

# Split a raw prospect "source" into both dimensions:
classify_prospect_source("Walk in")            # -> ("direct", "in_person")
classify_prospect_source("Zillow")             # -> ("zillow", None)  # derive channel from 1st activity
classify_prospect_source("Facebook Messenger") # -> ("facebook", "fb messenger")

Design + backfill: design-docsunitpulse/specs/2026-06-18-channel-enum-cleanup.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unitpulse_channels-0.2.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unitpulse_channels-0.2.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file unitpulse_channels-0.2.0.tar.gz.

File metadata

  • Download URL: unitpulse_channels-0.2.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for unitpulse_channels-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cccdcb731e03592c277503dc1a821d8a389565cad794b199ffd5561f5d9fc816
MD5 45dbae8d60e5d51a063378f23f19c73a
BLAKE2b-256 9a195e1312a681474c924439f14b6c6c9db18a0d06b3c1b49aa03e4369f75fcc

See more details on using hashes here.

File details

Details for the file unitpulse_channels-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for unitpulse_channels-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8919a7a39382b20aa27169ef4b1d7e9eb16673c8f15bf4384b85dd0bf87a02c
MD5 df214eebff61986bb3bb617b2873ee63
BLAKE2b-256 bdd92933fc5a905880ac3c3eda6793810c3dcb50a709dd55b0615a855f29c8b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page