Process Document
document.processSubmit a document URL for automated classification, field extraction, PII detection, and quality scoring. Returns a job ID for asynchronous processing.
Instructions
Submit a document for processing — this is always the first step (Step 1 of 5).
Downloads the file from file_url, then submits it to FlexOrch for automatic classification, structured field extraction, PII detection/masking, and quality scoring. Processing is asynchronous — this tool returns immediately with a job_id. You MUST call job.status(job_id) every 3–5 seconds until status='completed' before calling job.result.
Args: file_url: Publicly accessible URL of the document (http/https only, max 50 MB). Supported: PDF, DOCX, TXT, XLSX, HTML, XML, EML, JPG, PNG, TIFF. mask_pii: Replace detected PII (names, IDs, emails, phone numbers) with [MASKED_TYPE] placeholders in all output. Default: true. document_type: Optional classification hint — FlexOrch auto-detects if omitted. Values: invoice, expense_report, purchase_order, sales_proposal, bank_statement, payroll.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| mask_pii | No | ||
| document_type | No | auto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| job_id | No | ||
| status | No | ||
| isError | No | ||
| poll_hint | No |