{
  "id": "LC-MALFORMED-ACCOUNT",
  "name": "Lead Convert with non-existent accountId: MALFORMED_ID, no side effects",
  "description": "B3 regression: caller supplies accountId that doesn't exist (or they can't see). The flow must fault with SF-native MALFORMED_ID statusCode. No Account/Contact/Opportunity is created, Lead is NOT marked converted. Without this guard, orphan children could be attached to an inaccessible AccountId (confused-deputy risk).",
  "object": "LeadConvert",
  "method": "POST",
  "endpoint": "/services/data/v63.0/actions/standard/convertLead",
  "payload": {
    "inputs": [
      {
        "leadId": "{seed_Lead_0}",
        "convertedStatus": "Converted",
        "accountId": "00Q000000000000AAA",
        "doNotCreateOpportunity": true
      }
    ]
  },
  "expects": {
    "status_code": 200
  },
  "response_assertions": [
    {"field": "0.isSuccess", "operator": "eq", "value": false},
    {"field": "0.errors.0.statusCode", "operator": "eq", "value": "MALFORMED_ID"}
  ],
  "query_after": {
    "object": "Lead",
    "record_id": "{seed_Lead_0}",
    "assertions": [
      {"field": "IsConverted", "operator": "eq", "value": false},
      {"field": "ConvertedDate", "operator": "is_null"},
      {"field": "ConvertedAccountId", "operator": "is_null"},
      {"field": "ConvertedContactId", "operator": "is_null"}
    ]
  },
  "priority": "P0",
  "scene": "lead_convert"
}
