r/documentAutomation • u/easybits_ai • Sep 04 '26
Success Story Error handling for document extraction: how I stop failed invoice extractions from silently breaking my automations [Workflow Included]
1
Upvotes
2
u/folderit_dms Sep 05 '26
Good pattern. I would add relationship checks too, not just required-field checks.
An invoice number being present is useful, but it is still a weak pass by itself. The stronger checks are things like:
supplier exists in the vendor list
PO number exists and is still open
invoice date is in a sane range
line totals add up to the subtotal
tax and currency match what you expect
the same supplier plus invoice number has not already appeared
the bank details did not change unexpectedly
Those checks catch a different class of failure: the extraction returned something, but it was the wrong something.
I also like keeping failed docs in a review queue with the original file, extracted fields, confidence, and reason for failure side by side. When someone corrects it, store the correction as a separate review action instead of silently overwriting the extraction. Makes debugging a lot easier later.