This guide walks through the core workflow: create a contract, compare a file against it, and review the result.

Step 1 - Create a contract

A contract is the schema you want to enforce. It is the baseline that all incoming files are compared against.

  1. Go to Contracts in the sidebar.
  2. Click New Contract.
  3. Give it a name, e.g. Demo 850 PO.
  4. Paste or upload a sample JSON or EDI file that represents the correct structure.
  5. Optionally assign a vendor name and tags for easier filtering later.
  6. Click Save.

DriftOps stores the schema fields extracted from your file. Every future comparison checks incoming files against this stored structure.

Step 2 - Run a comparison

The comparator lets you manually compare any two files or compare a file against a saved contract.

  1. Go to Comparator in the sidebar.
  2. Upload your baseline file on the left (or select an existing contract).
  3. Upload the incoming file on the right.
  4. Click Compare.

The diff report shows:

  • Added fields present in the incoming file but not in the baseline
  • Removed fields present in the baseline but missing from the incoming file
  • Changed fields where the value type or structure differs
  • Renamed fields detected via fuzzy matching

If you linked the comparison to a contract, a drift event is created automatically.

Step 3 - Review the drift event

Drift events appear in the Drift Inbox.

Each event shows:

  • Severity: trivial (additions only), minor (renames or value changes), or major (removals or type changes)
  • A full diff with field-level change details
  • Counts for additions, removals, changes, and renames

You can resolve an event (accept the drift and optionally update the contract), ignore it (acknowledge but take no action), or reject it (flag it as invalid).

Step 4 - Set up a monitor

A monitor automates the comparison workflow. Your pipeline or trading partner POSTs files directly to a webhook URL, and DriftOps handles the rest.

  1. Go to Monitors in the sidebar.
  2. Click New Monitor.
  3. Select the contract to compare against.
  4. Click Create. DriftOps generates a unique webhook URL.
  5. Give that URL to whoever sends you files.

When a file arrives at the webhook URL, DriftOps parses it, runs the comparison, and creates a drift event if anything changed.

# Send a file to your monitor
curl -X POST https://api.driftops.io/api/webhook/{your-token} \
  -F "file=@incoming_850.json"

Rate limit: 20 requests per minute per webhook token.

Next steps