{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "42AA3597-04BB-4A25-828A-D2192EDA494A",
    "name": "Onfleet: delivered task POD to ready to bill"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -39.91696938245978,
        "y": 10.939283860923716,
        "zoom": 0.73
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Starts when a driver completes an Onfleet delivery. The task's photos and signature are filed on its McLeod load as the POD, and a signed delivery with photos and no driver notes moves the load to Ready to Bill. Anything else goes to the billing lead in Slack first.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Checks Onfleet every 15 minutes for deliveries completed since the last check. Each one's photos and signature are filed on its McLeod load as the POD, and a signed delivery with photos and no driver notes moves the load to Ready to Bill. Anything else goes to the billing lead in Slack first.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1303,
            "y": 49
          }
        },
        "flowElementId": "ACF24AD7-2300-46CB-902C-A9BCEDA1B2C7",
        "groupId": null,
        "id": "0B6BC2D5-0DE0-452A-A7A2-181FC0FEF07D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "c0f56a95-c46a-4a4c-8805-5031ebd2a379",
                "nestedOperation": null,
                "operation": "isNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Delivery",
                      "subPathSegments": [
                        {
                          "key": "loadNumber",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "38004752-4399-4368-B728-B12CB9398097"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": []
              }
            ],
            "grouping": [
              "c0f56a95-c46a-4a4c-8805-5031ebd2a379"
            ]
          },
          "elseComponent": {
            "componentId": "A7FB2B21-ED99-430A-A0CE-50AC567D3211",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Has load number",
          "storeResult": false,
          "thenComponent": {
            "componentId": "282765B3-D6C5-4664-9479-452368FCF444",
            "componentType": "ELEMENT"
          }
        },
        "name": "Load number on the task?",
        "nextElementIds": [
          "282765B3-D6C5-4664-9479-452368FCF444",
          "A7FB2B21-ED99-430A-A0CE-50AC567D3211"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the question for the billing lead Result"
          },
          "position": {
            "x": 110,
            "y": 519
          }
        },
        "flowElementId": "7CF6FF77-122A-4735-B6A3-66893C90897B",
        "groupId": null,
        "id": "6E030389-B790-45F8-87D6-494E501E73DB",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Write the question for the billing lead', Error: The placeholder \"Answer link\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "loadNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod load",
                    "subPathSegments": [
                      {
                        "key": "load",
                        "optional": false
                      },
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "282765B3-D6C5-4664-9479-452368FCF444"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customer",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod load",
                    "subPathSegments": [
                      {
                        "key": "load",
                        "optional": false
                      },
                      {
                        "key": "customer",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "282765B3-D6C5-4664-9479-452368FCF444"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shortId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "shortId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recipient",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "recipient",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "address",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "signed",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "signed",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "signer",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "signer",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "photoCount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "photoCount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "driverNotes",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "driverNotes",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "podLinks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "podLinks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "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 link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst lines = [\n  `*Load ${loadNumber} (${customer}) was delivered, but the POD needs a look before billing*`,\n  `Onfleet task ${shortId}, ${recipient}, ${address}`,\n  signed ? `Signed by: ${signer || 'name not typed'}` : 'Signed: *no signature*',\n  photoCount > 0 ? `Photos: ${photoCount}` : 'Photos: *none*',\n  driverNotes ? `Driver's notes: ${driverNotes}` : null,\n  `The photos and signature are already filed on the load in McLeod. ${podLinks}`,\n].filter(Boolean);\nreturn {\n  text: `Load ${loadNumber} needs a look before billing`,\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: 'Mark ready to bill' }, url: link('bill') },\n      { type: 'button', text: { type: 'plain_text', text: 'Hold the load' }, 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": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for the billing lead",
        "nextElementIds": [
          "3190F98E-A3EE-4269-8B12-8AE95EC0C008"
        ],
        "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 the billing lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 571,
            "y": 510
          }
        },
        "flowElementId": "EA3D4379-2211-473B-BFD8-3DAF1E0EFD2C",
        "groupId": null,
        "id": "3190F98E-A3EE-4269-8B12-8AE95EC0C008",
        "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": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6E030389-B790-45F8-87D6-494E501E73DB"
                  }
                ],
                "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": "EXPRESSION",
                "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": "EXPRESSION",
                "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": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6E030389-B790-45F8-87D6-494E501E73DB"
                  }
                ],
                "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 billing lead",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the billing lead",
        "nextElementIds": [
          "78AB4769-A394-453F-9EE1-4BF0508C2192"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Fires when a driver completes a task successfully (Onfleet webhook taskCompleted). The event carries the whole task under data.task, with its completion details, metadata and the proof-of-delivery photo and signature URLs (photoUrl, photoUrls, signatureUrl).",
          "elementId": "EXTENSION:::SHARED:::default:::onfleet:::onTaskCompleted",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::onfleet:::onTaskCompleted",
          "legacyElementId": "JS###v1###OnfleetService###onTaskCompleted",
          "methodName": "onTaskCompleted",
          "position": {
            "x": 135,
            "y": 40
          }
        },
        "flowElementId": "6EAAAA8D-EB59-4995-9A45-ACFA497FBEF8",
        "groupId": null,
        "id": "0037DDAD-6FA9-4FE9-89E3-391F0CD1AF08",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onTaskCompleted",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Completed task",
          "scope": "SINGLE_APP",
          "serviceId": "onfleet",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "Delivery completed in Onfleet",
        "nextElementIds": [
          "B1CAECC8-2E61-412F-9394-A2A2067951F2"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Finds a load by its order number, PRO number, bill of lading, consignee reference or a stop reference number (McLeod order tracking search) and returns the first match in full, as Get Load does, with every match listed. Returns found: false instead of failing when nothing matches.",
          "elementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::findLoadByNumber",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the load in McLeod Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::findLoadByNumber",
          "legacyElementId": null,
          "methodName": "findLoadByNumber",
          "position": {
            "x": 1311,
            "y": 210
          }
        },
        "flowElementId": "5F537A75-B17C-4593-B8B6-948E9AE64F35",
        "groupId": null,
        "id": "282765B3-D6C5-4664-9479-452368FCF444",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "loadNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "proNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "billOfLading",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "consigneeReference",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "referenceNumber",
              "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": "findLoadByNumber",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "McLeod load",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the load in McLeod",
        "nextElementIds": [
          "E2AB60CF-F741-48EA-B5C4-59A2932E99CD"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Adds a document (rate confirmation, BOL, POD, invoice) to a load in McLeod Imaging, from a file URL such as a FlowRunner stored file or an email attachment. PDF, TIFF, PNG, JPEG, GIF and BMP are accepted. Some imaging setups stage uploads for a batch job, so the document may appear in McLeod later.",
          "elementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::uploadDocument",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Attach the POD to the load Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::uploadDocument",
          "legacyElementId": null,
          "methodName": "uploadDocument",
          "position": {
            "x": 110,
            "y": 490
          }
        },
        "flowElementId": "DEBD1608-5352-46EF-B56A-3B00C93370D2",
        "groupId": "EA337121-29F8-447A-A48E-2D6AC8BA0C70",
        "id": "C8DCCA8C-02D4-436F-A157-79BE34EB5713",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod load",
                    "subPathSegments": [
                      {
                        "key": "load",
                        "optional": false
                      },
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "282765B3-D6C5-4664-9479-452368FCF444"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "O"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "movementId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "documentTypeId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "POD document type",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "POD document type"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "EA337121-29F8-447A-A48E-2D6AC8BA0C70"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "image/png"
                  }
                ],
                "mode": "BASIC",
                "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": "uploadDocument",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Filed POD",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Attach the POD to the load",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 920,
            "y": 519
          }
        },
        "flowElementId": "D69D95A7-4E0F-4EB5-9B63-C090F5D92BB0",
        "groupId": null,
        "id": "78AB4769-A394-453F-9EE1-4BF0508C2192",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Billing decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the billing lead's answer",
        "nextElementIds": [
          "FAC964B5-1E08-44FF-B40D-B9D94147C054"
        ],
        "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": "Confirm the load is held Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1688,
            "y": 510
          }
        },
        "flowElementId": "9BFB36BF-46E5-494D-9951-ABFE059EB0EF",
        "groupId": null,
        "id": "EFD32C59-4A70-420C-B86F-1B3DBBD2E635",
        "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": "Held. Load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod load",
                    "subPathSegments": [
                      {
                        "key": "load",
                        "optional": false
                      },
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "282765B3-D6C5-4664-9479-452368FCF444"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is not marked ready to bill. The POD stays filed on the load in McLeod."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to billing lead",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3190F98E-A3EE-4269-8B12-8AE95EC0C008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "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": "EXPRESSION",
                "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": "Hold confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the load is held",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 119,
            "y": 219
          }
        },
        "flowElementId": "47DE8A78-47AB-431C-8E59-B09652339263",
        "groupId": null,
        "id": "9B532BFD-B9A1-4C8C-8D46-2471688D93E4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "52a54a60-6837-4bd9-9237-337c80ac1802",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Delivery",
                      "subPathSegments": [
                        {
                          "key": "clean",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "38004752-4399-4368-B728-B12CB9398097"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "52a54a60-6837-4bd9-9237-337c80ac1802"
            ]
          },
          "elseComponent": {
            "componentId": "6E030389-B790-45F8-87D6-494E501E73DB",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Clean POD",
          "storeResult": false,
          "thenComponent": {
            "componentId": "452B394D-0FFB-4A73-945A-70DF9E013B1D",
            "componentType": "ELEMENT"
          }
        },
        "name": "Signed, with photos and no notes?",
        "nextElementIds": [
          "6E030389-B790-45F8-87D6-494E501E73DB",
          "452B394D-0FFB-4A73-945A-70DF9E013B1D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 952,
            "y": 219
          }
        },
        "flowElementId": "D5CB533B-8FE6-4AC5-B8AC-FF51ADB96792",
        "groupId": null,
        "id": "E2AB60CF-F741-48EA-B5C4-59A2932E99CD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "bfee3664-8e09-42ba-8a24-591d2b8f7f28",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "McLeod load",
                      "subPathSegments": [
                        {
                          "key": "found",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "282765B3-D6C5-4664-9479-452368FCF444"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "bfee3664-8e09-42ba-8a24-591d2b8f7f28"
            ]
          },
          "elseComponent": {
            "componentId": "D17A26D1-E870-4001-BBA3-D535F7307A0B",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Load found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "EA337121-29F8-447A-A48E-2D6AC8BA0C70",
            "componentType": "GROUP"
          }
        },
        "name": "Load found in McLeod?",
        "nextElementIds": [
          "D17A26D1-E870-4001-BBA3-D535F7307A0B"
        ],
        "nextGroupIds": [
          "EA337121-29F8-447A-A48E-2D6AC8BA0C70"
        ],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Marks a load Delivered or Ready to Bill. Delivered delivers out the load's brokerage movement in PowerBroker with the current date and time as every stop's arrival and departure (asset movements are delivered stop by stop from driver dispatch and are refused). Ready to Bill sets the order's ready to bill flag. Returns the load as Get Load does.",
          "elementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::updateLoadStatus",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Mark the load ready to bill Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::updateLoadStatus",
          "legacyElementId": null,
          "methodName": "updateLoadStatus",
          "position": {
            "x": 1303,
            "y": 680
          }
        },
        "flowElementId": "6FE60A0A-5E80-40FC-ADBC-FE26D8AD9EA3",
        "groupId": null,
        "id": "452B394D-0FFB-4A73-945A-70DF9E013B1D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod load",
                    "subPathSegments": [
                      {
                        "key": "load",
                        "optional": false
                      },
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "282765B3-D6C5-4664-9479-452368FCF444"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "newStatus",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "readyToBill"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "movementId",
              "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": "updateLoadStatus",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Ready to bill",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Mark the load ready to bill",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the delivery Result"
          },
          "position": {
            "x": 962,
            "y": 49
          }
        },
        "flowElementId": "C312141B-5562-4A33-9EB8-D9E5801B9C68",
        "groupId": null,
        "id": "38004752-4399-4368-B728-B12CB9398097",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "task",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Completed task",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "task",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "0037DDAD-6FA9-4FE9-89E3-391F0CD1AF08"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "loadField",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Load number field",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Load number field"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "// One delivered Onfleet task: the load number, the POD files the connector links to, and whether it is clean.\nconst t = task || {};\nconst c = t.completionDetails || {};\nconst key = String(loadField || '').trim().toLowerCase();\nconst meta = (t.metadata || []).find((m) => String(m.name || '').trim().toLowerCase() === key);\nlet loadNumber = meta && meta.value !== undefined && meta.value !== null ? String(meta.value).trim() : '';\nif (!loadNumber) {\n  const m = String(t.notes || '').match(/\\bload\\s*(?:#|no\\.?|number)?\\s*[:#]?\\s*([A-Z0-9][A-Z0-9-]{2,})/i);\n  loadNumber = m ? m[1] : '';\n}\nconst photos = Array.isArray(c.photoUrls) && c.photoUrls.length ? c.photoUrls : (c.photoUrl ? [c.photoUrl] : []);\nconst files = photos.map((url, i) => ({ url, label: `Photo ${i + 1}` }));\nif (c.signatureUrl) files.push({ url: c.signatureUrl, label: 'Signature' });\nconst driverNotes = String(c.notes || '').trim();\nconst r = (t.recipients || [])[0] || {};\nconst a = (t.destination && t.destination.address) || {};\nreturn {\n  taskId: t.id,\n  shortId: t.shortId || t.id,\n  trackingUrl: t.trackingURL || '',\n  loadNumber,\n  recipient: r.name || '',\n  address: [a.number, a.street, a.city, a.state].filter(Boolean).join(' '),\n  signed: Boolean(c.signatureUrl),\n  signer: c.signatureText || '',\n  photoCount: photos.length,\n  driverNotes,\n  clean: Boolean(c.signatureUrl) && photos.length > 0 && !driverNotes,\n  files,\n  podLinks: files.length ? files.map((f) => `<${f.url}|${f.label}>`).join('  ') : 'no photo or signature',\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Delivery",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Read the delivery",
        "nextElementIds": [
          "0B6BC2D5-0DE0-452A-A7A2-181FC0FEF07D"
        ],
        "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": "Send the unmatched POD to billing Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 522,
            "y": 340
          }
        },
        "flowElementId": "E6D19BBB-7A83-4E72-BFDA-E065059B45FF",
        "groupId": null,
        "id": "D17A26D1-E870-4001-BBA3-D535F7307A0B",
        "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": "No McLeod load matches load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " on delivered Onfleet task "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "shortId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " ("
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "recipient",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "). File the POD by hand: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "podLinks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "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": "EXPRESSION",
                "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": "EXPRESSION",
                "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": "Unmatched note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the unmatched POD to billing",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1322,
            "y": 519
          }
        },
        "flowElementId": "098081D4-CA9E-4C49-A94B-51FCE5E2D7A1",
        "groupId": null,
        "id": "FAC964B5-1E08-44FF-B40D-B9D94147C054",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "3ae4217b-51a2-44d7-94b9-7b77850490aa",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Billing decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "78AB4769-A394-453F-9EE1-4BF0508C2192"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "bill"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "3ae4217b-51a2-44d7-94b9-7b77850490aa"
            ]
          },
          "elseComponent": {
            "componentId": "EFD32C59-4A70-420C-B86F-1B3DBBD2E635",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Bill it",
          "storeResult": false,
          "thenComponent": {
            "componentId": "452B394D-0FFB-4A73-945A-70DF9E013B1D",
            "componentType": "ELEMENT"
          }
        },
        "name": "Bill it?",
        "nextElementIds": [
          "452B394D-0FFB-4A73-945A-70DF9E013B1D",
          "EFD32C59-4A70-420C-B86F-1B3DBBD2E635"
        ],
        "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": "Tell billing the load number is missing Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1641,
            "y": 40
          }
        },
        "flowElementId": "6416EF73-BDE8-45A7-B6AA-6C23EA372BB9",
        "groupId": null,
        "id": "A7FB2B21-ED99-430A-A0CE-50AC567D3211",
        "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": "Delivered task "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "shortId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " for "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "recipient",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", has no load number in Onfleet, so its POD is not filed in McLeod. POD: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "podLinks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "  Tracking: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery",
                    "subPathSegments": [
                      {
                        "key": "trackingUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "38004752-4399-4368-B728-B12CB9398097"
                  }
                ],
                "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": "EXPRESSION",
                "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": "EXPRESSION",
                "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": "No load number note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell billing the load number is missing",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 557,
            "y": 49
          }
        },
        "flowElementId": "1ED99BC8-AE95-4D79-AE4F-A146E809EE64",
        "groupId": null,
        "id": "B1CAECC8-2E61-412F-9394-A2A2067951F2",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "f8890568-d1c4-4441-9f4e-e31f6f2a6b1d",
                "nestedOperation": null,
                "operation": "isNotTrue",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Completed task",
                      "subPathSegments": [
                        {
                          "key": "data",
                          "optional": false
                        },
                        {
                          "key": "task",
                          "optional": false
                        },
                        {
                          "key": "pickupTask",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "0037DDAD-6FA9-4FE9-89E3-391F0CD1AF08"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "f8890568-d1c4-4441-9f4e-e31f6f2a6b1d"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Not a pickup",
          "storeResult": false,
          "thenComponent": {
            "componentId": "38004752-4399-4368-B728-B12CB9398097",
            "componentType": "ELEMENT"
          }
        },
        "name": "A delivery, not a pickup?",
        "nextElementIds": [
          "38004752-4399-4368-B728-B12CB9398097"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      }
    ],
    "firstElementId": "0037DDAD-6FA9-4FE9-89E3-391F0CD1AF08",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": -450,
            "zoom": 1
          },
          "position": {
            "x": 571,
            "y": 219
          }
        },
        "flowElementId": "19584286-AB66-4A78-B237-785119D5E6A7",
        "groupId": null,
        "id": "EA337121-29F8-447A-A48E-2D6AC8BA0C70",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "C8DCCA8C-02D4-436F-A157-79BE34EB5713",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Delivery",
                "subPathSegments": [
                  {
                    "key": "files",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "38004752-4399-4368-B728-B12CB9398097"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "files",
          "storeResult": true
        },
        "name": "Each POD image",
        "nextElementIds": [
          "9B532BFD-B9A1-4C8C-8D46-2471688D93E4"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "0664210C-22EE-406C-9951-A60558C6544F",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Block 'Write the question for the billing lead' has an invalid configuration. Code Argument 'answerLink' has invalid value. Placeholder Data 'Answer link': value is required",
      "executionStaticData": [
        {
          "description": "The URL of the block Wait for the billing lead's answer. The Slack buttons open it.",
          "error": "Placeholder Data 'Answer link': value is required",
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The name of the Onfleet task metadata field that holds the McLeod load number. When a task has no such field, the flow looks for 'Load 12345' in the task notes.",
          "error": null,
          "name": "Load number field",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The McLeod Imaging document type the photos and signature are filed under.",
          "error": null,
          "name": "POD document type",
          "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-26T05:50:47.085Z"
}
