Book a Contractor from Compliance
The fastest path from "smoke alarm due in 11 days" to a dispatched tradie is the Book now button on any compliance task.
What happens on click
- A
WorkOrderis created, linked to theComplianceTaskviacomplianceTaskId. - The scope is pre-filled with the task's friendly name (e.g. "Smoke alarm annual test per VIC rental minimum standards").
- The Ranked Contractor Picker opens,
filtered to contractors whose
trades[]includes the relevant trade (smoke-alarm / gas / electrical / etc.). - You pick a contractor, hit Dispatch. They get a magic link.
- When they mark the WO
COMPLETED, the compliance task is marked complete with today's date. - The next occurrence is scheduled automatically based on the rule's cadence (e.g. annual = +365 days from completion).
Why not just auto-schedule?
Deliberate — cadence computation is straightforward but choosing the contractor benefits from PM judgement (preferred vendor, ongoing relationship, special-access-required). We gate auto-scheduling on a human in the loop. Routine book-cycle-repeat is on the AI Roadmap — see AI Roadmap.
API
POST /api/v1/properties/{propertyId}/ai-actions/create-work-order
Content-Type: application/json
{
"kind": "COMPLIANCE_BOOK",
"complianceTaskId": "CT-abc123"
}
Returns:
{
"maintenanceRequestId": "MR-9981",
"workOrderId": "WO-4420",
"scope": "Smoke alarm annual test per VIC rental minimum standards.",
"costCeilingCents": 12000,
"modelVersion": "claude-haiku-4-5@prompt-v1"
}
This endpoint chains: submit request → apply triage → draft scope → convert
to WO — all in one call. Implementation lives in the
ExecuteAiSuggestedAction use case.
What the PM sees
On the property detail page → Overview tab → AI suggested actions
card, compliance-derived items appear as COMPLIANCE_BOOK kind with a
CTA that triggers this endpoint. The result deep-links to the new
maintenance request (/maintenance?select={id}) so the PM can review +
pick a contractor without losing context.
See also
- AI Property Suggestions — how the card is populated
- Ranked Contractor Picker