{
  "id": "SDR-009",
  "name": "Lead field update: Custom SDR fields persist correctly",
  "description": "Updating custom SDR fields on a Lead should persist the new values and maintain data integrity across field updates.",
  "object": "Lead",
  "method": "PATCH",
  "endpoint": "/services/data/v63.0/sobjects/Lead/{seed_Lead_0}",
  "payload": {
    "Phone": "555-9999",
    "Industry": "ISV/SaaS-Software",
    "NumberOfEmployees": 500,
    "AnnualRevenue": 10000000
  },
  "expects": {
    "status_code": 204
  },
  "query_after": {
    "object": "Lead",
    "assertions": [
      {
        "field": "Phone",
        "operator": "eq",
        "value": "555-9999"
      },
      {
        "field": "Industry",
        "operator": "eq",
        "value": "ISV/SaaS-Software"
      },
      {
        "field": "NumberOfEmployees",
        "operator": "equals",
        "value": 500
      }
    ]
  },
  "setup": [
    {
      "type": "sql",
      "sql": "DELETE FROM `Lead` WHERE Id = '00Q5g000001LC001AA0'",
      "expected_status": 200
    },
    {
      "type": "sql",
      "sql": "INSERT INTO `Lead` (Id, FirstName, LastName, Company, Status, Email, IsConverted) VALUES ('00Q5g000001LC001AA0', 'Test', 'SDR009_Contact', 'SDR009Company', 'Open - Not Contacted', 'sdr009@example.com', false)",
      "expected_status": 200
    }
  ],
  "priority": "P1",
  "scene": "sdr"
}
