Abri deal abandonment requires a negative outcome 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-03 10:11:14 +00:00
parent 41d62ce2b2
commit 6de0da869e

View file

@ -13,6 +13,13 @@ class HubspotDealDiffer:
]
RETROFIT_DESIGN_COMPLETE = "uploaded"
LODGEMENT_COMPLETE: List[str] = ["lodgement complete", "measures lodged"]
NEGATIVE_OUTCOMES: List[str] = [
"no answer",
"cancelled",
"no show",
"tenant refusal",
"not viable",
]
ABRI_CONDITION_ASSOCIATED_PROJECT_ID = "123456"
ABRI_CONDITION_PROJECT_CODE = "Abri Condition"
@ -230,7 +237,11 @@ class HubspotDealDiffer:
return False
new_attempts = parse_hs_int(new_deal.get("number_of_attempts"))
return new_attempts is not None and new_attempts >= 3
if new_attempts is None or new_attempts < 3:
return False
new_outcome = (new_deal.get("outcome") or "").lower()
return new_outcome in HubspotDealDiffer.NEGATIVE_OUTCOMES
@staticmethod
def check_for_magicplan_trigger(