Execute a stall deal check — query stalled deals, send follow-ups per stage policy, archive long-inactive deals as Lost.
When triggered for stall deal check:
/sales-pipeline/stall-deals-policy — get stall_days, archive_days, outreach_cutoff_stage_id, stage_actions.erp_table_data(table_name="crm_deal", options={
"filters": {"AND": [
"contact.contact_last_outbound_ts:<:STALL_TS",
"contact.contact_last_inbound_ts:<:STALL_TS",
]},
"include": ["contact"],
})
deal_details.last_followup_stage). Load the template from template_path in the stage_actions entry (cat that policy document); if absent, use a short generic follow-up. After sending, record in deal_details to prevent duplicates. Use email_send() tool to do it, and log the activity after (fetch log-crm-activity skill for details).last_followup_stageprint_widget(type="start_chat", expert="default", text="Stage [stage_name] has stalled deals but no action defined — click to decide what to do.")