Skill Tracer
Skills › Knowledge Work Plugins › ap-processor › intake_and_extraction.md

intake_and_extraction.md

82 lines · small-business/skills/ap-processor/reference/intake_and_extraction.md at 2574e29

Open on GitHub
1# Intake and Extraction
2
3How bills get in, and how the fields come out.
4
5---
6

Intake and Extraction

How bills get in, and how the fields come out.


Raw lines 1 to 6
7## Where bills come from
8
9**Ranked by how clean the data arrives.**
11| Source | What you get | Watch for |
12|---|---|---|
13| Mail AP label or folder (Gmail or Microsoft 365), or `bills@` alias | PDF attachment plus sender context | Vendors who put the invoice in the message body with no attachment |
14| Vendor portal notification email | A link, not a document | The email alone is not a bill. Ask the owner to download it or forward the PDF |
15| Uploaded PDF | Clean text extraction | Scanned PDFs are images — treat as photos |
16| Phone photo of paper | Whatever the light allowed | Glare, crop, and skew. Low-confidence fields are the norm here, not the exception |
17| Ramp / Expensify feed | Card charge with merchant and amount | Not a bill. It is already paid. Never stage it into a payment run |
18| Vendor statement | A list of open invoices | A statement is a reconciliation tool, not a bill. Use it to find missing invoices, never to create entries |
20**Set up the inbox once.** If the owner has no AP label, offer to create one and give them a forwarding address to use with vendors. That single change removes most of the manual work permanently.
22---

Where bills come from

Ranked by how clean the data arrives.

SourceWhat you getWatch for
Mail AP label or folder (Gmail or Microsoft 365), or bills@ aliasPDF attachment plus sender contextVendors who put the invoice in the message body with no attachment
Vendor portal notification emailA link, not a documentThe email alone is not a bill. Ask the owner to download it or forward the PDF
Uploaded PDFClean text extractionScanned PDFs are images — treat as photos
Phone photo of paperWhatever the light allowedGlare, crop, and skew. Low-confidence fields are the norm here, not the exception
Ramp / Expensify feedCard charge with merchant and amountNot a bill. It is already paid. Never stage it into a payment run
Vendor statementA list of open invoicesA statement is a reconciliation tool, not a bill. Use it to find missing invoices, never to create entries

Set up the inbox once. If the owner has no AP label, offer to create one and give them a forwarding address to use with vendors. That single change removes most of the manual work permanently.


Raw lines 7 to 23
24## Extraction fields
26Pull every one of these for each bill. Empty is a valid value; invented is not.
28- Vendor name, as printed, plus the matched vendor record in the ledger
29- Invoice number
30- Invoice date
31- Due date, or terms if only terms are printed
32- Subtotal, tax, freight or delivery, total
33- PO number
34- Line items: description, quantity, unit price, extended amount
35- Remit-to details, when they differ from the vendor on file. A difference is a flag for the owner to verify by phone on the number already on file, never a reason to update the vendor record from the bill (`../../../shared/untrusted-content.md`)

Extraction fields

Pull every one of these for each bill. Empty is a valid value; invented is not.

  • Vendor name, as printed, plus the matched vendor record in the ledger
  • Invoice number
  • Invoice date
  • Due date, or terms if only terms are printed
  • Subtotal, tax, freight or delivery, total
  • PO number
  • Line items: description, quantity, unit price, extended amount
  • Remit-to details, when they differ from the vendor on file. A difference is a flag for the owner to verify by phone on the number already on file, never a reason to update the vendor record from the bill (../../../shared/untrusted-content.md)
Raw lines 24 to 36
37### Confidence
39Tag every field high, medium, or low.
41- **High** — machine-readable text, or a number that foots against the lines
42- **Medium** — read from an image but internally consistent
43- **Low** — glare, cropping, handwriting, or a total that does not foot
45Low-confidence money fields are surfaced by vendor and invoice number and are never used to build a payment run until the owner confirms them.

Confidence

