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.
| Status | Meaning |
|---|---|
applied | Policy accepted it. Destinations were notified. |
task | Someone needs to look: a field requires a human, validation failed, a required field is missing, or confidence is below the bucket's threshold. |
held | Reserved 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
}
on_flagsdecides what a sanitization flag does to routing. The hidden-text flags (hidden_text,zero_font,invisible_color),unexpected_senderandforwarding_verificationdefault totask; every other flag defaults toaccept. A held message becomes aflagged_messagetask before anything else is weighed.require_passing_testsgates schema changes on the bucket's test suite.
requires_humanfields (here or on the schema) always create a task when they carry a value. Confidence never overrides that.min_confidenceapplies to every extracted field except constants. Confidence comes from the extractor kind (labelled 1, regex 0.8, mailbox or header 0.5, constant 0.3), halved on a failed transform or coercion. See Extractors.no_schemadecides what happens to messages in a bucket with no schema: accept them, or make a task.
Tasks
| Kind | Created when |
|---|---|
unrouted | No bucket matched. Subject is the message. |
review_capture | Policy held a capture (validation, completeness, confidence). |
field_review | A requires_human field has a value. |
flagged_message | The message carried a sanitization flag the policy holds: hidden text, or unexpected_sender on an address with expected forwarders. |
forwarding_verification | A mail provider is asking to confirm a forwarding rule; the code and link are in the payload. |
config_change | A 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.
Changes and approval
Two kinds of task exist for mail that asks the address itself for something: forwarding_verification (a mail provider confirming a forward; the code or link is on the task) and confirmation (a service asking to confirm a signup, subscription or address; the link is on the task). Both hold the message and show in the app; mximp never follows a link.
Completed or incomplete
Every message has a state: completed once every destination has received it, incomplete until then. list_messages and get_message say what is owed under incomplete: a person (needs_person, with the task), a delivery that failed (delivery_failed, with the error the destination gave), a bucket with no destination, or no bucket. A retry that succeeds (deliver_capture) completes it; so does approving, since approval delivers. A sandbox shows held.
Two brakes in policy, tenant-wide or per bucket: human_touch: "issues" holds anything short of a clean read (a validation issue, a field below full confidence, a flag); human_touch: "all" holds every message.
set_field sets a field on a capture and records the change (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.