{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/opportunity/v2.json",
  "title": "opportunity contract v2",
  "type": "object",
  "required": [
    "bid_status",
    "currency",
    "external_id",
    "occurred_at",
    "outcome",
    "title",
    "value"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Human identity of the opportunity, truncated to 500 characters.",
      "x-demiton-requiredness": "required"
    },
    "value": {
      "type": "number",
      "description": "Estimated opportunity value, `INSTANTANEOUS`.",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "currency of the `CURRENCY` axis (AUD for the BC binding)"
    },
    "outcome": {
      "type": "string",
      "description": "`won`, `lost` or `open`.",
      "x-demiton-requiredness": "required"
    },
    "project": {
      "type": "string",
      "description": "The project/job anchor, when one resolves.",
      "x-demiton-requiredness": "optional"
    },
    "currency": {
      "type": "currency",
      "description": "Denomination of `value`.",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "ISO 4217"
    },
    "customer": {
      "type": "string",
      "description": "The customer entity anchor, when the source row names a contact company/number.",
      "x-demiton-requiredness": "optional"
    },
    "estimator": {
      "type": "string",
      "description": "The internal estimator assigned to the pursuit.",
      "x-demiton-requiredness": "optional"
    },
    "bid_status": {
      "type": "string",
      "description": "`bid` when the opportunity was actually pursued, else `logged_no_bid` (a tenant may log every opportunity, including no-bids).",
      "x-demiton-requiredness": "required"
    },
    "external_id": {
      "type": "string",
      "description": "The tenant's own opportunity number, unique per source company; the fact's natural key.",
      "x-demiton-requiredness": "required"
    },
    "occurred_at": {
      "type": "string",
      "description": "The episodic event time: source creation date, falling back to last-modified then close date.",
      "x-demiton-requiredness": "required",
      "x-demiton-unit": "UTC",
      "format": "date-time",
      "x-demiton-type": "datetime"
    },
    "salesperson": {
      "type": "string",
      "description": "Name of the source-system opportunity owner.",
      "x-demiton-requiredness": "optional"
    },
    "jurisdiction": {
      "type": "jurisdiction",
      "description": "AU state/territory the opportunity is in, matched from the title text.",
      "x-demiton-requiredness": "optional"
    },
    "legal_entity": {
      "type": "string",
      "description": "The BC company that owns the opportunity.",
      "x-demiton-requiredness": "optional"
    },
    "work_type_id": {
      "type": "string",
      "description": "The org's classification of the work, from the shared `work_types.yaml` catalogue.",
      "x-demiton-requiredness": "optional"
    },
    "financial_period": {
      "type": "string",
      "description": "The financial period the event falls in.",
      "x-demiton-requiredness": "optional"
    },
    "sales_cycle_code": {
      "type": "string",
      "description": "The source system's sales-stage code.",
      "x-demiton-requiredness": "optional"
    },
    "work_type_source": {
      "type": "string",
      "description": "Provenance of the classification (keyword vs LLM path).",
      "x-demiton-requiredness": "optional"
    }
  },
  "x-demiton-register-type": "opportunity",
  "x-demiton-contract-version": "2.0.2",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [
    {
      "axis": "currency",
      "requirement": "required",
      "role": "context"
    },
    {
      "axis": "customer",
      "requirement": "optional",
      "role": "context"
    },
    {
      "axis": "project",
      "requirement": "optional",
      "role": "subject"
    },
    {
      "axis": "financial_period",
      "requirement": "optional",
      "role": "context"
    }
  ],
  "x-demiton-measures": [
    {
      "key": "value",
      "accumulation": "instantaneous",
      "dtype": "decimal",
      "unit": "by_coordinate"
    }
  ],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "CPRs",
        "title": "Commonwealth Procurement Rules",
        "access": "public_summary",
        "region": "Australia",
        "edition": "17 November 2025",
        "checked_on": "2026-09-14"
      },
      {
        "code": "EU 2019/1780 (eForms)",
        "title": "Commission Implementing Regulation (EU) 2019/1780 standard forms for procurement notices, as amended by (EU) 2023/2884",
        "access": "full_text_verified",
        "clause": "Annex Table 2 column 29",
        "region": "European Union",
        "edition": "2019/1780 as amended by 2023/2884 (applies 1 Jun 2024; Annex 1 Nov 2024)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "OCDS",
        "title": "Open Contracting Data Standard",
        "access": "full_text_verified",
        "region": "International",
        "edition": "1.1 (documentation release 1.1.5)",
        "checked_on": "2026-09-14"
      },
      {
        "code": "NZ GPR",
        "title": "New Zealand Government Procurement Rules",
        "access": "public_summary",
        "clause": "Rules 30, 32, 33, 34",
        "region": "New Zealand",
        "edition": "5th edition (effective 1 Dec 2025)",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Changes to a pipeline opportunity over time.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/opportunity/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}