You read ONE PURCHASE ORDER AND THE SUPPLIER ACKNOWLEDGMENT RECEIVED AGAINST IT -- what a buyer asked for, line by line, and what the supplier answered -- and you extract structured fields from it. You return JSON and nothing else.
THE THREE FACTS COMPARED ARE QUANTITY, UNIT PRICE AND DELIVERY DATE. The question is whether the supplier's answer matches the order, and where it does not, whether the difference is one that is supposed to be there. A supplier who answered at all is NOT a finding -- most lines here were answered, that is what an acknowledgment is. A supplier who answered DIFFERENTLY, or who answered NOTHING, is.
You are PROPOSING a follow-up list for a qualified person to act on. You never accept or approve an acknowledgment, never write to or amend a purchase order, never contact a supplier, never send a chase, and never decide whether an acknowledged price or quantity should be accepted. The rulebook below is an ILLUSTRATIVE rulebook shipped with this kit; it is not a law, a regulation, an EDI guideline or anybody's procurement policy, and it is not an authority.
RULES, in order of importance:
1. THE ROSTER IS `Order Lines`, NOT THE ACKNOWLEDGMENT. Return one object per row of `Order Lines`, in the order that section lists them, and no others -- INCLUDING the rows the supplier never answered. A line with no acknowledgment row is not a line to leave out; it is the most important row on the page. THE `Supplier Acknowledgment` SECTION CARRIES ROWS FOR LINE REFERENCES THIS ORDER DOES NOT HAVE -- a supplier answering an older order, or a line that was cancelled. Reporting one of those is as wrong as missing a real one. Never invent a line.
2. THE TWO SECTIONS ARE IN TWO DIFFERENT ORDERS AND NEITHER MATCHES THE OTHER. Join by line reference, matched exactly and in full. L040 and L400 are different lines.
3. If the acknowledgment carries NO ROW at all for a line, every `ack_` field is null and both derived numbers are null. That is not a gap in your answer, it is a fact about the extract, and it is what makes the line unacknowledged. Never carry a value across from the order and never infer one.
4. If a row is there and a value on it is not stated, return null for that value. Do not infer it and do not use what you know about the world.
5. COPY THE ACKNOWLEDGMENT'S OWN ITEM REFERENCE VERBATIM into `ack_item_ref`. It is NOT always the same reference the order line names. Do not correct it, do not normalise it and do not copy the order's reference across -- that difference is evidence and you would be destroying it.
6. `price_gap_minor` is DERIVED AND IS NEVER STATED. It is the ABSOLUTE difference, IN MINOR UNITS (hundredths), between the ACKNOWLEDGED unit price and the ORDERED unit price -- against the ORDER, not against any contracted price. 1.28 against 1.35 is 7. Return 0 where they are equal and null where either is not recorded.
7. `slip_days` is DERIVED AND IS NEVER STATED. It is the promised date MINUS the requested date, in whole days, SIGNED. A promise EARLIER than requested is NEGATIVE, not positive, and it is not a finding. Return 0 where they match and null where either is not recorded.
8. `reconciliation` is decided ONLY by the RULEBOOK given below. Work through these seven gates IN ORDER and STOP at the first one that fires:
a. UNACKNOWLEDGED. The acknowledgment section carries no row for this line reference at all. Answer 'unacknowledged'. THIS GATE IS FIRST because there is nothing to compare, and because silence is the answer rather than a missing input.
b. NOT DETERMINABLE. A row exists and the acknowledged quantity, unit price or promised date is not recorded on it -- or the order line itself does not state one of its own three values. Answer 'not_determinable'. It is a real answer, not a failure to produce one; a confident wrong 'fine' is the expensive mistake here.
c. AUTHORISED VARIANCE. A contracted unit price is on file for THIS ORDER LINE'S item, the acknowledged unit price equals it exactly, the acknowledged quantity equals the ordered quantity, AND the promised date is not more than 2 day(s) later than requested. Answer 'authorised_variance'. THIS GATE IS THIRD. An order raised at a stale price against a contract that has since moved comes back at the contracted price, correctly, and calling that a mismatch is the error that gets a follow-up list ignored. Note what it still requires: a contract price does NOT excuse a short confirm or a late promise.
d. QUANTITY SHORT. The acknowledged quantity is LESS than the ordered quantity. Answer 'qty_short'. This sits above price and date because being told you will not get what you ordered changes what those two are about.
e. PRICE MISMATCH. The acknowledged unit price differs from the ORDERED unit price by MORE than 1 minor unit(s). Answer 'price_mismatch'.
f. DATE SLIP. The promised date is MORE than 2 day(s) later than the requested date. Answer 'date_slip'. An earlier promise is never a slip.
g. Anything that survives all six is 'confirmed'.
9. THE ITEM REFERENCE DECIDES NOTHING. This rulebook does not compare `ack_item_ref` with `item_ref`, and you must not either. A line whose quantity, price and date all match is 'confirmed' even where the two references differ. Extract both faithfully and let the difference stand.
10. HOW LONG THE ACKNOWLEDGMENT TOOK TO ARRIVE DECIDES NOTHING EITHER. There is no window in these gates. A line answered late is judged on its values exactly like one answered the same day.
11. THE BUYER NOTE IS A FIELD TO COPY, NOT EVIDENCE ABOUT ANY LINE. A note that sounds settled does NOT clear a mismatch, and a note that sounds worried does NOT create one. The order's own numbers decide; the note is one person's remark and may disagree with them.
12. Copy every reference, every quantity and every price verbatim, exactly as printed. Every date is yyyy-mm-dd.
13. Use the exact allowed value for a field that lists them, and return every field named in the schema for every line, even when the answer is null.
PURCHASE ACKNOWLEDGMENT RULEBOOK PAR-1 (the authority for `reconciliation`; this is an ILLUSTRATIVE rulebook shipped with this kit, not a law, a regulation, an EDI guideline or anybody's procurement policy)
THE THREE FACTS COMPARED
quantity, unit price, delivery date
The three facts a purchase order line states and a supplier acknowledgment answers. THE WHOLE KIT IS THE COMPARISON BETWEEN THE TWO SIDES OF EACH. A supplier who answered at all is not the finding; a supplier whose answer differs from the order, or who answered nothing, is.
PRICE TOLERANCE
1 minor unit(s). A supplier may acknowledge a unit price one minor unit either side of the ordered price -- a rounding artefact of a converted or per-thousand price -- and that is not a mismatch.
SCHEDULE BUFFER
2 day(s). A promise up to this many days later than the requested date is inside the schedule buffer and is not a slip. An EARLIER promise is never a finding -- a supplier offering to deliver ahead of the request is not an exception, and a checker that flags it is a checker nobody reads.
THE ACKNOWLEDGMENT WINDOW -- AND WHY IT DECIDES NOTHING
3 day(s), ASSUMED: NOT SUPPLIED BY ANY OPERATOR. No acknowledgment window exists for this use case; one had to be set to compute anything at all, so 3 days was set FOR THIS KIT and marked as an assumption rather than published as a policy.
THE WINDOW DECIDES NOTHING AND THAT IS THE POINT. The kit computes how long an order sat before the acknowledgment arrived -- or, where none arrived, how long it has been sitting at the moment the extract was taken -- and reports it. It does NOT use it to reach a status: `unacknowledged` fires on the ABSENCE of an acknowledgment line, never on its age. While `assumed` is true, every window reading renders `unconfirmed` and is never a finding. Supply a real window and the flag becomes answerable; until then a number nobody agreed to must not sit underneath a flag somebody acts on.
THE SEVEN GATES, IN ORDER. STOP AT THE FIRST THAT FIRES.
1. UNACKNOWLEDGED: The Supplier Acknowledgment section carries no line for this order line at all.
why: SILENCE IS THE ANSWER, AND IT IS THE ONE AN INCOMING-DOCUMENT MATCHER CANNOT GIVE. A check that walks the acknowledgments it received and compares each to its order line has no row to walk for a line nobody answered, so the line is invisible to it rather than clean. This gate is first because there is nothing to compare, and because it is the population the audit question actually asks about.
2. NOT_DETERMINABLE: An acknowledgment line exists for this order line, and at least one of the acknowledged quantity, unit price or promised date is not recorded on it -- or the order line itself does not state one of its own three values.
why: On a follow-up queue the expensive mistake is a confident wrong 'fine'. A line answered with a value missing is a record somebody has to open -- not a line that can be cleared, and not a line anybody can chase the supplier about until it is read.
3. AUTHORISED_VARIANCE: A contracted unit price is on file for this item for this period; the acknowledged unit price equals it to the minor unit; the acknowledged quantity equals the ordered quantity; and the promised date is not later than requested beyond the buffer.
why: This is the difference that is SUPPOSED to be there. An order raised at a stale price against a contract that has since moved will come back acknowledged at the contracted price, correctly, and a queue that reports every one of them buries the real mismatches underneath them. ⚑ NOTE WHAT IT REQUIRES: the quantity and the date must still be right. A contract price does not excuse a short confirm.
4. QTY_SHORT: The acknowledged quantity is LESS than the ordered quantity.
why: The supplier is telling you that you will not get what you ordered. That is a supply decision rather than a paperwork one, and it sits above the price and date gates because it changes what those two are about: a price per unit on two thirds of a line is a different conversation from a price per unit on all of it. ⚠︎ AN ACKNOWLEDGED QUANTITY GREATER THAN ORDERED IS OUT OF SCOPE HERE and would fall through to the gates below. The corpus contains none and evals/check_labels.py asserts that, so nothing is silently mis-scored -- but a real acknowledgment file contains them and this rulebook does not answer for them.
5. PRICE_MISMATCH: The acknowledged unit price differs from the ordered unit price by more than the price tolerance, and no contracted price on file explains it.
why: The line will not three-way match at invoice. It is named separately from a date slip because it goes to a different desk: somebody has to decide whether to accept the price, and no expediting call answers that.
6. DATE_SLIP: The promised date is later than the requested date by more than the buffer.
why: The line is confirmed and it is late. That is a schedule problem a planner absorbs or escalates, and it is deliberately NOT the same finding as a price change -- routing both into one queue is how the one that needs a decision gets buried under the one that needs a phone call.
7. CONFIRMED: Everything else: the supplier acknowledged this line at the ordered quantity, at a price within tolerance, on or before the requested date plus the buffer.
why: Nothing needs doing. ⚠︎ AND NOTE WHAT THIS DOES NOT SAY. It does not say the supplier acknowledged the RIGHT ITEM -- see `item_identity_note`.
THE SEVEN STATUSES
confirmed, authorised_variance, date_slip, price_mismatch, qty_short, unacknowledged, not_determinable
WHAT PUTS A LINE ON THE FOLLOW-UP LIST
unacknowledged, qty_short, price_mismatch, date_slip -- The four statuses that put a line on somebody's follow-up list today. `confirmed` and `authorised_variance` are the two answers that mean nothing needs doing. `not_determinable` means the RECORD needs opening rather than the SUPPLIER needing chasing, and it is deliberately not on the exception list for that reason -- it is reported and counted beside the list instead.
THE PRICE GAP
The absolute difference between the acknowledged unit price and the ORDERED unit price, in minor units. Not against the contracted price -- against the order, because the question is what the buyer asked for and what the supplier answered. Null where either price is not recorded, and null where the supplier acknowledged nothing.
THE SLIP IN DAYS
The promised date minus the requested date, in whole days, SIGNED. Negative means the supplier promised earlier than requested, which is not a finding. Null where either date is not recorded, and null where the supplier acknowledged nothing.
WHAT THE RULEBOOK DOES NOT LOOK AT
⚑ THE ONE THING THIS RULEBOOK DOES NOT LOOK AT. The acknowledgment states the supplier's own item reference beside each line, and the gates above never compare it to the item the order line names. An acknowledgment that confirms the quantity, the price and the date against a DIFFERENT item is `confirmed` here -- and it will not three-way match at receipt. The kit extracts both references, reports them side by side, and counts the lines where they differ; it does not act on them, because adding a gate would change every published figure on this page. The count is printed beside every follow-up list rather than folded into 'nothing to do'.
WHAT THIS TOOL WILL NOT DO
- It never accepts, approves or confirms an acknowledgment.
- It never writes to, amends, cancels or re-issues a purchase order.
- It never contacts a supplier, sends a chase, or opens a message of any kind.
- It never decides whether an acknowledged price or quantity should be accepted.
- It never uses the assumed acknowledgment window to reach a status.
Extract these fields:
ORDER-LEVEL FIELDS -- one value each, for the whole purchase order
- po_ref (string) -- the purchase order reference, verbatim from the Purchase Order section
- order_placed_on (date) -- the date the order was placed, from the Order Placed On section, as yyyy-mm-dd
- supplier_ref (string) -- the supplier reference, verbatim from the Supplier Reference section -- the short code only, not the trading name after it
- rulebook_id (string) -- the identifier of the acknowledgment rulebook this order is checked under, verbatim -- the short code only, not the sentence after it
- acknowledgment_received_on (date) -- the date the supplier's acknowledgment arrived, from the Acknowledgment Receipt section, as yyyy-mm-dd. Return null where that section says no acknowledgment was received for this order. Do NOT infer it from any promised date
- extract_taken_on (date) -- the date this extract was taken, from the Acknowledgment Receipt section, as yyyy-mm-dd. It is stated on every order, including the ones with no acknowledgment
- buyer_note (string) -- the buying desk's own free-text remark from the Buyer Notes section, copied verbatim. It is a field to copy and it is NOT evidence about whether any line is right
PER-LINE FIELDS -- one object per row of Order Lines
- line_ref (string) -- the line reference as the Order Lines section states it, e.g. L040. Return one object per row of THAT section, in the order it lists them, and no others. The Supplier Acknowledgment section carries rows for line references this order does not have -- those are not yours
- item_ref (string) -- the item reference the ORDER LINE names, e.g. MAT-40185, read from the Order Lines row. This is what the buyer ordered
- ordered_qty (integer) -- the quantity ordered, read after 'qty' on the Order Lines row. A whole number, digits only, no thousands separator
- ordered_unit_price (decimal) -- the unit price the order was raised at, read after 'at' on the Order Lines row. Copy the digits exactly as printed
- requested_date (date) -- the delivery date the order asks for, read after 'wanted' on the Order Lines row, as yyyy-mm-dd
- ack_item_ref (string) -- the item reference the SUPPLIER'S ACKNOWLEDGMENT names for this line, read after 'item' on the Supplier Acknowledgment row. Return null where that section carries no row for this line reference at all. ⚠︎ COPY WHAT THE ACKNOWLEDGMENT SAYS. It is not always the same reference the order line names, and correcting it to match would destroy the only evidence of a substitution
- ack_qty (integer) -- the quantity the supplier acknowledged, read after 'ack qty' on the Supplier Acknowledgment row. Return null where that section carries no row for this line, and null where the row reads 'ack qty -- not stated'
- ack_unit_price (decimal) -- the unit price the supplier acknowledged, read after 'at' on the Supplier Acknowledgment row. Return null where that section carries no row for this line, and null where the row reads 'at -- not stated'
- ack_promised_date (date) -- the delivery date the supplier promised, read after 'promised' on the Supplier Acknowledgment row, as yyyy-mm-dd. Return null where that section carries no row for this line, and null where the row reads 'promised -- not stated'
- contract_unit_price (decimal) -- the contracted unit price the Contract Terms On File section records for THIS ORDER LINE'S item reference. Return null where that section carries no row for it. That section also carries rows for items this order does not buy
- price_gap_minor (derived) -- the ABSOLUTE difference, in MINOR UNITS (hundredths), between the acknowledged unit price and the ORDERED unit price. NO ORDER STATES IT; work it out. An integer, so a difference of 0.07 is 7. Return 0 where the two are equal, and null where either price is not recorded or the supplier acknowledged nothing. It is measured against the ORDER, not against any contracted price
- slip_days (derived) -- the promised date MINUS the requested date, in whole days, SIGNED. NO ORDER STATES IT; work it out. Negative where the supplier promised EARLIER than requested, 0 where they match. Return null where either date is not recorded or the supplier acknowledged nothing
- reconciliation (enum) one of: confirmed, authorised_variance, date_slip, price_mismatch, qty_short, unacknowledged, not_determinable -- this line's status under the shipped rulebook. Work through seven gates IN ORDER and stop at the first that fires. (1) UNACKNOWLEDGED: the Supplier Acknowledgment section carries no row for this line reference at all. (2) NOT DETERMINABLE: a row exists and the acknowledged quantity, price or promised date is not recorded on it, or the order line itself is missing one of its own three values. (3) AUTHORISED VARIANCE: a contracted unit price is on file for this line's item, the acknowledged price equals it, the acknowledged quantity equals the ordered quantity, and the promise is not later than requested beyond the buffer. (4) QTY SHORT: the acknowledged quantity is less than the ordered quantity. (5) PRICE MISMATCH: the acknowledged price differs from the ORDERED price by more than the tolerance. (6) DATE SLIP: the promised date is later than the requested date by more than the buffer -- an EARLIER promise is never a slip. (7) Anything that survives all six is CONFIRMED. Never decide it from the Buyer Notes remark, and never from how long the acknowledgment took to arrive
Return a JSON object of exactly this shape:
{"po_ref": ..., "order_placed_on": ..., "supplier_ref": ..., "rulebook_id": ..., "acknowledgment_received_on": ..., "extract_taken_on": ..., "buyer_note": ..., "lines": [{"line_ref": ..., "item_ref": ..., "ordered_qty": ..., "ordered_unit_price": ..., "requested_date": ..., "ack_item_ref": ..., "ack_qty": ..., "ack_unit_price": ..., "ack_promised_date": ..., "contract_unit_price": ..., "price_gap_minor": ..., "slip_days": ..., "reconciliation": ...}, ...]}
Use null for any field the record does not state.
PURCHASE ORDER AND ACKNOWLEDGMENT
---------------------------------
Purchase Order
--------------
PO-3250-GK
Order Placed On
---------------
2026-02-24
Supplier Reference
------------------
SUP-9056 -- Brightmoor Industrial
Acknowledgment Rulebook
-----------------------
PAR-1 -- illustrative, shipped with this kit; reproduces no real procurement rule
Order Lines
-----------
quantities are in the ordering unit of measure; prices are the trading currency's major unit
L010 MAT-44135 Tap, M8 x 1.25, spiral flute qty 40 at 7.59 wanted 2026-04-10
L020 MAT-18572 Proximity sensor, inductive, M12 qty 15 at 55.92 wanted 2026-04-27
L030 MAT-94320 Timing belt, 8mm pitch, 60 teeth qty 26 at 20.82 wanted 2026-04-01
L040 MAT-66563 Abrasive flap disc, 115mm, 60 grit qty 125 at 1.29 wanted 2026-04-05
L050 MAT-52255 Socket cap screw M6 x 25 qty 1190 at 0.28 wanted 2026-05-10
L060 MAT-23554 Solenoid valve, 5/2, 1/4 inch qty 14 at 68.05 wanted 2026-03-27
L070 MAT-78248 Carbide insert, CNMG 120408 qty 210 at 4.93 wanted 2026-04-01
L080 MAT-11952 Anti-vibration mount, 40 shore qty 115 at 7.75 wanted 2026-05-24
Supplier Acknowledgment
-----------------------
L250 item MAT-99225 ack qty 185 at 9.76 promised 2026-04-06
L190 item MAT-24911 ack qty 32 at 51.16 promised 2026-04-14
L060 item MAT-23554 ack qty 14 at 68.05 promised 2026-04-08
L040 item MAT-66563 ack qty 125 at 1.29 promised -- not stated
L070 item MAT-78248 ack qty 210 at 5.60 promised 2026-04-01
L050 item MAT-52255 ack qty 1190 at 0.32 promised 2026-05-10
L010 item MAT-44135 ack qty 40 at 7.59 promised 2026-04-06
L280 item MAT-21606 ack qty 1990 at 0.36 promised 2026-05-06
L080 item MAT-11952 ack qty 115 at 9.25 promised 2026-05-24
Acknowledgment Receipt
----------------------
acknowledgment received 2026-02-27; extract taken 2026-03-08
Contract Terms On File
----------------------
MAT-52255 contracted unit price 0.32 for this period
MAT-14331 contracted unit price 0.58 for this period
Buyer Notes
-----------
Flagged this one for a second pass -- the acknowledgment did not read right to me.