Skip to content

Common Webhook

The unified post-call webhook system at pages/api/responder/common/workflow.ts plus the per-CRM dispatch under lib/workflow/stages/. This section is the canonical knowledge surface for understanding the system and executing CRM migrations onto it.

Unsolicited Opinion

This section exists because CRM migrations are a primary FDE workstream. Right now there are 9 CRMs on the legacy per-CRM webhook system that need to migrate onto this one. The work is mechanical but the surrounding system has enough sharp edges that knowing the four-layer mental model (HTTP entry → durable queue → triager lifecycle → CRM dispatch) is the difference between a migration that takes half a day and one that takes a week of debugging mysterious symptoms.

The tension preserved here: ship migrations fast in the existing brittle adapter shape, while accumulating improvement arguments in the future-brief. The migration playbook documents the brittle shape verbatim. The future-brief accumulates structured observations across migrations for "running up the flagpole."


Reading order

You want to...Read
Understand how the system works (operator / new FDE / consultant)Architecture
Understand what migrations are migrating fromLegacy comparison
Execute a CRM migrationMigration playbookHouseCall Pro worked example
Form an argument about "could be done better"Future brief
See what's still unknown (or add a question)Open questions
See PR #10249 walked through end-to-endHouseCall Pro

For deeper context not duplicated in this section:


Pages in this section

PageWhat it covers
ArchitectureThe four-layer system: HTTP entry, durable queue, triager lifecycle, CRM dispatch. Vertical/CRM matrix. The four coexisting CRM-dispatch shapes inside HomeServicesWorkflowRunTriager. What you get for free.
Legacy comparisonThe legacy per-CRM webhook shape. Walking the legacy HCP path. Why the common webhook exists. Migration inventory: 9 CRMs on legacy, 1 in progress (HCP), 1 half-migrated (ACCULYNX), 1 dual-state (OASIS).
Migration playbookFive-step recipe. The four-file booking-<crm>/ package template. The dispatch block template. Per-team rollout. Failure modes. Defensible-PR checklist. When the four-file pattern doesn't fit.
Future briefRunning list of "what I'd do differently" observations, each with status field. Updated as Sandy does migrations. PR-ready arguments.
HouseCall ProPR #10249 walked end-to-end. File-by-file annotated walkthrough. Pre-conditions, smells, open questions.

Per-CRM pages will be added under crms/ as Sandy works each migration.


Migration status snapshot

CRMStateNotes
hcp (HouseCall Pro)🚧 In progressPR AvocaAI/avoca-next#10249
acculynxHalf-migratedInline branches in booking-triage.ts, no booking-acculynx/ package
clypboardLegacy
fieldRoutesLegacyLikely next ("Field Service")
iaaLegacy
jobNimbusLegacy, possibly live-agent-onlyNo run/handler.ts
jobberLegacy
pestPacLegacy
servpro / servpro-playwrightLegacy
workizLegacy
oasisDual-stateHas both legacy webhook and booking-oasis/
albiware✅ MigratedSingle-outcome pattern
autoops, dynamics365, salesforce, salesforce-omnia✅ GreenfieldBuilt on the common webhook
service_titan✅ Migrated (implicit default)Generic stages
four_seasons✅ Migrated (per-case branch)Inline rescheduling branch only

Full inventory and special-state explanations in Legacy comparison.


Conventions used in this section

ConventionMeaning
> Blockquote with attributionDirect quote from production source code or PR description
::: tip How to read thisPage-level navigation hints
::: info Unsolicited OpinionSandy's interpretation, opinion, or framing — not factual claim
::: warningOpen questions, footguns, name collisions, sharp edges
Mermaid diagrams in <FullscreenDiagram>Mental models, dispatch flowcharts, sequence diagrams
[obs-N] in future-briefNumbered observations (cross-referenced from migration-playbook smells column)
<crm> and <Crm> placeholdersTemplate placeholders in migration-playbook code blocks; substitute with the actual CRM key/PascalCase