{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "FA357F35-DB0B-4B48-8EBD-549666784C4D",
    "name": "Ramp: fuel and repair card charges watched"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -70,
        "y": 0,
        "zoom": 1
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Checks every new charge on a fleet card in Ramp against the fuel and repair rules, and asks the fleet manager in Slack whether to freeze a card when a charge falls outside them.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Checks every new charge on a fleet card in Ramp against the fuel and repair rules, and asks the fleet manager in Slack whether to freeze a card when a charge falls outside them.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check the charge against the rules Result"
          },
          "position": {
            "x": 776,
            "y": 49
          }
        },
        "flowElementId": "B33DD1EC-B74F-4B96-8537-F445C2D03D68",
        "groupId": null,
        "id": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "charge",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New charge",
                    "subPathSegments": null,
                    "type": "TRIGGER_DATA",
                    "value": "0904B250-3CF1-4293-BDDE-34B9ACE361B1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "card",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ramp card",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "9495B408-3AB0-4A1D-96C3-CCA7C8D5437B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fleetCardNames",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Fleet card names",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Fleet card names"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fuelLimit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Fuel charge limit",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Fuel charge limit"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "repairLimit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Repair charge limit",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Repair charge limit"
                  }
                ],
                "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 t = charge || {};\nconst c = card || {};\nconst cardName = c.display_name || 'card ending ' + (c.last_four || '');\nconst words = String(fleetCardNames || '').split(',').map(s => s.trim().toLowerCase()).filter(Boolean);\nconst fleetCard = words.length === 0 || words.some(w => cardName.toLowerCase().includes(w));\nconst mcc = String(t.merchant_category_code || '');\nconst category = String(t.sk_category_name || '');\nconst fuelCodes = ['5541', '5542', '5983', '5172'];\nconst repairCodes = ['7538', '7531', '7534', '7535', '7542', '7549', '5532', '5533', '4784', '7523'];\nconst isFuel = fuelCodes.includes(mcc) || /gas|fuel/i.test(category);\nconst isRepair = !isFuel && (repairCodes.includes(mcc) || /auto|repair|tire|towing|toll|parking/i.test(category));\nconst amount = Number(t.amount || 0);\nconst money = n => '$' + Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });\nconst reasons = [];\nif (!isFuel && !isRepair) reasons.push('not a fuel stop, repair shop, tire, parts, towing, toll or parking merchant' + (category ? ' (Ramp category: ' + category + ')' : ''));\nif (isFuel && amount > Number(fuelLimit)) reasons.push('fuel charge over the ' + money(fuelLimit) + ' limit');\nif (isRepair && amount > Number(repairLimit)) reasons.push('repair or road charge over the ' + money(repairLimit) + ' limit');\nconst declined = String(t.state || '').toUpperCase() === 'DECLINED';\nconst outsideRules = fleetCard && !declined && reasons.length > 0;\nconst h = t.card_holder || {};\nconst holder = [h.first_name, h.last_name].filter(Boolean).join(' ') || 'the cardholder';\nconst merchant = t.merchant_name || 'an unknown merchant';\nconst when = t.user_transaction_time ? new Date(t.user_transaction_time).toLocaleString('en-US', { dateStyle: 'medium', timeStyle: 'short', timeZone: 'America/Chicago' }) + ' CT' : '';\nconst link = d => answerLink + '?execution=' + encodeURIComponent(executionId) + '&decision=' + d;\nconst lines = [\n  '*Fleet card charge outside the rules: ' + money(amount) + ' at ' + merchant + '*',\n  'Card: ' + cardName + ', held by ' + holder,\n  when ? 'When: ' + when : null,\n  t.memo ? 'Memo: ' + t.memo : null,\n  'Why it is flagged: ' + reasons.join('; '),\n];\nconst text = 'Fleet card charge outside the rules: ' + money(amount) + ' at ' + merchant;\nreturn {\n  outsideRules,\n  cardName,\n  holder,\n  merchant,\n  amount: money(amount),\n  text,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.filter(Boolean).join('\\n') } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'danger', text: { type: 'plain_text', text: 'Freeze the card' }, url: link('freeze') },\n      { type: 'button', text: { type: 'plain_text', text: 'Charge is fine' }, url: link('fine') },\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": "Charge check",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Check the charge against the rules",
        "nextElementIds": [
          "C7A0673D-3F9E-4B52-9E7A-DD1C87A21D41"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a single card by ID, including cardholder info, spending restrictions, state, fulfillment status, and last-four digits.",
          "elementId": "EXTENSION:::SHARED:::default:::ramp-service:::getCard",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the card Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::ramp-service:::getCard",
          "legacyElementId": "JS###v1###RampService###getCard",
          "methodName": "getCard",
          "position": {
            "x": 472,
            "y": 40
          }
        },
        "flowElementId": "7D451AC1-7B98-4F88-91A8-64F36D278D75",
        "groupId": null,
        "id": "9495B408-3AB0-4A1D-96C3-CCA7C8D5437B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "cardId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New charge",
                    "subPathSegments": [
                      {
                        "key": "card_id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "0904B250-3CF1-4293-BDDE-34B9ACE361B1"
                  }
                ],
                "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": "getCard",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Ramp card",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "ramp-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the card",
        "nextElementIds": [
          "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Triggers when a new card transaction appears in Ramp. Optionally filter by card or user to scope which transactions wake the flow. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::ramp-service:::onNewTransaction",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::ramp-service:::onNewTransaction",
          "newElementId": "EXTENSION:::SHARED:::default:::ramp-service:::onNewTransaction",
          "legacyElementId": "JS###v1###RampService###onNewTransaction",
          "methodName": "onNewTransaction",
          "position": {
            "x": 141,
            "y": 40
          }
        },
        "flowElementId": "B16B42C3-27FA-4EE0-BE27-1324967577C9",
        "groupId": null,
        "id": "0904B250-3CF1-4293-BDDE-34B9ACE361B1",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewTransaction",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New charge",
          "serviceId": "ramp-service",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New card charge",
        "nextElementIds": [
          "9495B408-3AB0-4A1D-96C3-CCA7C8D5437B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1182,
            "y": 49
          }
        },
        "flowElementId": "08CBE69D-2107-4D48-9509-C4AD275F5CA6",
        "groupId": null,
        "id": "C7A0673D-3F9E-4B52-9E7A-DD1C87A21D41",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "dd5a1806-3b69-4311-85ac-1ad773d4000b",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Charge check",
                      "subPathSegments": [
                        {
                          "key": "outsideRules",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "dd5a1806-3b69-4311-85ac-1ad773d4000b"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Outside the rules",
          "storeResult": false,
          "thenComponent": {
            "componentId": "A23DA41C-7843-433C-A4C7-5866FE3FC7A4",
            "componentType": "ELEMENT"
          }
        },
        "name": "Outside the rules?",
        "nextElementIds": [
          "A23DA41C-7843-433C-A4C7-5866FE3FC7A4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Freezes a card so no new transactions can be made. The card remains in the user's wallet and can be unfrozen later without re-issuing.",
          "elementId": "EXTENSION:::SHARED:::default:::ramp-service:::freezeCard",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Freeze the card in Ramp Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::ramp-service:::freezeCard",
          "legacyElementId": "JS###v1###RampService###freezeCard",
          "methodName": "freezeCard",
          "position": {
            "x": 128,
            "y": 340
          }
        },
        "flowElementId": "90F1F47D-40AE-4ACE-B439-C2C9ACB0CEA4",
        "groupId": null,
        "id": "D1DD0E90-FF0A-46F2-B526-1EC18A4C973A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "cardId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New charge",
                    "subPathSegments": [
                      {
                        "key": "card_id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "0904B250-3CF1-4293-BDDE-34B9ACE361B1"
                  }
                ],
                "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": "freezeCard",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Frozen card",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "ramp-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Freeze the card in Ramp",
        "nextElementIds": [
          "5D2D80F1-2116-4865-8882-ED372CF47FE3"
        ],
        "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,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the card is frozen Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 122,
            "y": 510
          }
        },
        "flowElementId": "9F9A85AC-72B9-4392-A5A3-2888FEA1CE34",
        "groupId": null,
        "id": "5D2D80F1-2116-4865-8882-ED372CF47FE3",
        "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": "Frozen. "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Charge check",
                    "subPathSegments": [
                      {
                        "key": "cardName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " can't be used until someone unfreezes it in Ramp."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to fleet manager",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A23DA41C-7843-433C-A4C7-5866FE3FC7A4"
                  }
                ],
                "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": "Freeze confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the card is frozen",
        "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,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the charge is cleared Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 110,
            "y": 210
          }
        },
        "flowElementId": "A02FA274-2F6F-4DC8-846F-4E052AED734D",
        "groupId": null,
        "id": "D0FBED53-EAB0-4004-A6C0-B62493EE9E9B",
        "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": "Cleared. The "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Charge check",
                    "subPathSegments": [
                      {
                        "key": "amount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " charge at "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Charge check",
                    "subPathSegments": [
                      {
                        "key": "merchant",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is fine and "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Charge check",
                    "subPathSegments": [
                      {
                        "key": "cardName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " stays active."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to fleet manager",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A23DA41C-7843-433C-A4C7-5866FE3FC7A4"
                  }
                ],
                "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": "Cleared confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the charge is cleared",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 472,
            "y": 349
          }
        },
        "flowElementId": "00296E34-4BB4-4FC9-A8F4-ECC19C500037",
        "groupId": null,
        "id": "CEAABC19-DB3C-402B-A2CC-46DD36356471",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "7e3e9419-209f-4587-81a0-55499ba82ef5",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Fleet manager decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "34A58F44-B90B-4A4D-B716-06FE460E43F4"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "freeze"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "7e3e9419-209f-4587-81a0-55499ba82ef5"
            ]
          },
          "elseComponent": {
            "componentId": "D0FBED53-EAB0-4004-A6C0-B62493EE9E9B",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Freeze it",
          "storeResult": false,
          "thenComponent": {
            "componentId": "D1DD0E90-FF0A-46F2-B526-1EC18A4C973A",
            "componentType": "ELEMENT"
          }
        },
        "name": "Freeze the card?",
        "nextElementIds": [
          "D1DD0E90-FF0A-46F2-B526-1EC18A4C973A",
          "D0FBED53-EAB0-4004-A6C0-B62493EE9E9B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 772,
            "y": 349
          }
        },
        "flowElementId": "8FF2F404-404A-4A6A-A9B5-7DAFA607FD74",
        "groupId": null,
        "id": "34A58F44-B90B-4A4D-B716-06FE460E43F4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Fleet manager decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the fleet manager's answer",
        "nextElementIds": [
          "CEAABC19-DB3C-402B-A2CC-46DD36356471"
        ],
        "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,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the fleet manager Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1176,
            "y": 340
          }
        },
        "flowElementId": "9FF984D5-D18D-4930-8055-73500278A98D",
        "groupId": null,
        "id": "A23DA41C-7843-433C-A4C7-5866FE3FC7A4",
        "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": "Charge check",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                  }
                ],
                "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": "Charge check",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1C0B2AA5-E0E9-4E99-AF20-776C7D89256D"
                  }
                ],
                "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 fleet manager",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the fleet manager",
        "nextElementIds": [
          "34A58F44-B90B-4A4D-B716-06FE460E43F4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "0904B250-3CF1-4293-BDDE-34B9ACE361B1",
    "groups": [],
    "id": "4D769EDD-2983-41A9-BBD5-25B1D2ACC9CE",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "The URL of the block Wait for the fleet manager's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "Words in the Ramp display name of your fleet cards, separated by commas. Only charges on these cards are checked.",
          "error": null,
          "name": "Fleet card names",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The most one fuel charge may be, in dollars.",
          "error": null,
          "name": "Fuel charge limit",
          "type": "DOUBLE",
          "value": ""
        },
        {
          "description": "The most one repair, tire, parts, towing, toll or parking charge may be, in dollars.",
          "error": null,
          "name": "Repair charge limit",
          "type": "DOUBLE",
          "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-26T09:38:01.718Z"
}
