Section 1

Purchase-to-pay specification

Pilot sample: a reusable specification template, and one workflow documented with it. It is built the way the paid pilot would be: the questionnaire filled in for purchase-to-pay, then the workflow documented from the answers, including the three exceptions the post names.

Built by Lightshift for your post. An invented industrial distributor. Every company, person, number and document in this sample is synthetic. Nothing here comes from a client.

How one answer becomes a specification

Pick any question and follow it forward. Each answer becomes numbered rules, an exception path that exercises them, and tests with numbers you can check.

Product owner answers
Q-05
How close must an invoice be to the order and the receipt before it can be paid without review?
“Never pay for more than we received. The unit price may run at most 1% over the order price, and the extra on a line may not pass $25. Billing below the order price is fine, but record it.”
Becomes rules
BR-10Never bill more than received
For each order line, the total billed quantity across all invoices may not exceed the total received quantity. The excess opens a QTY hold for the difference in units.
BR-11Price tolerance
An invoice unit price may exceed the order unit price by at most 1.0%, and the line's price variance (billed quantity times the unit difference) may not exceed $25.00. Breaking either opens a PRICE hold. A price below the order price passes, and the favorable variance is recorded.
Exercised by
EX-02Invoice mismatch
Billed for 100 at a higher price.
Proved by tests
AC-05Billing beyond receipts opens a QTY hold
A QTY hold opens on the invoice with a variance of 40 boxes.
AC-06Price over tolerance opens a PRICE hold
A PRICE hold opens showing $0.40 per box, $40.00 on the line, 3.2%.

The spec is checked like code

The spec lives in plain YAML files. A script compiles them into this site and refuses to build if any reference is broken, so the document cannot quietly drift out of step with itself.

$ npm run spec
spec check passed
10
questions
20
rules
12
permissions
3
exception paths
18
acceptance tests
6
open decisions
124 cross-references checked, 0 broken. Every rule traces back to a question and forward to a test; the build fails if one doesn’t.

What’s in this sample

Scope

Scope of Release 1 for this workflow. Anything out of scope is either a later capability or an open decision.

In scope
  • PO-backed purchasing of stocked items, from purchase order to payment
  • Receiving at one warehouse, including partial deliveries
  • Vendor invoices with a line-level three-way match (order, receipt, invoice)
  • Duplicate invoice detection at capture
  • Approval for payment and payment runs
  • The postings each step hands to Finance (accrual, payable, price variance)
Out of scope
  • Non-PO invoices such as utilities and services (decision D-01)
  • Returns to vendor and debit memos (later capability)
  • Landed cost, freight allocation and multi-currency (later capability)
  • Invoice reading from PDF or email (later capability; capture is manual in release 1)