{
  "id": "FLOW-010",
  "name": "AfterSave recordUpdate with inputReference=$Record + object=null + filters=[] persists via DB Update (issue #2231)",
  "description": "Regression lock for issue #2231 — the exact production recordUpdate shape reported by the operator on Scheduled-trigger flows: inputReference='$Record', object=null, filters=[], inputAssignments=[{field, value:{stringValue}}]. Pre-fix, an unresolved-target case in this code path silently log-skipped and let the connector advance — leaving FlowInterview Finished with Error=NULL. Post-fix, the executor either persists (when attributes.type is stamped, as it is on every record-triggered context via FlowTriggerListener) or surfaces a hard error (covered by unit + integration tests in backend/internal/features/automation/issue_2231_repro_test.go). This case locks in the happy path end-to-end through HTTP → records.PersistenceService → outbox → FlowTriggerListener → executeRecordUpdate → persistence.Update on a real DB. Scheduled trigger fires on a wall-clock cron and is not exercisable from a synchronous e2e harness; AfterSave on the same executor code path is the equivalent runtime oracle. Tenant-agnostic: standard SObject (Account), standard field (Description). No __c business names, no PingCAP/TiDB/HubSpot identifiers.",
  "setup": [
    {
      "type": "http",
      "name": "Create synthetic AfterSave flow on Account via Tooling API — recordUpdate uses the exact #2231 shape",
      "method": "POST",
      "endpoint": "/services/data/v63.0/tooling/sobjects/Flow",
      "payload": {
        "MasterLabel": "FLOW-010 Acct AfterSave DollarRecord NullObject",
        "ProcessType": "AutoLaunchedFlow",
        "Status": "Draft",
        "Metadata": {
          "apiVersion": "63.0",
          "label": "FLOW-010 Acct AfterSave DollarRecord NullObject",
          "description": "Test-only AfterSave flow asserting that a recordUpdate with inputReference='$Record', object=null, filters=[] persists the inputAssignment via persistence.Update. Regression lock for #2231.",
          "status": "Draft",
          "processType": "AutoLaunchedFlow",
          "start": {
            "locationX": 50,
            "locationY": 0,
            "object": "Account",
            "triggerType": "RecordAfterSave",
            "recordTriggerType": "Create",
            "connector": {
              "targetReference": "Set_Description"
            }
          },
          "recordUpdates": [
            {
              "name": "Set_Description",
              "label": "Set Description on $Record",
              "locationX": 176,
              "locationY": 287,
              "object": null,
              "inputReference": "$Record",
              "filters": [],
              "inputAssignments": [
                {
                  "field": "Description",
                  "value": {
                    "stringValue": "FLOW-010-FIRED"
                  }
                }
              ]
            }
          ]
        }
      },
      "expects": {
        "status_code": 201
      },
      "extract": {
        "flow010_version_id": "id"
      }
    },
    {
      "type": "http",
      "name": "Activate the new Flow version",
      "method": "POST",
      "endpoint": "/services/data/v63.0/tooling/sobjects/Flow/{flow010_version_id}/activate",
      "expects": {
        "status_code": 204
      }
    }
  ],
  "object": "Account",
  "method": "POST",
  "endpoint": "/services/data/v63.0/sobjects/Account",
  "payload": {
    "Name": "FLOW-010-AfterSave-DollarRecord-NullObject",
    "Description": "initial"
  },
  "expects": {
    "status_code": 201
  },
  "query_after": {
    "object": "Account",
    "retry": 15,
    "delay_ms": 2000,
    "assertions": [
      {
        "field": "Name",
        "operator": "eq",
        "value": "FLOW-010-AfterSave-DollarRecord-NullObject"
      },
      {
        "field": "Description",
        "operator": "eq",
        "value": "FLOW-010-FIRED"
      }
    ]
  },
  "teardown": [
    {
      "method": "DELETE",
      "endpoint": "/services/data/v63.0/sobjects/Account/{id}"
    },
    {
      "method": "DELETE",
      "endpoint": "/services/data/v63.0/tooling/sobjects/Flow/{flow010_version_id}"
    }
  ],
  "priority": "P1",
  "bug_ref": "#2231",
  "scene": "flow"
}
