{
  "decision": {
    "name": "Example \u00b7 Discount approval",
    "inputs": {
      "requested_discount": {
        "type": "number [0..100]",
        "desc": "Requested discount in percentage points",
        "from": "deal JSON"
      },
      "term_years": {
        "type": "number >= 1",
        "desc": "Contract term in years",
        "from": "deal JSON"
      },
      "seats": {
        "type": "number >= 1",
        "desc": "Number of seats",
        "from": "deal JSON"
      },
      "competition_probability": {
        "type": "number [0..1]",
        "desc": "Jev probability: Is competitive pressure explicitly stated?",
        "from": "Jev"
      },
      "upfront_probability": {
        "type": "number [0..1]",
        "desc": "Jev probability: Will the customer pay upfront?",
        "from": "Jev"
      }
    },
    "decisions": {
      "evidence_threshold": {
        "type": "number [0..1]",
        "desc": "Minimum Jev probability required to establish an affirmative fact",
        "expr": "0.8"
      },
      "term_band": {
        "type": "number",
        "desc": "Base discount band",
        "table": [
          [
            "term_years",
            "=> number",
            "# why"
          ],
          [
            ">= 3",
            "10",
            "Three-year or longer term permits 10 percentage points."
          ],
          [
            ">= 2",
            "7",
            "Two-year term permits 7 percentage points."
          ],
          [
            "-",
            "5",
            "One-year term permits 5 percentage points."
          ]
        ]
      },
      "seat_bonus": {
        "type": "number",
        "desc": "Seat discount addition",
        "table": [
          [
            "seats",
            "=> number",
            "# why"
          ],
          [
            ">= 250",
            "3",
            "At least 250 seats adds 3 percentage points."
          ],
          [
            "-",
            "0",
            "Smaller deals receive no seat bonus."
          ]
        ]
      },
      "payment_bonus": {
        "type": "number",
        "desc": "Payment discount addition",
        "table": [
          [
            "pays_upfront",
            "=> number",
            "# why"
          ],
          [
            "true",
            "3",
            "Upfront payment adds 3 percentage points."
          ],
          [
            "-",
            "0",
            "No upfront-payment addition."
          ]
        ]
      },
      "competition_bonus": {
        "type": "number",
        "desc": "Competitive discount addition",
        "table": [
          [
            "competitor_pressure",
            "=> number",
            "# why"
          ],
          [
            "true",
            "5",
            "Competitor pressure permits five more percentage points."
          ],
          [
            "-",
            "0",
            "No competitor-pressure addition."
          ]
        ]
      },
      "allowed_discount": {
        "type": "number",
        "desc": "Discount limit in percentage points",
        "expr": "term_band + seat_bonus + payment_bonus + competition_bonus"
      },
      "strategic_exception": {
        "type": "boolean",
        "desc": "VP-approved strategic-deal exception; disabled in the starter policy",
        "expr": "false"
      },
      "approval": {
        "type": "auto_approve|vp_review",
        "desc": "Should the discount be auto-approved or reviewed by a VP?",
        "table": [
          [
            "strategic_exception",
            "requested_discount <= allowed_discount",
            "=> auto_approve|vp_review",
            "# why"
          ],
          [
            "true",
            "-",
            "auto_approve",
            "VP-approved strategic-deal exception."
          ],
          [
            "-",
            "true",
            "auto_approve",
            "Requested discount is within the term, seat, payment and competition band."
          ],
          [
            "-",
            "-",
            "vp_review",
            "Requested discount is above the permitted band; a VP must review it."
          ]
        ]
      },
      "competitor_pressure": {
        "type": "boolean",
        "desc": "Is competitive pressure explicitly stated?",
        "expr": "competition_probability >= evidence_threshold"
      },
      "pays_upfront": {
        "type": "boolean",
        "desc": "Will the customer pay upfront?",
        "expr": "upfront_probability >= evidence_threshold"
      }
    }
  },
  "state": {
    "requested_discount": 22,
    "term_years": 3,
    "seats": 400,
    "sales_message": "Requesting 22 percent off for 3 years and 400 seats. We have a competing offer and face competitor pressure. The customer commits to paying upfront."
  },
  "questions": {
    "competition_probability": {
      "type": "noul",
      "instructions": "Does sales_message explicitly describe a competing offer or competitor pressure? A routine budget request is not competition. Do not approve a discount or calculate a band.",
      "criteria": {
        "true": "The message explicitly states competitor pressure or a competing offer.",
        "false": "There is no competing offer; the request is ordinary price negotiation."
      }
    },
    "upfront_probability": {
      "type": "noul",
      "instructions": "Does sales_message state that the customer commits to paying upfront?",
      "criteria": {
        "true": "The customer explicitly commits to upfront payment.",
        "false": "The customer will pay monthly or has not committed to upfront payment."
      }
    }
  }
}
