Sections
ϟPULSSIX
Automation / Evergreen guide

Data validation for automation: stop bad records before they create bad results

Build a small validation contract, a review queue and a realistic test matrix before connecting an automation to live systems.

PULSSIX Desk /
2 min read (approx.)
Computer screen displaying programming code
Programming code on a computer; illustrative photograph · luis gomes · CC0 (cropped/resized)
In this article
  1. An accepted message is not a valid record
  2. Define the contract in plain language
  3. Use four illustrative test cases
  4. Keep invalid records recoverable
  5. Be careful with apparent savings
  6. Maintain the contract like a product
  7. Explore the topic

An accepted message is not a valid record

A form, webhook or spreadsheet may deliver a well-formed record containing an impossible amount, missing customer ID or unexpected date format. If the next module blindly accepts the values, the error can spread to invoices and reports. Put validation near the entry of the workflow, before expensive model calls or external side effects.

Define the contract in plain language

For a booking request, require a stable booking ID, a supported service code, an unambiguous date and a positive quantity. Decide whether an email address is optional and whether extra fields should be accepted. A schema can check structure and types, but may not establish that a customer exists or a date is available. Perform those business checks separately.

Use four illustrative test cases

A valid booking with all fields should pass. A missing booking ID should be sent to a review queue. A text quantity such as “three” should be rejected or normalized only according to an explicit rule, never silently replaced with zero. A valid-looking service code that is not available in the catalog should fail the business check. Add repeated IDs and unexpected field names to cover duplicate deliveries and upstream changes.

Keep invalid records recoverable

Record a minimal reference, failure reason, validator version and timestamp. Show actionable error messages such as “unsupported service code” rather than a generic failure. Limit retained personal information and protect diagnostic logs. A reviewer can correct or request missing data, then resubmit using the same logical event identity and an audit trail. Avoid automatic retries for errors that will not change without intervention.

Be careful with apparent savings

Suppose a workflow receives 1,000 records and 80 fail an inexpensive validation check. With a hypothetical downstream cost of €0.02 per record, skipping those calls avoids €1.60 of downstream charges. The larger value may be avoiding incorrect writes and costly manual corrections. Validation also has its own cost; measure realistic error rates and reviewer workload rather than assuming that stricter checks always save money.

Maintain the contract like a product

Version your rules when an upstream app changes. Test known valid and invalid samples before deploying the change, then monitor rejection rates. A sudden increase in invalid records may signal an integration change, not unreliable customers. Review the exception queue regularly and update rules only after checking whether the previous decision was intentional.

Primary source · JSON Schema · Object validation

JSON Schema · Type-specific validation

Explore more: Automation stories · Free tools

Explore the topic

Explore the collection: Automation library