What should a commercial data vendor file specification and acceptance agreement include?

A commercial data vendor file specification should state the grain, the delivery cadence and window, a control record with row counts and amount totals, event and calendar definitions, units and identifier formats, a restatement and correction policy, notice before any layout change, the tests a file must pass to be accepted, and how fast a rejected file gets fixed.

Key points

  • A commercial pharma vendor file spec is only as useful as its enforcement: every clause should map to a test that runs on each delivery, so acceptance is a result rather than an opinion.
  • A control record with row counts and amount totals lets you reconcile every delivery exactly, at fixed precision, instead of guessing whether 26,000 rows against a normal 40,000 is a partial file.
  • Many syndicated products revise the most recent months on every refresh, so the spec has to name the restatement window; a rule that forbids all change fires every week, and a rule that ignores change misses real breaks.
  • Event definitions belong in the spec: specialty pharmacies disagree on what ship, fill, and dispense dates mean and on when a referral counts.
  • At one rare-disease biotech, in a DataKitchen case published August 2026, getting one specialty pharmacy fix landed took several rounds and nobody in the chain held a service level agreement worth invoking.

Most commercial data agreements describe the file and stop. The columns are listed. The delivery day is named. Nothing says what happens when the file arrives short, late, or rewritten.

That gap is how a short file reaches the field report.

At one rare-disease biotech, the specialty pharmacy sending four files a day was the single biggest source of trouble. Getting one fix landed took several rounds, and nobody in the chain held a service level agreement worth invoking.

A spec is useful only when each line can fail a delivery. Write every clause so a test can check it.

The checklist

ClauseWhat to write downThe test that enforces it
GrainOne row per what: prescriber-week, pharmacy-patient-day, invoice line. Long format, one period per rowDuplicate check on the stated grain key
Cadence and windowWeekly or monthly, the delivery day, the latest acceptable arrival time, exactly one file per periodFreshness: max load date is current; one delivery per period
Control recordRow count and the total of each amount column, sent with every fileRow count and sums reconciled exactly at fixed precision
LayoutColumn names, types, order, and allowed valuesSchema drift test fails on any rename or type change
Units and scaleUnits versus packages; dollars versus centsMetric trend per product against its own history
Event and calendar definitionsWhat ship, fill, dispense, and referral dates mean; the week definitionCustom condition on milestone order; dates map to your fiscal calendar
IdentifiersNPI with check digit; NDC level and form (11-digit package, hyphenated or not); how patient tokens are generated and when they changeIdentifier validation; token turnover between deliveries
Restatement and correctionsWhich periods can restate on refresh; how a corrected file is flagged; that older periods never moveExact match on the stable tail; shape check on the restated window
Change noticeNotice period before any layout, definition, or methodology changeSpec version recorded with each delivery
AcceptanceThe test set a file must pass; who is told when it failsTest results kept with a disposition per failure
Fix turnaroundHow fast a rejected file is replaced; who you can callTracked in your ticketing, reported monthly

Write the numbers (arrival time, notice period, fix turnaround) for your own feeds. We have not published standard values, and a number nobody tracks does nothing.

Where each clause comes from

The rows are the failures already on the record. A partial specialty pharmacy file, 26,000 rows against a normal 40,000, loads with no error. Rename RX_CNT to RxCount and the field fills with nulls. Switch a quantity from units to packages and one product jumps 10x. The vendor feed test answer turns those into the five checks every delivery gets, and the data sources reference lists the characteristic failure of 37 feeds, which is the clause each feed’s spec needs most.

Grain and format clauses exist because vendors love wide files, with periods spread across columns, and those defeat trend logic. Ask for long format. If you can’t get it, normalize before you test.

Identifier clauses need exact forms. 867 files and claims carry package-level NDCs in 11-digit form while product masters carry the two-segment product form, and a 10-digit NDC with its hyphens stripped can be three different products. Specialty pharmacies also tokenize patients their own way, which is why counting unique patients across them gives a range, not a number. The spec can’t fix that. It can require notice when a pharmacy changes its tokens.

The restatement clause is the one most specs leave out. Syndicated data is part actual, part projection, and the vendor reruns it when better inputs arrive. The restatement answer shows how to test the window and the stable tail separately. The spec should say where the line between them sits.

Make acceptance a result, not a conversation

Our data contract post describes the usual fate of a file interchange agreement: a spreadsheet sitting in someone’s inbox that nobody has opened in months. Turn each clause into a test and the agreement runs on every file. When a file fails, the vendor gets the failed clause, the field, and the size of the breach.

Open source DataOps TestGen is free, so the tests can travel too. The same post describes handing a supplier the tool and the contract and asking for a passing run before they ship.

Then put the results where the budget owner sees them. The monthly partner scorecard has a delivery reliability line, and rejected files belong on it. If you’re replacing a vendor, write the spec before the switch, because the tests that pass on the incumbent’s output are the baseline the new feed has to match.

Frequently asked questions

Short answers to the follow-up questions people ask next.

What is the difference between a file specification and an acceptance agreement?

The file specification says what a delivery contains: grain, columns, units, identifiers, cadence. The acceptance agreement says what happens to a delivery that doesn't match: which tests it must pass, who is told when it fails, and how fast the vendor sends a corrected file. A spec without acceptance terms describes the file. It gives you no way to reject one.

Should a vendor send a control record with every file?

Yes, and the spec should require it. A control record with the row count and the total of each amount column lets you reconcile staging against the vendor exactly, at fixed precision so two engines don't disagree over floating point. Without one, you fall back to volume bounds learned from the feed's own history, which flag a short file but can't prove a complete one.

How should a vendor spec handle restatements?

Name the window. Many syndicated products revise the most recent months on every refresh while older periods stay fixed, so the spec should say how many periods can restate and require that older periods match the prior delivery exactly. Then test the two parts separately: an exact match on the stable tail and a shape check on the restated months.

How much notice should a vendor give before changing a file layout?

Enough to change and test your load before the new layout arrives, written into the spec as a count of deliveries or days. A vendor that renames RX_CNT to RxCount without notice gives you a pipeline that succeeds and a metric full of nulls. A schema drift test catches the change on arrival, but notice lets you ship the fix first.

Can a vendor test its own file before sending it?

Yes, if the spec travels as tests. Open source DataOps TestGen is free and runs on the supplier's machine, so you can send the vendor the tests along with the spec and ask for a passing run before each delivery. The conversation then names the failed clause and the size of the breach instead of saying the data seems off.

Talk to the people who test this data every week

DataKitchen builds and runs commercial data platforms for small and midsize pharma, with the tests in place from day one.