Customer data glossary
Event contract (event schema)
By Art Kukharenko · Published · Updated
Browse learn glossary resourcesAn event contract is an agreed, versioned schema that defines an event's name, required fields, types and meaning, so producers and consumers can rely on it.
Part of the Learn hub and the customer data glossary.
What it means in practice
A contract turns "we send a purchase event" into a precise agreement. It specifies the event name, required and optional fields, types and allowed values, the meaning of each field, the owner, the version and the compatibility rules for change. Formats vary: JSON Schema, Avro or Protobuf, often held in a schema registry. CloudEvents is a vendor-neutral specification for describing event data, and requires four context attributes: id, source, specversion and type.
Contracts do three jobs. They keep producers and consumers in step as systems change, because a breaking change becomes a new version rather than a surprise. They allow validation at ingestion, so events that fail are rejected or quarantined instead of polluting profiles. And they are a privacy control: each field can be classified (personal, sensitive or neither) and tagged with the purposes it may serve, which supports data minimisation and purpose limitation.
A tight contract rejects unexpected fields. Free text and catch-all "properties" blobs are where unintended health or financial details leak in.
Example (healthcare): the "appointment_booked" contract allows an appointment ID, a service-line category and a timestamp. It has no diagnosis field; any extra field is dropped at the gate and counted in a data-quality report.
Related terms
- Event stream: what contracts govern.
- Event replay: needs versioned schemas.
- Data minimisation: enforced by field limits.
- Destination: consumers of the contract.
- Audit ledger: records rejections and changes.
Where it matters
- Customer data platform architecture: where contracts are enforced.
- How to run a customer data platform proof of concept with synthetic data: testing contracts safely.
Frequently asked questions
How is an event contract different from a tracking plan?
A tracking plan lists what to track and why. A contract adds machine-checkable schemas, versions and compatibility rules enforced in the pipeline.
Who owns an event contract?
The producing team owns the schema, and consuming teams and data governance review changes. Assign an owner for every event.
What should happen to events that fail validation?
Reject or quarantine them with an error record, and alert the owner. Never silently drop or accept unvalidated events.
Back to the customer data glossary or the Learn hub.
Further reading
- Customer Data Glossary: 50 Terms
- CDP Proof of Concept With Synthetic Data
- Learn about CDP
- CDP Architecture: The 3 Layers
- Audit ledger (immutable audit log)
Published: · Updated:
Publication date recorded for the approved release. Editorial updates do not establish legal approval or a customer result.