PerfectParser Docs
User GuidesParser Setup Guides

Set Up Billing Fields and Line Items for Invoices

Configure invoice fields in the dashboard — define billing fields, run a test batch, and export structured data without writing code.

Ready to set this up? Sign up for PerfectParser and get 20 free credits — no credit card required.

What this guide helps you do

This guide shows how to configure an invoice parser in PerfectParser, choose billing fields, run a test batch, and export structured results. Leave the AI prompt blank on your first auto-detect pass if you want the broadest field discovery — add the suggested prompt below only when you need tighter mapping to specific invoice fields.

Why invoices are hard to parse

Invoices look simple on the surface, but vendor layouts vary widely — some put the invoice number in the header, others bury it near payment instructions. Tax lines may appear as a single VAT total or as per-line tax columns, and multi-page invoices often repeat headers while line items continue on page two. Currency symbols and decimal separators differ by region, so a parser configured on US-format invoices may misread European totals unless field types and descriptions are explicit. Getting the line_items table right is usually the hardest part: quantity, unit price, and line total must stay aligned row by row, and subtotal or tax fields must not be stored as plain text when you need them for reconciliation.

We suggest configuring the following schema fields for your Invoice Parser to capture all essential billing data. You can add, edit, or remove these fields at any time in the schema editor.

Field NameTypeDescription
invoice_numberTextThe unique invoice reference or identifier (e.g., INV-2026-001).
vendor_nameTextThe name of the supplier or business billing you.
vendor_tax_idTextThe supplier's tax registration or VAT number (e.g., EU123456789).
issue_dateTextThe date the invoice was generated by the supplier.
due_dateTextThe payment deadline or due date.
subtotalNumberThe net amount before taxes, discounts, or shipping.
tax_amountNumberThe total tax or VAT amount billed.
total_amountNumberThe final gross amount due.
currencyTextThe billing currency code (e.g., USD, EUR, GBP).
line_itemsTableTable containing description, quantity, unit_price, and total_amount for each row.

AI Prompt (Optional)

Use this only when you want to guide auto-detect toward a specific set of fields.

If you want PerfectParser to discover additional fields on its own, leave the AI Prompt (Optional) box blank for the first pass, review the detected schema, then add a prompt only if you need tighter consistency.

When you do use a prompt, copy and paste the following instructions into the AI Prompt (Optional) field during setup:

Extract the billing details including the invoice number, supplier/vendor name and tax details, invoice issue and due dates, subtotal, total tax, currency, and total amount due. Also extract the line items table containing the item description, quantity, unit price, and total line amount.

Set up this parser in the dashboard

Create a parser

Go to Parsers → New Parser in the dashboard. Give it a name like "Invoice Parser" and optionally select the document category.

Upload a sample document

Drag and drop a representative invoice (PDF, PNG, or JPEG). Use a real file from one of your suppliers — the AI uses it to learn where fields appear on that layout.

Detect fields or use standard fields

Paste the AI Prompt from the section above into the AI Prompt (Optional) box if you want tighter field mapping, then click Auto-Detect. To discover more fields automatically, leave the prompt blank and click Auto-Detect. Or skip auto-detect and add fields manually using the Recommended Fields table above.

Review and save your schema

Check that each detected field matches the correct type (Text, Number, or Table). Confirm subtotal, tax_amount, and total_amount are Number, not Text. Edit any field names or descriptions, then click Save.

Run a test batch

Navigate to Bulk Extraction, choose how your files are organised, upload a small test set of invoices, and click Extract All Files. Review the results in Batch History and export to CSV or Excel.

Common mistakes

  • Storing subtotal, tax_amount, or total_amount as Text instead of Number, which breaks totals in exports and downstream systems.
  • Skipping the line_items table and capturing only header totals — you lose item-level detail needed for PO matching or GL coding.
  • Using a credit note or pro-forma as the sample document when your production files are standard tax invoices with different field placement.
  • Mapping currency from a symbol alone (e.g. "$") without checking whether the vendor bills in USD, CAD, or another dollar-denominated currency.

Next steps

Test your first extraction free — sign up for PerfectParser, no credit card needed.

FAQs

Do I need a sample invoice to set up this parser?

Yes. Upload one representative invoice from a key supplier during setup. The AI uses it to learn where fields like invoice number, vendor name, and line items appear on that layout. You can refine the schema after the first auto-detect pass.

Should I use auto-detect or add fields manually?

Start with auto-detect after pasting the AI Prompt below — it usually captures most fields in one pass. Switch to manual entry if your invoices use non-standard labels (for example, 'Bill Ref' instead of 'Invoice Number') or if auto-detect misses the line items table.

How many credits does setup and a test extraction use?

Parser setup itself is free. Each page processed during a test batch costs 1 credit. A typical single-page invoice uses 1 credit; a three-page invoice uses 3. Your account includes 20 free credits to run initial tests.

Looking for product features and use cases?

See the Invoice Data Extraction solution page.

On this page