{
  "name": "Document intake extraction set",
  "version": 1,
  "today": "2026-12-07",
  "today_label": "Monday 7 December 2026",
  "note": "Fictional purchase orders, invoices and other documents written for this evaluation. Names do not refer to real organisations.",
  "catalog": [],
  "rules": [
    "doc_type is purchase_order, invoice or other (credit notes, questions and anything else are other)",
    "reference is the document's own number exactly as written, or null if it has none",
    "party is the organisation that sent the document (the customer on a purchase order, the supplier on an invoice)",
    "doc_date is the document date as YYYY-MM-DD, or null",
    "stated_total is the total written on the document as a number (negative for credits), or null",
    "computed_total is the sum of the line amounts, delivery and tax lines as a number, or null when there are no lines",
    "needs_review is true when stated and computed totals differ, the reference is missing on a purchase order or invoice, the document says it is a duplicate or re-sent copy, or it is a credit note; otherwise false"
  ],
  "fields": [
    "doc_type",
    "reference",
    "party",
    "doc_date",
    "stated_total",
    "computed_total",
    "needs_review"
  ],
  "cases": [
    {
      "id": "D01",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 1",
        "body": "PURCHASE ORDER PO-1042\nDate: 2 December 2026\nFrom: Birchfield Packaging Ltd\n\nItem: Dispatch scanner SC-25   Qty 12   Unit €18.00   Line €216.00\n\nTotal: €218.00"
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": "PO-1042",
        "party": "Birchfield Packaging Ltd",
        "doc_date": "2026-12-02",
        "stated_total": 218,
        "computed_total": 216,
        "needs_review": true
      }
    },
    {
      "id": "D02",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 2",
        "body": "PURCHASE ORDER\nOrder no. 77815\nDate 03.12.2026\nCustomer: Alpenblick Getränke GmbH\n\n30 x Handscanner HS-7 à 145,00 € = 4.350,00 €\n5 x Dockingstation DK-2 à 89,00 € = 445,00 €\n\nGesamt: 4.795,00 €"
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": "77815",
        "party": "Alpenblick Getränke GmbH",
        "doc_date": "2026-12-03",
        "stated_total": 4795,
        "computed_total": 4795,
        "needs_review": false
      }
    },
    {
      "id": "D03",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 3",
        "body": "INVOICE INV-2291\nIssued: 28 November 2026\nSupplier: Northgate Print Supplies\nBill to: Example Distribution\n\n40 x Thermal label roll 100x150   €6.50   €260.00\nDelivery   €15.00\n\nTotal due: €275.00"
      },
      "expected": {
        "doc_type": "invoice",
        "reference": "INV-2291",
        "party": "Northgate Print Supplies",
        "doc_date": "2026-11-28",
        "stated_total": 275,
        "computed_total": 275,
        "needs_review": false
      }
    },
    {
      "id": "D04",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 4",
        "body": "PO-1043 — Birchfield Packaging Ltd — 4 December 2026\n4 x Label printer LP-40 @ €310.00 = €1,240.00\nTotal €1,240.00\n\n(Re-sent: same as PO-1042? Please check.)"
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": "PO-1043",
        "party": "Birchfield Packaging Ltd",
        "doc_date": "2026-12-04",
        "stated_total": 1240,
        "computed_total": 1240,
        "needs_review": true
      }
    },
    {
      "id": "D05",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 5",
        "body": "Invoice\nNumber: 2026-0412\nDate: 1 Dec 2026\nFrom: Calder Office Services\n\nConsulting, 3 hours at £120.00 = £360.00\nVAT 20% = £72.00\nTotal: £432.00"
      },
      "expected": {
        "doc_type": "invoice",
        "reference": "2026-0412",
        "party": "Calder Office Services",
        "doc_date": "2026-12-01",
        "stated_total": 432,
        "computed_total": 432,
        "needs_review": false
      }
    },
    {
      "id": "D06",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 6",
        "body": "PURCHASE ORDER\nDate: 5 December 2026\nFrom: Westbrook Hardware\n\n8 x Docking station DK-2 at €89.00 = €712.00\nTotal: €712.00\n\nPlease confirm delivery date."
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": null,
        "party": "Westbrook Hardware",
        "doc_date": "2026-12-05",
        "stated_total": 712,
        "computed_total": 712,
        "needs_review": true
      }
    },
    {
      "id": "D07",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 7",
        "body": "Hello, can you tell me when our last order will ship? Thanks, Priya (Harbourview Clinics)"
      },
      "expected": {
        "doc_type": "other",
        "reference": null,
        "party": "Harbourview Clinics",
        "doc_date": null,
        "stated_total": null,
        "computed_total": null,
        "needs_review": false
      }
    },
    {
      "id": "D08",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 8",
        "body": "FACTURE N° F-5530\nDate : 30/11/2026\nFournisseur : Maison Dubois Traiteur\n\n2 x Imprimante LP-40 : 620,00 €\nTotal TTC : 620,00 €"
      },
      "expected": {
        "doc_type": "invoice",
        "reference": "F-5530",
        "party": "Maison Dubois Traiteur",
        "doc_date": "2026-11-30",
        "stated_total": 620,
        "computed_total": 620,
        "needs_review": false
      }
    },
    {
      "id": "D09",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 9",
        "body": "PURCHASE ORDER PO-889\nDate: 6 December 2026\nCustomer: Pacific Parcel\n\n50 x SC-25 at €18.00 = €900.00\n10 x SV-PRO service plan at €40.00 = €400.00\n\nTotal: €1,200.00"
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": "PO-889",
        "party": "Pacific Parcel",
        "doc_date": "2026-12-06",
        "stated_total": 1200,
        "computed_total": 1300,
        "needs_review": true
      }
    },
    {
      "id": "D10",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 10",
        "body": "Invoice INV-2310 dated 4 December 2026 from Northgate Print Supplies. 100 thermal label rolls at €6.50, total €650.00."
      },
      "expected": {
        "doc_type": "invoice",
        "reference": "INV-2310",
        "party": "Northgate Print Supplies",
        "doc_date": "2026-12-04",
        "stated_total": 650,
        "computed_total": 650,
        "needs_review": false
      }
    },
    {
      "id": "D11",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 11",
        "body": "PURCHASE ORDER PO-1201\nDate: 7 December 2026\nCustomer: Cedar Medical Supplies\n\n4 x LP-40 Label printer   €310.00   €1,240.00\n4 x Pro service plan        €40.00   €160.00\nShipping                             €0.00\n\nTotal: €1,400.00"
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": "PO-1201",
        "party": "Cedar Medical Supplies",
        "doc_date": "2026-12-07",
        "stated_total": 1400,
        "computed_total": 1400,
        "needs_review": false
      }
    },
    {
      "id": "D12",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 12",
        "body": "CREDIT NOTE CN-77\nDate: 2 December 2026\nSupplier: Northgate Print Supplies\nRefers to INV-2291: 4 damaged rolls x €6.50 = -€26.00\nTotal: -€26.00"
      },
      "expected": {
        "doc_type": "other",
        "reference": "CN-77",
        "party": "Northgate Print Supplies",
        "doc_date": "2026-12-02",
        "stated_total": -26,
        "computed_total": -26,
        "needs_review": true
      }
    },
    {
      "id": "D13",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 13",
        "body": "Order 4471 from Atlas Courier Co., placed 30 November 2026:\n6 handheld scanners HS-7 at €145.00 each.\nOrder total €870.00."
      },
      "expected": {
        "doc_type": "purchase_order",
        "reference": "4471",
        "party": "Atlas Courier Co.",
        "doc_date": "2026-11-30",
        "stated_total": 870,
        "computed_total": 870,
        "needs_review": false
      }
    },
    {
      "id": "D14",
      "email": {
        "from": "Documents inbox <documents@example.test>",
        "subject": "Incoming document 14",
        "body": "INVOICE INV-2291\nIssued: 28 November 2026\nSupplier: Northgate Print Supplies\n\n40 x Thermal label roll 100x150   €6.50   €260.00\nDelivery   €15.00\n\nTotal due: €275.00\n\n(Duplicate copy for your records)"
      },
      "expected": {
        "doc_type": "invoice",
        "reference": "INV-2291",
        "party": "Northgate Print Supplies",
        "doc_date": "2026-11-28",
        "stated_total": 275,
        "computed_total": 275,
        "needs_review": true
      }
    }
  ]
}
