Website form → webhook → AI summary → CRM record → internal email
A client needed free-text inquiries transformed into structured CRM records while retaining the original submission for follow-up and auditability.
Starting problem
Lead information arrived in free text. Earlier direct integration behavior produced inconsistent categories, optional fields caused failures and downstream validation errors were difficult to diagnose.
Constraints
- Raw form data had to remain unchanged and independently available.
- AI-generated fields needed a strict schema and predefined category values.
- Missing source data had to remain unknown rather than inferred.
- CRM/API failures required a visible retry or manual-review path.
A→Z implementation
- Define interface contractsDocumented form payload, webhook body, AI request, AI response schema and CRM field requirements including types and allowed values.
- Build transformation schemaConfigured the AI to return only requested fields such as summary, category, urgency, service need and explicit unknowns.
- Add validation layerValidated JSON shape, enums, required fields and payload size before allowing any CRM write.
- Connect downstream actionsCreated or updated the CRM record, preserved raw source text, attached AI enrichment and triggered the internal notification.
- Test integration failuresSimulated empty fields, malformed payloads, AI timeout, invalid JSON, CRM errors and duplicate webhook delivery.
- Document operationsDelivered endpoint/data maps, error handling, retry behavior, manual fallback and failed-run inspection guidance.
Artifacts delivered
Acceptance criteria
- Valid submissions created correctly mapped CRM records.
- Raw source data remained separate from AI-generated enrichment.
- Invalid AI output could not corrupt downstream fields.
- Failed writes were visible and followed the agreed recovery path.