Policy, tasks and captures

Captures

A capture is the result of processing one message in one bucket: the fields with value, confidence, raw text and source; the validation result; a status; and the routing reason.

StatusMeaning
appliedPolicy accepted it. Destinations were notified.
taskSomeone needs to look: a field requires a human, validation failed, a required field is missing, or confidence is below the bucket's threshold.
heldReserved for explicit holds.

Policy

Tenant-wide defaults (set_tenant_policy) and per-bucket overrides (policy on the bucket), merged key by key.

{
  "auto_accept": { "min_confidence": 1, "require_complete": true, "require_valid": true },
  "requires_human": ["ship_to"],
  "no_schema": "accept",
  "task_on_unrouted": true,
  "on_flags": { "hidden_text": "task", "external_resource": "accept" },
  "require_passing_tests": true
}

Tasks

KindCreated when
unroutedNo bucket matched. Subject is the message.
review_capturePolicy held a capture (validation, completeness, confidence).
field_reviewA requires_human field has a value.
flagged_messageThe message carried a sanitization flag the policy holds: hidden text, or unexpected_sender on an address with expected forwarders.
forwarding_verificationA mail provider is asking to confirm a forwarding rule; the code and link are in the payload.
config_changeA schema change was refused by the test suite.

Resolve a task with resolve_task, or let approve_capture resolve the capture's tasks for you.

Corrections and approval

correct_field sets a field on a capture and records a correction (old, new, actor, reason). The capture is re-validated but its status does not change. approve_capture (scope approve) applies it, resolves its tasks, and delivers. If validation issues other than missing required fields remain, approval fails unless force is passed.

Approving never sends email. Sending is a separate capability that unverified tenants do not have.

This page as Markdown.