{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "A7BD1EED-F869-477F-97F9-96EDA52EE0D9",
    "name": "Acumatica: morning bill approval and release"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -207.80410957584252,
        "y": -45.1328771392582,
        "zoom": 0.7361134310840894
      },
      "autoSave": true,
      "descriptions": {
        "flow": "Each morning, lists the bills on hold in Acumatica, totals them by vendor and asks the AP manager in Slack to release all of them or review them one by one. Approved bills are released from hold; bills kept back are flagged in the Slack thread.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Each morning, lists the bills on hold in Acumatica, totals them by vendor and asks the AP manager in Slack to release all of them or review them one by one. Approved bills are released from hold; bills kept back are flagged in the Slack thread.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": true,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the bill card Result"
          },
          "position": {
            "x": 110,
            "y": 400
          }
        },
        "flowElementId": "4B1F94D7-8A83-4998-B9AC-EEC272C9D1A2",
        "groupId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "id": "B11650A1-0310-418A-A397-53AB5A3135CE",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "bill",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Bill answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Bill answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const fmt = (n) => '$' + Number(n || 0).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });\nconst link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&bill=${encodeURIComponent(bill.ref)}&decision=${decision}`;\nconst lines = [\n  `*Bill ${bill.ref}* from ${bill.vendor}: invoice ${bill.vendorRef || 'with no number'}, ${fmt(bill.amount)}`,\n  bill.dueDate ? `Due ${bill.dueDate}` : null,\n  bill.description ? `Memo: ${bill.description}` : null,\n].filter(Boolean);\nreturn {\n  text: `Bill ${bill.ref} from ${bill.vendor}, ${fmt(bill.amount)}`,\n  amountText: fmt(bill.amount),\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Release' }, url: link('release') },\n      { type: 'button', text: { type: 'plain_text', text: 'Keep on hold' }, url: link('hold') },\n    ] },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Bill card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the bill card",
        "nextElementIds": [
          "EE636BCD-6BF6-4286-B175-D0048B1BA89F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask about the bill Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 400,
            "y": 400
          }
        },
        "flowElementId": "535E5ED8-4223-43EF-8509-2609A2AC3B04",
        "groupId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "id": "EE636BCD-6BF6-4286-B175-D0048B1BA89F",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Bill card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B11650A1-0310-418A-A397-53AB5A3135CE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to AP manager",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C2634ECF-78B8-446B-9A30-75BD3E384389"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Bill card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B11650A1-0310-418A-A397-53AB5A3135CE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question about bill",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask about the bill",
        "nextElementIds": [
          "36D4C330-6F41-40F2-ACB8-D75845303CB8"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a list of bills from Acumatica. Use the optional OData filter to narrow results by status, vendor, date range, or other fields. Useful for confirming creates worked or browsing all AP bills.",
          "elementId": "EXTENSION:::SHARED:::default:::acumatica:::listBills",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find bills on hold Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::acumatica:::listBills",
          "legacyElementId": "JS###v1###AcumaticaService###listBills",
          "methodName": "listBills",
          "position": {
            "x": 110,
            "y": 130
          }
        },
        "flowElementId": "91D9B73B-0B7D-4D50-BF66-AB3220AB365E",
        "groupId": null,
        "id": "F3D2C087-9F47-46EB-87AE-9D0CF852EC65",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "filter",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Status eq 'On Hold' and Type eq 'Bill'"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "select",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "ReferenceNbr,Type,Vendor,VendorRef,Amount,DueDate,Description,Status"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "top",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "listBills",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Bills on hold",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "acumatica",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find bills on hold",
        "nextElementIds": [
          "3F6F4F39-3A58-4E13-AAF3-4D9258D13025"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 420.63124818711975,
            "y": 391.53373295892675
          }
        },
        "flowElementId": "47A4D953-08AB-4A3D-830A-C27386DD783C",
        "groupId": null,
        "id": "4AAA925F-5BDE-49A6-810A-4CFBE23AA84B",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "AP manager decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the AP manager's answer",
        "nextElementIds": [
          "65E48A26-08C1-4685-92CA-57A5A7C7CF24"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 980,
            "y": 400
          }
        },
        "flowElementId": "0BE8CEA3-92D4-4CC9-A30D-68D769343DD7",
        "groupId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "id": "0638E3ED-CED6-4051-B533-F9FAD103FD9D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "8d99923d-e665-4de3-9b58-b1cb34e3d824",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Bill decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "36D4C330-6F41-40F2-ACB8-D75845303CB8"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "release"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "8d99923d-e665-4de3-9b58-b1cb34e3d824"
            ]
          },
          "elseComponent": {
            "componentId": "DF9B876F-649D-42D4-B8D6-6112E73144EC",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Release this bill",
          "storeResult": false,
          "thenComponent": {
            "componentId": "4CAC4CDA-7C59-4846-8066-0D19D0F00DA4",
            "componentType": "ELEMENT"
          }
        },
        "name": "Release this bill?",
        "nextElementIds": [
          "4CAC4CDA-7C59-4846-8066-0D19D0F00DA4",
          "DF9B876F-649D-42D4-B8D6-6112E73144EC"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 400,
            "y": 130
          }
        },
        "flowElementId": "D37E010A-6C9B-4D4E-814D-4D8BEF38CBB1",
        "groupId": null,
        "id": "3F6F4F39-3A58-4E13-AAF3-4D9258D13025",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "427d7c96-c691-46da-8604-15f1544d809e",
                "nestedOperation": null,
                "operation": "arrayIsNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Bills on hold",
                      "subPathSegments": null,
                      "type": "ELEMENT_LINK",
                      "value": "F3D2C087-9F47-46EB-87AE-9D0CF852EC65"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "ARRAY",
                "values": []
              }
            ],
            "grouping": [
              "427d7c96-c691-46da-8604-15f1544d809e"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Any on hold",
          "storeResult": false,
          "thenComponent": {
            "componentId": "3FEE1552-063A-42E5-B01F-85A421D8A3C3",
            "componentType": "ELEMENT"
          }
        },
        "name": "Any bills on hold?",
        "nextElementIds": [
          "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Flag the bill for review Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1270,
            "y": 490
          }
        },
        "flowElementId": "38007C95-8C2A-46B6-9E1D-A26AC726CCD9",
        "groupId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "id": "DF9B876F-649D-42D4-B8D6-6112E73144EC",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Flagged for review: bill "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "ref",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "vendor",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", invoice "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "vendorRef",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Bill card",
                    "subPathSegments": [
                      {
                        "key": "amountText",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B11650A1-0310-418A-A397-53AB5A3135CE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", due "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "dueDate",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". It stays on hold in Acumatica until someone releases it."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to AP manager",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C2634ECF-78B8-446B-9A30-75BD3E384389"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Bill flagged",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Flag the bill for review",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Releases a bill from Hold status in Acumatica, changing its status to Balanced and making it available for payment processing. The bill must currently be in Hold status.",
          "elementId": "EXTENSION:::SHARED:::default:::acumatica:::releaseBillFromHold",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Release the approved bill Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::acumatica:::releaseBillFromHold",
          "legacyElementId": "JS###v1###AcumaticaService###releaseBillFromHold",
          "methodName": "releaseBillFromHold",
          "position": {
            "x": 1270,
            "y": 310
          }
        },
        "flowElementId": "507298BC-F79B-444D-8D4A-BCC69FBCA6C4",
        "groupId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "id": "4CAC4CDA-7C59-4846-8066-0D19D0F00DA4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "referenceNbr",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "ref",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "releaseBillFromHold",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Approved bill released",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "acumatica",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Release the approved bill",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the release Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1164.8168519764222,
            "y": 703.9793773567442
          }
        },
        "flowElementId": "71F9E48D-C87D-4FEE-B485-EE1C9994519C",
        "groupId": null,
        "id": "9437796F-426B-4EC3-B799-C7430E8A96F6",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Released "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Approval request",
                    "subPathSegments": [
                      {
                        "key": "count",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " bills totaling "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Approval request",
                    "subPathSegments": [
                      {
                        "key": "totalText",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from hold. They are ready for payment in Acumatica."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to AP manager",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C2634ECF-78B8-446B-9A30-75BD3E384389"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Release confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the release",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 931.9730929120219,
            "y": 393.24187373098397
          }
        },
        "flowElementId": "81E35E51-8C6B-41A3-90B6-DC8AABE468BD",
        "groupId": null,
        "id": "65E48A26-08C1-4685-92CA-57A5A7C7CF24",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "58b77e26-dd58-48b1-9a05-aaeb83fff8a1",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "AP manager decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "4AAA925F-5BDE-49A6-810A-4CFBE23AA84B"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "all"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "58b77e26-dd58-48b1-9a05-aaeb83fff8a1"
            ]
          },
          "elseComponent": {
            "componentId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
            "componentType": "GROUP"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Release all",
          "storeResult": false,
          "thenComponent": {
            "componentId": "DDFCCD72-5206-4934-8730-73217EF3B34B",
            "componentType": "GROUP"
          }
        },
        "name": "Release all?",
        "nextElementIds": [],
        "nextGroupIds": [
          "DDFCCD72-5206-4934-8730-73217EF3B34B",
          "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF"
        ],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Releases a bill from Hold status in Acumatica, changing its status to Balanced and making it available for payment processing. The bill must currently be in Hold status.",
          "elementId": "EXTENSION:::SHARED:::default:::acumatica:::releaseBillFromHold",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Release the bill from hold Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::acumatica:::releaseBillFromHold",
          "legacyElementId": "JS###v1###AcumaticaService###releaseBillFromHold",
          "methodName": "releaseBillFromHold",
          "position": {
            "x": 110,
            "y": 580
          }
        },
        "flowElementId": "231CDC4D-25F4-426B-9CA2-CDAAFD133862",
        "groupId": "DDFCCD72-5206-4934-8730-73217EF3B34B",
        "id": "5832093F-1166-41D6-B3CB-2DC838508499",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "referenceNbr",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "ref",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "DDFCCD72-5206-4934-8730-73217EF3B34B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "releaseBillFromHold",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Released bill",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "acumatica",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Release the bill from hold",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 690,
            "y": 400
          }
        },
        "flowElementId": "AE708165-054E-4573-B14F-BB364F5B18DE",
        "groupId": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "id": "36D4C330-6F41-40F2-ACB8-D75845303CB8",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Bill decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the answer on the bill",
        "nextElementIds": [
          "0638E3ED-CED6-4051-B533-F9FAD103FD9D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the AP manager Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1052,
            "y": 124
          }
        },
        "flowElementId": "3CAC7650-7726-410C-8A07-1990F2DF2ED9",
        "groupId": null,
        "id": "C2634ECF-78B8-446B-9A30-75BD3E384389",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Approval request",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Approval request",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to AP manager",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the AP manager",
        "nextElementIds": [
          "4AAA925F-5BDE-49A6-810A-4CFBE23AA84B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the approval request Result"
          },
          "position": {
            "x": 744,
            "y": 130
          }
        },
        "flowElementId": "3FF55FF9-5B67-414E-82A1-45FA1DDA7767",
        "groupId": null,
        "id": "3FEE1552-063A-42E5-B01F-85A421D8A3C3",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "bills",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Bills on hold",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "F3D2C087-9F47-46EB-87AE-9D0CF852EC65"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const fmt = (n) => '$' + Number(n || 0).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });\nconst rows = (Array.isArray(bills) ? bills : []).map((b) => ({\n  ref: b.ReferenceNbr?.value,\n  vendor: b.Vendor?.value || '',\n  vendorRef: b.VendorRef?.value || '',\n  amount: Number(b.Amount?.value) || 0,\n  dueDate: String(b.DueDate?.value || '').slice(0, 10),\n  description: b.Description?.value || '',\n})).filter((b) => b.ref);\nconst total = rows.reduce((sum, b) => sum + b.amount, 0);\nconst byVendor = {};\nfor (const b of rows) {\n  byVendor[b.vendor] = byVendor[b.vendor] || { count: 0, amount: 0 };\n  byVendor[b.vendor].count += 1;\n  byVendor[b.vendor].amount += b.amount;\n}\nconst vendorLines = Object.entries(byVendor)\n  .sort((a, b) => b[1].amount - a[1].amount)\n  .map(([vendor, s]) => `${vendor}: ${s.count} bill${s.count === 1 ? '' : 's'}, ${fmt(s.amount)}`);\nconst link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst headline = `${rows.length} bill${rows.length === 1 ? ' totaling ' + fmt(total) + ' is' : 's totaling ' + fmt(total) + ' are'} awaiting your review.`;\nreturn {\n  bills: rows,\n  count: rows.length,\n  totalText: fmt(total),\n  text: headline,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: `*${headline}*\\nRelease all of them from hold, or review them one by one?` } },\n    { type: 'section', text: { type: 'mrkdwn', text: vendorLines.join('\\n').slice(0, 2900) } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Release all' }, url: link('all') },\n      { type: 'button', text: { type: 'plain_text', text: 'Review one by one' }, url: link('review') },\n    ] },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Approval request",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the approval request",
        "nextElementIds": [
          "C2634ECF-78B8-446B-9A30-75BD3E384389"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "F3D2C087-9F47-46EB-87AE-9D0CF852EC65",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": 0,
            "y": 0,
            "zoom": 0.8
          },
          "position": {
            "x": 1156.065010152129,
            "y": 570.2712365846871
          }
        },
        "flowElementId": "D3AB7CD7-8E74-49AF-B313-60BC7B1FDFDC",
        "groupId": null,
        "id": "DDFCCD72-5206-4934-8730-73217EF3B34B",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "5832093F-1166-41D6-B3CB-2DC838508499",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Approval request",
                "subPathSegments": [
                  {
                    "key": "bills",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "Release every bill",
          "storeResult": true
        },
        "name": "Release every bill",
        "nextElementIds": [
          "9437796F-426B-4EC3-B799-C7430E8A96F6"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      },
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": 0,
            "y": 0,
            "zoom": 0.8
          },
          "position": {
            "x": 593.5686938007162,
            "y": 575.0674659178537
          }
        },
        "flowElementId": "1336F35B-1573-4166-AC04-50023A31D1E9",
        "groupId": null,
        "id": "F3B2D4EC-CCF5-4CA5-B8FB-C8601B1510BF",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "B11650A1-0310-418A-A397-53AB5A3135CE",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Approval request",
                "subPathSegments": [
                  {
                    "key": "bills",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "3FEE1552-063A-42E5-B01F-85A421D8A3C3"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "Review bills one by one",
          "storeResult": true
        },
        "name": "Review bills one by one",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "FC5F2907-E5C6-4520-9C0C-05F2B9531C95",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "The URL of the block \"Wait for the AP manager's answer\". The Release all and Review one by one buttons open it to resume the run.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The URL of the block \"Wait for the answer on the bill\". The Release and Keep on hold buttons on each bill open it to resume the run.",
          "error": null,
          "name": "Bill answer link",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-11-17T05:53:55.590Z"
}