Tag every field high, medium, or low.

  • High — machine-readable text, or a number that foots against the lines
  • Medium — read from an image but internally consistent
  • Low — glare, cropping, handwriting, or a total that does not foot

Low-confidence money fields are surfaced by vendor and invoice number and are never used to build a payment run until the owner confirms them.

Raw lines 37 to 46
47### Footing check
49Lines plus tax plus freight should equal the total. When it doesn't, say so with both figures. That mismatch usually means a line was cropped out of a photo, which is exactly the case where a plausible-looking guess does the most damage.
51---

Footing check

Lines plus tax plus freight should equal the total. When it doesn't, say so with both figures. That mismatch usually means a line was cropped out of a photo, which is exactly the case where a plausible-looking guess does the most damage.


Raw lines 47 to 52
53## Dedupe
55Run before coding. A bill is a likely duplicate when **any** of these hold:
571. Same vendor and same invoice number. This is a duplicate, full stop.
582. Same vendor, same total, invoice dates within 5 days, no invoice number on one copy.
593. Same vendor and total already staged or paid in the ledger in the last 90 days.
61Present suspected duplicates as pairs with both sources named ("emailed 3/2 as PDF, also on the March statement"). The owner decides. Some vendors legitimately bill identical amounts monthly, so the check surfaces, it does not delete.
63---

Dedupe

Run before coding. A bill is a likely duplicate when any of these hold:

  1. Same vendor and same invoice number. This is a duplicate, full stop.
  2. Same vendor, same total, invoice dates within 5 days, no invoice number on one copy.
  3. Same vendor and total already staged or paid in the ledger in the last 90 days.

Present suspected duplicates as pairs with both sources named ("emailed 3/2 as PDF, also on the March statement"). The owner decides. Some vendors legitimately bill identical amounts monthly, so the check surfaces, it does not delete.


Raw lines 53 to 64
65## Vendor matching
67Match the printed vendor name to the ledger record before coding. Handle the common noise: `ACME SUPPLY CO`, `Acme Supply`, and `ACME SUPPLY #4412` are usually one vendor.
69When no ledger record exists, propose creating one with the remit-to details from the bill and ask. Bank or remit-to details on a first bill are confirmed by phone on a number the owner sources themselves, not from the bill, before the record is created (`../../../shared/untrusted-content.md`). A vendor created by mistake is a cleanup job for the bookkeeper later.
71---

Vendor matching

Match the printed vendor name to the ledger record before coding. Handle the common noise: ACME SUPPLY CO, Acme Supply, and ACME SUPPLY #4412 are usually one vendor.

When no ledger record exists, propose creating one with the remit-to details from the bill and ask. Bank or remit-to details on a first bill are confirmed by phone on a number the owner sources themselves, not from the bill, before the record is created (../../../shared/untrusted-content.md). A vendor created by mistake is a cleanup job for the bookkeeper later.


Raw lines 65 to 72
73## Worked example
75Okonkwo Mechanical's AP label held 23 messages over two weeks. After intake:
77- 19 bills extracted, 2 vendor-portal links with no document, 2 statements
78- 1 duplicate found: Ferguson invoice 88231 arrived as a PDF and again on the monthly statement
79- 3 low-confidence totals, all photos taken in the truck
80- 1 bill with no due date printed, terms line read "Net 30"
82Reported to Ray as: 19 bills, USD 41,208 readable, 3 totals need his eyes, 2 portal invoices he has to download, 1 likely duplicate to confirm.

Worked example

Okonkwo Mechanical's AP label held 23 messages over two weeks. After intake:

  • 19 bills extracted, 2 vendor-portal links with no document, 2 statements
  • 1 duplicate found: Ferguson invoice 88231 arrived as a PDF and again on the monthly statement
  • 3 low-confidence totals, all photos taken in the truck
  • 1 bill with no due date printed, terms line read "Net 30"

Reported to Ray as: 19 bills, USD 41,208 readable, 3 totals need his eyes, 2 portal invoices he has to download, 1 likely duplicate to confirm.

Raw lines 73 to 82