{
  "id": "QUOTE-002",
  "name": "NetFees and Discount should auto-populate after Quote creation",
  "description": "After Quote creation, price-related fields NetFees and Discount should auto-populate with default values. Bug #565: price fields not auto-populated.",
  "object": "Quote",
  "method": "POST",
  "endpoint": "/services/data/v63.0/sobjects/Quote",
  "payload": {
    "Name": "QUOTE002_E2E_{timestamp}",
    "OpportunityId": "{opportunity_id}",
    "Status": "Draft"
  },
  "expects": {
    "status_code": 201
  },
  "extract": {
    "id": "{result_id}",
    "name": "{result_Name}"
  },
  "query_after": {
    "object": "Quote",
    "id": "{result_id}",
    "assertions": [
      {
        "field": "NetFees",
        "operator": "is_not_null",
        "value": true
      },
      {
        "field": "Discount",
        "operator": "is_not_null",
        "value": true
      }
    ]
  },
  "teardown": [
    {
      "method": "DELETE",
      "endpoint": "/services/data/v63.0/sobjects/Quote/{result_id}"
    },
    {
      "method": "DELETE",
      "endpoint": "/services/data/v63.0/sobjects/Opportunity/{opportunity_id}"
    },
    {
      "method": "DELETE",
      "endpoint": "/services/data/v63.0/sobjects/Account/{account_id}"
    }
  ],
  "setup": [
    {
      "object": "Account",
      "method": "POST",
      "endpoint": "/services/data/v63.0/sobjects/Account",
      "payload": {
        "Name": "ACCT_FOR_QUOTE002_E2E_{timestamp}",
        "Industry": "Technology",
        "Accept_Service__c": true,
        "Account_ID__c": "E2E-QUOTE002-{timestamp}",
        "OwnerId": "0055g000001i4R9AAI"
      },
      "id_var": "account_id"
    },
    {
      "object": "Opportunity",
      "method": "POST",
      "endpoint": "/services/data/v63.0/sobjects/Opportunity",
      "payload": {
        "Name": "OPP_FOR_QUOTE002_E2E_{timestamp}",
        "StageName": "Prospecting",
        "Amount": 50000,
        "CloseDate": "2026-12-31",
        "AccountId": "{account_id}"
      },
      "id_var": "opportunity_id"
    }
  ],
  "priority": "P0",
  "bug_ref": "#565",
  "scene": "quote"
}
