""" Adit export column mapping for Rock Cosmetics (#1784). Fill in source-header keys (commented placeholders) once the Adit CSV export lands via Sir Alex Therrien (info@lionsalesfunnels.com on app.adit.com). Export preference: CSV > xls/xlsx > PDF (last resort). Contact: Judy Tran / advperio28@gmail.com (signs as Judy Smith). Target field names are standardised to match the APID Attribution Dashboard schema. """ from __future__ import annotations # ── Adit export → internal field mapping ───────────────────────────────────── # Keys = exact column header strings from the Adit CSV/XLSX export. # Values = internal field names used throughout this pipeline. # Fill once the export sample is available. COLUMN_MAP: dict[str, str] = { # --- Patient identity (required for GHL name + DOB matching) --- # "": "first_name", # "": "last_name", # "": "dob", # format TBD — MM/DD/YYYY likely # --- Appointment / lead data --- # "": "appointment_date", # "": "appointment_status", # scheduled / completed / cancelled # "": "procedure_type", # "": "lead_source", # referral channel from Adit # --- Campaign / attribution --- # "": "campaign", # "": "report_date", # --- Performance metrics (include if present in Adit export) --- # "": "impressions", # "": "clicks", # "": "cost_usd", # "": "conversions", # "": "ctr", # "": "avg_cpc_usd", } # ── Field type sets used by ingest.py coercion ──────────────────────────────── DATE_FIELDS: frozenset[str] = frozenset({"dob", "report_date", "appointment_date"}) INT_FIELDS: frozenset[str] = frozenset({"impressions", "clicks", "conversions"}) DECIMAL_FIELDS: frozenset[str] = frozenset({"cost_usd", "avg_cpc_usd", "ctr"})