{
  "id": "HS-004",
  "name": "HubSpot unmapped fields should not leak into Nexus columns with the same name",
  "description": "HubSpot fields without defined NexusCRM mapping should not appear in NexusCRM records, nor be written to columns with the same name. Bug: #575 - unmapped HubSpot fields leak into Nexus columns with same name.",
  "object": "HubSpotInbound",
  "method": "POST",
  "endpoint": "/services/integrations/hubspot/webhook",
  "payload": {
    "email": "hubspot-unmapped@test.com",
    "firstName": "Unmapped",
    "lastName": "Fields Lead",
    "company": "Unmapped Co",
    "website": "https://unmapped.com",
    "hubspot_id": "hs_900004",
    "hs_custom_field_1": "should_not_leak",
    "hs_custom_field_2": "also_should_not_leak",
    "some_arbitrary_extra_field": "this should not appear in NexusCRM"
  },
  "expects": {
    "status_code": 201
  },
  "query_after": {
    "object": "Lead",
    "assertions": [
      {
        "field": "Email",
        "operator": "eq",
        "value": "hubspot-unmapped@test.com"
      },
      {
        "field": "hs_custom_field_1",
        "operator": "is_null",
        "value": true
      },
      {
        "field": "some_arbitrary_extra_field",
        "operator": "is_null",
        "value": true
      }
    ]
  },
  "teardown": {
    "method": "DELETE",
    "endpoint": "/services/data/v63.0/sobjects/Lead/{id}"
  },
  "priority": "P0",
  "bug_ref": "#575",
  "scene": "hubspot"
}
