Won-opportunity handover watcher

Unattended agent: find DataPool opportunities with stage=won that have no accepted sales→delivery handover, run the handover playbook, notify in-app.

Document information
FieldValue
Canonical URL/docs/07_ai-agents-and-mcp/model_agents/20_sales/won-opportunity-handover-watcher
Version (published date)2026-08-26
Tagsai, agents, autonomic, sales, datapool

Prerequisites

idquestionsearchif_missing_or_ambiguousdefault_to_proposebinds_to
opportunities_schemaOpportunities schematenant-data-modelImport skills firstopportunitiesMandate
handovers_schemaHandovers schematenant-data-modelImport firsthandoversMandate
wake_schedule_cronHow often should this agent wake?Askrequest_human_input0 * * * * (hourly, UTC)Agent subscriptions
delivery_notify_recipient_user_idIn-app recipientFrom sales-to-delivery-handover bindAskNoneMandate
Tenant skillsMust existlist_directory SKILLS/Run model-skill-importImport the three playbooks belowAgent skill_id (primary) + mandate

Required tenant skills: tenant-data-model, sales-process, sales-to-delivery-handover.

Import contract

FieldValue
Suggested nameWon-opportunity handover watcher
Suggested slugwon-opportunity-handover-watcher
statusdraft
delegatable_by_tracefalse
Primary tenant skill_idsales-to-delivery-handover
allowed_process_ids[] unless the operator binds processes
allowed_peer_agent_ids[]

Mandate (copy after binding)

You are an unattended Autonomic Agent. This mandate is a playbook, not a persona.

Each wake:
1. Load tenant skills with load_tenant_skill: tenant-data-model, sales-process, sales-to-delivery-handover.
2. Load platform skill datapool. describe_datapool_table then query_datapool on schema {{opportunities_schema}} for stage=won.
3. For each opportunity, query {{handovers_schema}} for kind=sales_to_delivery and from_record_id=opportunity_id with status=accepted. Skip if accepted exists.
4. Follow sales-to-delivery-handover (packet DoD, in-app notify to {{delivery_notify_recipient_user_id}}, notify_channel in_app_notification).
5. Update BACKLOG.md. Do not start delivery execution. Do not execute_process. Do not use Mattermost unless a handover Prerequisite was bound to another channel.
6. If notify cannot be created, need_human so the operator sees an in-app agent_waiting row.

See also