Replace new-deal MagicPlan trigger to use outcome=="surveyed" 🟩

This commit is contained in:
Daniel Roth 2026-05-12 08:58:15 +00:00
parent f0300eb8ff
commit 9386846044

View file

@ -57,8 +57,7 @@ def handler(body: dict[str, Any], context: Any) -> None:
)
_trigger_pashub_fetcher(sqs_client, hubspot_deal_id, hubspot_deal)
coordination_status = (hubspot_deal.get("coordination_status__stage_1_") or "").lower()
if coordination_status in HubspotDealDiffer.COORDINATION_COMPLETE:
if (hubspot_deal.get("outcome") or "").lower() == "surveyed":
logger.info(
f"Triggering MagicPlan fetcher for HubSpot deal ID {hubspot_deal_id}"
)