{
  "apiVersion": 56,
  "label": "Credits Top-up — Activate on Approval",
  "description": "Phase 1 activation Flow for top-up child records. When Approval_Status__c flips to 'Approved' on a Credits_Topup__c, stamps Approved_Date. The approved top-up amount is then included by the parent's Approved_Topups__c rollup (filtered on Approval_Status = 'Approved') and propagates to Total_Disbursed__c formula. See docs/object-proposals/poc-credits-refactor.md §6 / §7.",
  "processType": "AutoLaunchedFlow",
  "status": "Active",
  "start": {
    "object": "Credits_Topup__c",
    "triggerType": "RecordBeforeSave",
    "recordTriggerType": "Update",
    "filterLogic": "and",
    "filters": [
      {"field": "Approval_Status__c", "operator": "IsChanged", "value": {"booleanValue": true}},
      {"field": "Approval_Status__c", "operator": "EqualTo", "value": {"stringValue": "Approved"}}
    ],
    "connector": {"targetReference": "Stamp_Approved_Date"}
  },
  "assignments": [
    {
      "name": "Stamp_Approved_Date",
      "label": "Stamp Approved_Date",
      "locationX": 200,
      "locationY": 100,
      "assignmentItems": [
        {"assignToReference": "$Record.Approved_Date__c", "operator": "Assign", "value": {"elementReference": "$Flow.CurrentDate"}}
      ]
    }
  ]
}
