Model/domain/abri/abandonment.py
Daniel Roth d884edd456 Map a HubSpot outcome to an abandonment reason code 🟩
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 15:38:31 +00:00

13 lines
501 B
Python

from typing import Optional
from domain.abri.models import AbandonReason
def abandon_reason_for_outcome(outcome: Optional[str]) -> AbandonReason:
"""The OpenHousing abandonment reason code for a HubSpot deal outcome.
The single mapping point from HubSpot's outcome to a coded reason. For now
every outcome maps to CARDED; the real outcome-to-code table is a follow-up
(needs Abri's code list), and swapping it in is a one-place change here.
"""
return AbandonReason.CARDED