{
  "id": "LC-007",
  "name": "Opportunity amount should auto-calculate after adding line items",
  "description": "Opportunity amounts should auto-calculate after adding line items with unit prices.",
  "object": "Opportunity",
  "method": "PATCH",
  "endpoint": "/services/data/v63.0/sobjects/Opportunity/{opportunity_id}",
  "payload": {
    "Amount": 150000
  },
  "expects": {
    "status_code": 204
  },
  "setup": [
    {
      "type": "sql",
      "sql": "DELETE FROM `Opportunity` WHERE Name = 'LC007 Test Opp'",
      "expected_status": 200
    },
    {
      "type": "sql",
      "sql": "INSERT INTO `Opportunity` (Id, Name, StageName, CloseDate, AccountId, Amount) VALUES ('lcmrs-lc007-opp-001', 'LC007 Test Opp', 'Prospecting', '2026-12-31', '{seed_Account_0}', 0)",
      "expected_status": 200,
      "id_var": "opportunity_id",
      "id_value": "lcmrs-lc007-opp-001"
    }
  ],
  "priority": "P0",
  "scene": "lead_convert"
}
