This event fires once per document outcome: completed when the pipeline finished (extraction may have been skipped because validation flagged the document), and failed when extraction itself errored. The payload always includes a classification object describing which checklist item(s) the document matched, with per-item validation results on each matched item.
When at least one matched checklist item has validation.status: "invalid", extraction is not run, but the pipeline still reports status: completed. extractionResult is still present with an empty items array and extractedCount: 0; the per-item validation block on each matched item carries the failure reasons (null when no rules ran).
{ "event": "document.extracted", "workspaceId": "6048d78a-584a-4f1e-9e39-e011ca4cc48c", "leadId": "910bb19a-2e9d-400f-8d15-9c461bb0f4aa", "externalLeadId": "SF-00142", "documentId": "8f0c3d1b-2a00-4f0d-8c1e-0e5f1a2b3c4d", "externalId": "DOC-2025-002", "status": "completed", "parentActionId": "9d7fe2f3-ec1a-481c-b814-a0d1c8017e1f", "summary": "Monthly business checking statement.", "type": "Bank Statement", "classification": { "noMatchedItemReason": null, "matchedChecklistItems": [ { "checklistItemCode": "bank-statement", "fieldType": "BANK_STATEMENT", "label": "Recent bank statement", "leadChecklistItemId": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9", "validation": { "reasons": [ "The statement end date is earlier than the requested coverage period." ], "status": "invalid" } } ] }, "extractionResult": { "items": [], "extractedCount": 0 }}