Fictional order handoff
State what the receiving team can rely on.
For order O-204, assume the receiving service validates before creating a warehouse order and can record a rejected request. These are proposed local rules, not a complete ODCS document or a tested product configuration.
Identifier
Example agreement: order_id is a required, nonempty string; O-204 retains the same source ID
If it breaks: Reject an absent or empty ID and record the reason; do not invent a replacement
Allowed status
Example agreement: Only ready orders enter this handoff; an unknown value is not mapped to ready
If it breaks: Hold the record for the source owner rather than silently choosing a default
Delivery date
Example agreement: requested_delivery_date must be a real calendar date written as YYYY-MM-DD
If it breaks: Reject an absent or invalid date before creating the warehouse order; sales operations obtains the correction
Separate update rule
Example agreement: When updating an existing order, an omitted delivery_note leaves the old note unchanged; explicit null clears it
If it breaks: This rule is separate from order creation. Test omission and null with the receiver before relying on either behaviour
Timing
Example agreement: Example local rule: the receiver validates and commits the change within five minutes of its source commit, using comparable UTC timestamps
If it breaks: Compare source commit time with receiver validation-and-commit time, linked by the same change ID. A transport receipt alone does not prove completion. Route a late or missing committed result to the integration owner; investigate clock or monitoring gaps.
Change process
Example agreement: The source owner proposes a new status and checks affected receivers before release
If it breaks: Test the new value and its business mapping; do not assume a new version is compatible
Contract vs schema
A schema checks constraints. The agreement explains their use.
JSON Schema can require a property and restrict its permitted values. That does not decide which team repairs a rejected order or whether a late update should be applied. Treat the schema as part of the agreement, rather than claiming it can only check basic types.
| Question | Machine check | Operational agreement |
|---|---|---|
| Is the order ID present? | required checks presence; a separate nonempty-string constraint rejects an empty value | Record the rejection and name the team that obtains the source ID |
| Is the status permitted? | enum can restrict the accepted values | Agree what ready means and which source states are allowed to map to it |
| Can the payload carry an extra field? | The schema can allow or reject additional properties | Test the affected consumers before changing the payload |
| What happens after validation fails? | The validator reports the fields that failed its rules | Specify the holding queue, notification and correction process |
When to write it
Write the expected result for the rejected order as clearly as the result for the valid one.
For a new integration, agree consequential rules before implementing them. For an existing integration, first compare the written agreement with actual payloads, validation and recovery. A shared definition can reduce duplicated rules, but it does not prove that every deployed consumer uses the current version.
