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.1.0.tar.gz (10.2 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.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unitpulse_channels-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 880c495347299f74a7ad894d9f5e35ef489f3235def6cbcd66ecdb9978e5921f
MD5 23fadca1469871833c1dd27c841d0db7
BLAKE2b-256 02924c70d0f9a8106fc70bb4ee42c4e765168684b0c23db0cb2bcd96c3f272c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for unitpulse_channels-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 813fb81aec75a0abcbd4e5f9869585d7e3b98d9f33d38d77741796552bb1ab44
MD5 6217f2d0254c65e4d1b0ff9930415eb4
BLAKE2b-256 ceefab949f9f30fad6ac52793fea65d35c127e4919714dadc32f5813551b1822

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