{
  "id": "in-owner-02",
  "title": "Inbound owner with no binding still creates Lead with default/system OwnerId",
  "kind": "hubspot_sync",
  "linkedIssues": [2830],
  "provenance": {
    "businessScenario": "IN-OWNER-02 — an inbound contact whose hubspot_owner_id has no HubSpotOwnerBinding__c still materializes a Lead; OwnerId falls back to default/system without error. Behavior is OBSERVED pending product call (relates to #2830).",
    "reportedBy": "HubSpot sync spec IN-OWNER-02 (hubspot-nexuscrm-sync-CASE-EXEC-SELFCONTAINED)",
    "capturedAt": "2026-06-18",
    "note": "[calibrated] By-design no-binding observation: contact created with NO hubspot_owner_id (HubSpot rejects fake owner ids), so no owner binding resolves; asserts only that the Lead materializes and OwnerId exists (default/system fallback), so the case PASSes."
  },
  "steps": [
    {
      "id": "hs",
      "system": "hubspot",
      "method": "POST",
      "path": "/crm/v3/objects/contacts",
      "body": {
        "properties": {
          "email": "own02-{{__runId}}@example.com",
          "firstname": "Own02",
          "lastname": "Unbound{{__runId}}"
        }
      },
      "expectStatusRange": [200, 299],
      "assertions": [
        { "path": "response.body.id", "exists": true }
      ]
    },
    {
      "id": "leadQ",
      "system": "nexuscrm",
      "authRole": "admin",
      "method": "GET",
      "path": "/services/data/v63.0/query?q=SELECT Id, OwnerId, HubSpot_Owner_Id__c, FirstName FROM Lead WHERE HubSpot_Id__c = '{{steps.hs.response.body.id}}'",
      "expectStatus": 200,
      "poll": { "budgetMs": 90000, "intervalMs": 6000 },
      "onTimeout": "blocked",
      "assertions": [
        { "path": "response.body.records[0].FirstName", "equals": "Own02" },
        { "path": "response.body.records[0].OwnerId", "exists": true }
      ]
    }
  ]
}
