for Pharma
Toggle menu
Answers · Pharma data quality

What should we validate in Veeva CRM data before it feeds field reports?

Validate the relationships, not the formats. Veeva CRM activity arrives daily and well structured, so its failures sit at the joins: calls logged against accounts missing from the account master, prescriber keys that resolve to zero or two master records, and activity and performance computed on different alignment versions. Each passes every column-level check.

Chris Bergh Published

Key points

  • In DataKitchen's pharma platform, CRM samples are a time-series fact of date, prescriber, product, and quantity, so every sample row has to resolve to a master prescriber by NPI and to a valid product and NDC.
  • Activity logged against an account that never made it into the account master disappears from the roll-up, with every value in the call record still valid.
  • Field activity and field performance computed against different alignment versions never reconcile, which is why the alignment version is a test, not a convention.
  • A transposed NPI is ten digits, all numeric, and passes a pattern check, then silently drops a prescriber from the join between a specialty pharmacy feed and Veeva.
  • Business rules the field already states, such as a rep not holding two territories in the same week, are tests waiting to be written.

Veeva CRM is the best-behaved feed you have. It comes from your own system, it arrives daily, and the data sources reference calls it generally well structured. That is exactly why its failures get missed. They are never in the call record. They are in what the call record joins to.

At one rare-disease biotech, Veeva CRM carried field activity, territory alignment, and sales goals, Veeva Network held the HCP master, and Veeva Vault held medical communications. Field activity, the weekly report reps live in, joins prescriber reference, alignment, targeting, and activity data to show calls and samples against plan. Every one of those joins is a place for a row to vanish.

Six checks that sit at the joins

CheckFailure it catchesTest
Every call’s account exists in the account masterCalls disappear from the roll-upReference Match, CRM activity to account master
Every prescriber key resolves to exactly one master recordA transposed NPI drops a prescriber; a duplicate splits creditValid NPI, then Unique Values on the master key
Activity and performance read the same alignment versionThe two field reports never reconcileReference Match on the alignment version before the join
Territory totals still tie to the national total after an alignment loadA realignment moves a rep’s numbers with every value validAggregate Balance against the prior delivery
Every target on the call plan still exists in the current masterReps are sent to prescribers who are goneReference Match, target list to prescriber master
Every sample row resolves to a master prescriber and a product in the product dimensionSample drops credited to nobody, or to a product the dimension lacksReference Match, sample fact to prescriber master and product dimension

Failure modes from the data sources reference; tests from the commercial pharma testing post; the sample row follows how the platform models samples as a fact table.

Column checks see none of these. The account ID in the call is well formed. It just isn’t in the master. The testing post names this exact case, an account with sales activity that never made it into the account master, as the kind of failure only a test comparing two tables can see.

Prescriber keys are where Veeva meets everything else

Your call data is clean. The trouble starts when it meets a prescriber from another source. A transposed NPI in a specialty pharmacy feed no longer matches the NPI in Veeva, and the join drops that prescriber with the pattern test green. Two prescriber files that disagree put a ghost on the targeting list, and alignment double-counts.

Veeva Network is one input to the master, not the whole answer. It tells you what it could match. An analytic master that links NPI, ME, DEA, and vendor provider IDs keeps the prescribers Network never mastered in view. The HCP duplicates answer has the full method.

Alignment changes on a schedule, so test on that schedule

Alignment is the part of CRM data that moves. The quarterly Veeva alignment load is one of the manual jobs hourly offshore teams spend their time on, next to chasing late vendor files and HCP master stewardship. After it lands, a rep’s numbers can drop 40 percent overnight while the underlying data stays correct.

Run the alignment checks on the load itself. If the national total holds and territories move, the mapping did it. If activity and performance disagree, check which alignment version each one read. The alignment and incentive comp answer covers the payout side.

Turn the field’s rules into tests

Sales operations already knows rules no profiler can infer. When sales ops says a rep cannot hold two territories in the same week, that becomes a test. When the incentive comp analyst says samples do not count toward quota, that becomes a test too. Each is a Custom Condition, one row-level rule in your repository rather than a line in a spec.

Profiling covers the rest. Freshness and volume checks on the daily CRM extract catch a missed or partial delivery, and DataOps TestGen generates them from what it observes.

Samples are a fact table, so test them like one

In DataKitchen’s pharma platform, samples are time-series data. Each row is a date, a prescriber, a product, and a quantity, and it lands in a fact table in one of the interlinked star schemas that share physician, product, time, and territory dimensions. So a sample is a join problem like the rest of CRM.

It gets the tests any fact keyed to an HCP and a product gets. Every row resolves to a master prescriber by NPI. Every product key resolves to a valid product and NDC in the product dimension. No orphan keys on either side. Volume and distribution checks run over time, so a week with half the usual drops, or one product’s share jumping, gets flagged before the field activity report shows it. And the loaded rows reconcile against the source extract.

Follow-up questions

Frequently asked questions

Why do rep calls go missing from field activity reports?

Usually because the call was logged against an account that never made it into the account master. The call record is complete and valid, so null and format checks pass, but the join to the master drops it and the call disappears from the roll-up. A Reference Match test from CRM activity to the account master surfaces those calls before the weekly report runs.

Why don't our field activity and field performance reports reconcile?

Often because they were computed against different alignment versions, and two reports built on two versions never reconcile, however clean each one is. Test that both reports read the same alignment version before you join them, then check that territory totals still tie to the national total.

Is Veeva Network enough to master our prescribers?

It is one input, not the whole answer. Veeva Network tells you what it could match. Prescribers it never mastered still appear in syndicated, specialty pharmacy, and claims feeds, and quietly excluding them is how a launch loses prescribers no report mentions. An analytic master that links NPI, ME, DEA, and vendor provider IDs keeps those prescribers visible and testable.

What business rules should become tests on CRM data?

The ones sales operations already says out loud. When sales ops says a rep cannot hold two territories in the same week, that becomes a test. When the incentive comp analyst says samples do not count toward quota, that becomes a test too. Profiling generates the format and volume checks; these rules encode what no profiler can infer, and they belong in your repository.

How should we test sample data from Veeva CRM?

As a fact table. In DataKitchen's pharma platform, samples are time-series rows of date, prescriber, product, and quantity, stored as a fact in one of the interlinked star schemas. Every row should resolve to a master prescriber by NPI and to a valid product and NDC in the product dimension, with no orphan keys. Volume and distribution checks over time, plus reconciliation to the source extract, catch a missing or partial delivery.

Does DataKitchen run territory alignment or call planning?

No. DataKitchen does not do incentive compensation, territory alignment, call planning, or brand strategy. It builds and tests the commercial data layer underneath them, including the joins between Veeva CRM, the prescriber master, and the alignment those systems read. Your commercial team keeps the decisions about who calls on whom.

Talk to the team that tests this data every week.

Half an hour on your stack, your launch window, and what the first sprint would look like.