An invoice has a date and a total, but no due date comes back from your extractor. Adding 30 days to the invoice date would invent a payment term. Before any reminder or payment is scheduled, the workflow needs to know what the invoice actually says.
Give the reviewer a reason to look
Save the raw value, the normalized value if you have one, and the reason for review. A missing field, an empty string, and a real zero should stay distinct throughout the workflow.
| What you know | What to do |
|---|---|
| Nobody has checked the source | Leave the field unverified and send it for a source check. |
| The source gives no due date | Record it as unspecified; leave the payment date unset. |
| The date is visible but the extractor missed it | Ask the reviewer to confirm the value against the source. |
| The invoice gives two conflicting dates | Keep both dates and their locations for review. |
Inspect the value and the source together
In ComPDF Intelligent Document Extraction, request the fields your workflow needs. If you're building a payment review queue, start with the invoice number, amount due, and due date. Request source grounding where supported, and attach the page reference when the response includes one. Without a location, give the reviewer the original PDF to check.
On one synthetic invoice, a layout extraction request returned INV-711 and USD 0.00, both located on page 1. The invoice didn't give a purchase order number; that field returned an empty string and an empty bboxes array. The response structure guide explains the value and grounding fields.
Values and source references from one layout extraction result. An empty field on a different invoice still needs a source check.
Avoid a truthiness check on the normalized amount. Once parsed, 0 is a legitimate number; a JavaScript expression such as amount || null would erase it. The review reasons in the table are decisions made by the application or a reviewer; they don't come back as statuses from the extraction API.
Test the review queue with four short invoices
Use fictional data. Put each sample on a separate one-page PDF. For B, first omit the due date from a mocked response so you can reproduce the missed-field case on demand. Run a separate pass against real PDFs to see what your extractor actually returns.
| Sample | Source text | Check in your application |
|---|---|---|
| A | Due: 2027-03-15 · Amount due: USD 0.00 | Keep the date and the zero. |
| B | Due: 2027-03-18 · Amount due: USD 120.00 | If the response omits the date, leave it unverified until someone checks the source. |
| C | Amount due: USD 120.00 | After checking the source, record that no due date was specified. |
| D | Due: 2027-03-20 · Payment note: due 2027-03-27 | Preserve both candidates and ask for a decision. |
Before letting the workflow schedule anything, open the review queue. For each unresolved item, check whether the reviewer can see why it was flagged and where to look. If they can't tell the difference between a blank, a missed value, and two conflicting dates, keep that item out of automatic scheduling.


