Prompt

Need configurable schemas for different vendor invoice formats

Technology / Data Infrastructure1 observationLast seen Oct 12, 2026

Latest observation

Oct 12, 2026OpenAI APIWeb search: off

Yes — the right way to handle multiple vendor invoice formats is to make your schema configurable per vendor instead of hardcoding one invoice shape.

Recommended approach

1) Define a common core invoice model

Keep a shared base structure for fields that most invoices have:

  • invoice_number
  • invoice_date
  • vendor_name
  • vendor_address
  • subtotal
  • tax
  • total
  • currency
  • line_items

2) Add vendor-specific schema extensions

Each vendor can override or extend the base schema with its own fields and parsing rules, for example:

  • PO number
  • customer account ID
  • service period
  • payment terms
  • tax breakdown
  • custom line-item attributes

3) Store schema config separately

Use a schema registry or configuration file per vendor, such as:

  • JSON Schema
  • YAML config
  • database-backed schema definitions

Example:

{
  "vendor_id": "acme_corp",
  "base_schema": "invoice_v1",
  "fields": {
    "invoice_number": {"required": true, "path": "$.header.inv_no"},
    "invoice_date": {"required": true, "path": "$.header.date"},
    "total": {"required": true, "path": "$.summary.total_amount"},
    "po_number": {"required": false, "path": "$.header.po"}
  }
}

4) Support mapping rules

If invoices come from OCR or EDI/PDF extraction, add mapping rules like:

  • field aliases
  • regex patterns
  • conditional logic
  • default values
  • nested paths

5) Version your schemas

Vendors often change formats. Use versioning like:

  • vendor_x_invoice_v1
  • vendor_x_invoice_v2

This makes changes safe and traceable.


Example JSON Schema pattern

Base schema

{
  "$id": "invoice_base",
  "type": "object",
  "required": ["invoice_number", "invoice_date", "vendor_name", "total"],
  "properties": {
    "invoice_number": { "type": "string" },
    "invoice_date": { "type": "string", "format": "date" },
    "vendor_name": { "type": "string" },
    "total": { "type": "number" },
    "currency": { "type": "string" }
  }
}

Vendor-specific schema

{
  "$id": "vendor_acme_invoice",
  "allOf": [
    { "$ref": "invoice_base" },
    {
      "type": "object",
      "properties": {
        "po_number": { "type": "string" },
        "service_period": { "type": "string" }
      }
    }
  ]
}

Best practices

  • Use a canonical invoice model internally
  • Keep vendor-specific parsing isolated
  • Make fields optional by default, required per vendor
  • Add validation and error reporting
  • Support schema versioning
  • Keep sample documents for each vendor to test extraction

If you want implementation options

I can help you build this in any of these ways:

  1. JSON Schema-based design
  2. Database schema registry
  3. Python/Pydantic models
  4. Node.js/TypeScript interfaces
  5. OCR/invoice extraction pipeline

If you want, I can generate a complete configurable invoice schema design with examples for 2–3 different vendors.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.