{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "EDA7E831-6201-4B7D-9CDE-FFF97FA9F56C",
    "name": "AWS Textract: scale ticket checked against McLeod"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -43.33333333333333,
        "y": 9.696969696969695,
        "zoom": 0.76
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a driver emails a scale ticket, Textract reads the weights, the ticket is filed on the McLeod load, and a weight off from McLeod's by more than the allowed difference goes to ops in Slack, who decide whether McLeod's weight changes.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a driver emails a scale ticket, Textract reads the weights, the ticket is filed on the McLeod load, and a weight off from McLeod's by more than the allowed difference goes to ops in Slack, who decide whether McLeod's weight changes.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 825,
            "y": 479
          }
        },
        "flowElementId": "25025A23-2825-4F79-8FDB-960F17FCD9DA",
        "groupId": null,
        "id": "A1D3B3FA-3C22-43E0-BAE7-2045E3C41BEA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "ac73f917-f1f5-413b-9853-b14487229d41",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "McLeod match",
                      "subPathSegments": [
                        {
                          "key": "found",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "25801791-9AD1-4AA8-A3CA-452E6C94FA1B"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "ac73f917-f1f5-413b-9853-b14487229d41"
            ]
          },
          "elseComponent": {
            "componentId": "C84993B2-30E7-4EC0-A665-A099EA476D20",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Load found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "F00C4ABC-B345-4651-947E-B7AC65CA6F59",
            "componentType": "ELEMENT"
          }
        },
        "name": "Load found?",
        "nextElementIds": [
          "C84993B2-30E7-4EC0-A665-A099EA476D20",
          "F00C4ABC-B345-4651-947E-B7AC65CA6F59"
        ],
        "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,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send unreadable ticket to ops Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 448,
            "y": 210
          }
        },
        "flowElementId": "25782CDD-649A-40BE-9BBC-A85219B9F009",
        "groupId": null,
        "id": "D7D1CED8-2895-4290-AF3B-283585FD49F6",
        "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": "Couldn't file the scale ticket "
                  },
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from "
                  },
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " (subject: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "). "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket error",
                    "subPathSegments": [
                      {
                        "key": "source",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "803D4774-836C-495F-84BE-1F9AB8CC7C39"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket error",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "803D4774-836C-495F-84BE-1F9AB8CC7C39"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E287DD76-36AE-446F-AD56-DC9AB0C663DB"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the ticket> and file it by hand."
                  }
                ],
                "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": "Unreadable ticket note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send unreadable ticket to ops",
        "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": "Ask ops Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 481,
            "y": 770
          }
        },
        "flowElementId": "95CED509-C7D8-458C-B0D6-307FFE5D0F83",
        "groupId": null,
        "id": "7BFA9605-FD00-4AB3-95E5-1D215A067B40",
        "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": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "askText",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  }
                ],
                "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": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "askBlocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  }
                ],
                "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 ops",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask ops",
        "nextElementIds": [
          "697D164D-9DD4-4846-8CE2-31DEFFD52C56"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Triggers when an email with a new attachment is received. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "legacyElementId": "JS###v1###GmailService###onNewAttachment",
          "methodName": "onNewAttachment",
          "position": {
            "x": 123,
            "y": 40
          }
        },
        "flowElementId": "7DCEC1ED-9E44-41AC-9993-B8FD8A587B7E",
        "groupId": null,
        "id": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewAttachment",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Scale ticket email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "subject:(\"scale ticket\" OR \"weight ticket\" OR \"scale tickets\") -in:sent",
            "includeSpamTrash": false
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New scale ticket email",
        "nextElementIds": [
          "E287DD76-36AE-446F-AD56-DC9AB0C663DB"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Runs synchronous document analysis to extract structured data using one or more feature types: FORMS (key-value pairs), TABLES (rows and cells), QUERIES (natural-language questions answered from the document), SIGNATURES (signature locations), and LAYOUT (reading order and layout elements). Supply the document as a FlowRunner file URL (single page, up to ~5 MB) or an S3 object. In addition to the raw Blocks, returns convenience extractions: form key-value pairs, a query-to-answer map, and simplified table rows. This is the flagship Textract operation. For multi-page PDFs use the asynchronous Start/Get Document Analysis operations.",
          "elementId": "EXTENSION:::SHARED:::default:::aws-textract:::analyzeDocument",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the scale ticket Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::aws-textract:::analyzeDocument",
          "legacyElementId": "JS###v1###Textract###analyzeDocument",
          "methodName": "analyzeDocument",
          "position": {
            "x": 823,
            "y": 40
          }
        },
        "flowElementId": "2E4EBE9D-27C9-45A8-8545-48FECB870A26",
        "groupId": null,
        "id": "22EAB8FA-B984-4D3B-AECD-B2C07F29DD5B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "featureTypes",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "JSON",
                    "label": null,
                    "parsedValue": [
                      "QUERIES"
                    ],
                    "type": "INPUT",
                    "value": "[\"QUERIES\"]"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E287DD76-36AE-446F-AD56-DC9AB0C663DB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "s3Bucket",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "s3Name",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "queries",
              "type": "COMPLEX_LIST",
              "value": [
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What is the gross weight?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "gross"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What is the tare weight?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "tare"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What is the net weight?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "net"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What is the scale ticket number?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "ticket"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What is the name and location of the scale?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "scale"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What date and time was the truck weighed?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "weighed"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "Text",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "What is the load, order or BOL number?"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "Alias",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "reference"
                          }
                        ],
                        "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": "analyzeDocument",
          "onFailElemId": "803D4774-836C-495F-84BE-1F9AB8CC7C39",
          "packageId": "default",
          "resultAlias": "Ticket reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "aws-textract",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the scale ticket",
        "nextElementIds": [
          "1B849B48-4A61-44AA-83F7-DABFD817C93C"
        ],
        "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": "Send unmatched ticket to ops Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 448,
            "y": 600
          }
        },
        "flowElementId": "0B6FBEF8-B63F-47BD-991D-F239B7318108",
        "groupId": null,
        "id": "C84993B2-30E7-4EC0-A665-A099EA476D20",
        "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 the scale ticket from "
                  },
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " (subject: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "). It was searched as load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket answers",
                    "subPathSegments": [
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B849B48-4A61-44AA-83F7-DABFD817C93C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E287DD76-36AE-446F-AD56-DC9AB0C663DB"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the ticket> and file it on the right load."
                  }
                ],
                "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 ticket note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send unmatched ticket to ops",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 824,
            "y": 779
          }
        },
        "flowElementId": "0FC8D054-84F9-47C8-B630-9A1A1D6A9DAD",
        "groupId": null,
        "id": "697D164D-9DD4-4846-8CE2-31DEFFD52C56",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Ops decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for ops' answer",
        "nextElementIds": [
          "86733393-2C7F-448E-A916-B8FB577A5DD4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "File the ticket on the load Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::uploadDocument",
          "legacyElementId": null,
          "methodName": "uploadDocument",
          "position": {
            "x": 464,
            "y": 470
          }
        },
        "flowElementId": "B074C973-8832-49F5-9270-C688F26D251D",
        "groupId": null,
        "id": "F00C4ABC-B345-4651-947E-B7AC65CA6F59",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod match",
                    "subPathSegments": [
                      {
                        "key": "load",
                        "optional": false
                      },
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "25801791-9AD1-4AA8-A3CA-452E6C94FA1B"
                  }
                ],
                "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": "Scale ticket document type",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Scale ticket document type"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E287DD76-36AE-446F-AD56-DC9AB0C663DB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileType",
              "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": "uploadDocument",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Filed ticket",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "File the ticket on the load",
        "nextElementIds": [
          "54DF19AB-77E4-44F5-B812-EC357327DBFD"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Saves a Gmail attachment to FlowRunner Files and returns the file URL.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the ticket file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "legacyElementId": "JS###v1###GmailService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 481,
            "y": 40
          }
        },
        "flowElementId": "DC97B234-99FF-4E24-A07D-968DF2141F94",
        "groupId": null,
        "id": "E287DD76-36AE-446F-AD56-DC9AB0C663DB",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  }
                ],
                "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": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Ticket file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the ticket file",
        "nextElementIds": [
          "22EAB8FA-B984-4D3B-AECD-B2C07F29DD5B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1136,
            "y": 779
          }
        },
        "flowElementId": "9659D935-610D-4023-88EE-DE6D5951B16F",
        "groupId": null,
        "id": "86733393-2C7F-448E-A916-B8FB577A5DD4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "969a5a33-ef75-487a-b0d6-e84574a3a925",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Ops decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "697D164D-9DD4-4846-8CE2-31DEFFD52C56"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "update"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "969a5a33-ef75-487a-b0d6-e84574a3a925"
            ]
          },
          "elseComponent": {
            "componentId": "8D434837-F4C5-4853-85ED-5E784621BFA2",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Change weight",
          "storeResult": false,
          "thenComponent": {
            "componentId": "3E850C8D-041C-44F5-8D60-3F446C7D6025",
            "componentType": "ELEMENT"
          }
        },
        "name": "Change McLeod's weight?",
        "nextElementIds": [
          "3E850C8D-041C-44F5-8D60-3F446C7D6025",
          "8D434837-F4C5-4853-85ED-5E784621BFA2"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Compare the weights Result"
          },
          "position": {
            "x": 126,
            "y": 479
          }
        },
        "flowElementId": "213B69EF-06B4-40F9-95D6-A86E18ADE1C4",
        "groupId": null,
        "id": "54DF19AB-77E4-44F5-B812-EC357327DBFD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Compare the weights', Error: The placeholder \"Answer link\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "t",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket answers",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "1B849B48-4A61-44AA-83F7-DABFD817C93C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "match",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod match",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "25801791-9AD1-4AA8-A3CA-452E6C94FA1B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "ticketUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E287DD76-36AE-446F-AD56-DC9AB0C663DB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sender",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "allowed",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Weight difference allowed (lb)",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Weight difference allowed (lb)"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Gross weight limit (lb)",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Gross weight limit (lb)"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minConfidence",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Minimum read confidence",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Minimum read confidence"
                  }
                ],
                "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 load = match && match.load ? match.load : {};\nconst orderId = String(load.orderId || '');\nconst unit = String(load.weightUnit || 'LB').toUpperCase();\nconst booked = Number(load.weight) ? Math.round(Number(load.weight) * (unit.startsWith('K') ? 2.20462 : 1)) : null;\nconst cargo = t.net != null ? t.net : (t.gross != null && t.tare != null && t.gross > t.tare ? t.gross - t.tare : null);\nconst cargoSource = t.net != null ? 'net weight on the ticket' : (cargo != null ? 'gross less tare on the ticket' : '');\nconst readConfidence = t.net != null ? t.netConfidence : t.grossConfidence;\nconst allowedLb = Number(allowed || 0);\nconst limitLb = Number(limit || 80000);\nconst lowRead = cargo != null && readConfidence < Number(minConfidence || 0);\nconst diff = cargo != null && booked != null ? cargo - booked : null;\nconst overGross = t.gross != null && t.gross > limitLb;\nconst ok = diff != null && Math.abs(diff) <= allowedLb && !lowRead && !overGross;\nconst fmt = (n) => (n == null ? 'not read' : `${Number(n).toLocaleString('en-US')} lb`);\nconst reasons = [\n  overGross ? `Gross ${fmt(t.gross)} is over your ${fmt(limitLb)} limit` : null,\n  cargo == null ? 'No net weight, or gross and tare, could be read on the ticket' : null,\n  cargo != null && booked == null ? 'McLeod has no weight on this load' : null,\n  diff != null && Math.abs(diff) > allowedLb ? `The ticket is ${fmt(Math.abs(diff))} ${diff > 0 ? 'heavier' : 'lighter'} than McLeod` : null,\n  lowRead ? `Textract is only ${readConfidence}% sure of the weight` : null,\n].filter(Boolean);\nconst link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst button = (text, decision, primary) => Object.assign({ type: 'button', text: { type: 'plain_text', text }, url: link(decision) }, primary ? { style: 'primary' } : {});\nconst askText = `Scale ticket for load ${orderId} needs a look`;\nconst lines = [\n  `*${askText}*`,\n  `Customer: ${(load.customer && load.customer.name) || 'not on the load'}. Carrier: ${(load.carrier && load.carrier.name) || 'not on the load'}. Emailed by: ${sender}`,\n  `Ticket ${t.ticketNumber || '(no number read)'}${t.scale ? ` at ${t.scale}` : ''}${t.weighedAt ? `, ${t.weighedAt}` : ''}`,\n  `Gross ${fmt(t.gross)}, tare ${fmt(t.tare)}, net ${fmt(t.net)}`,\n  `Cargo weight: ${fmt(cargo)}${cargoSource ? ` (${cargoSource})` : ''}. McLeod: ${fmt(booked)}`,\n  ...reasons.map((r) => `• ${r}`),\n  `The ticket is filed on the load in McLeod. <${ticketUrl}|Open the ticket>`,\n];\nconst elements = cargo != null\n  ? [button(`Set McLeod to ${fmt(cargo)}`, 'update', true), button(\"Keep McLeod's weight\", 'keep')]\n  : [button('Noted', 'keep', true)];\nreturn {\n  orderId,\n  booked,\n  cargoWeight: cargo,\n  ok,\n  askText,\n  askBlocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements },\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": "Weight check",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Compare the weights",
        "nextElementIds": [
          "463EDAA2-EDF2-41D8-9754-C3CDA05E47AC"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 110,
            "y": 779
          }
        },
        "flowElementId": "E74177EF-33C8-4972-BDF4-26323C9E569C",
        "groupId": null,
        "id": "463EDAA2-EDF2-41D8-9754-C3CDA05E47AC",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "3a276e1c-25d6-4772-9469-db334fcc4d2a",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Weight check",
                      "subPathSegments": [
                        {
                          "key": "ok",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "3a276e1c-25d6-4772-9469-db334fcc4d2a"
            ]
          },
          "elseComponent": {
            "componentId": "7BFA9605-FD00-4AB3-95E5-1D215A067B40",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Weight matches",
          "storeResult": false,
          "thenComponent": null
        },
        "name": "Weight matches McLeod?",
        "nextElementIds": [
          "7BFA9605-FD00-4AB3-95E5-1D215A067B40"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Applies a changed tender to an existing load (McLeod order): only the inputs you fill in change. Stops are matched by position in route order: the first entry changes the first stop, fields left empty keep their value, and entries past the load's last stop add stops (stops are never removed). An accessorial charge replaces the load's charge with the same charge code or is added; other charges stay. Stop reference numbers are added unless the stop already has them. McLeod applies its usual validation. Returns the load as Get Load does.",
          "elementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::updateLoad",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Update the load weight Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::updateLoad",
          "legacyElementId": null,
          "methodName": "updateLoad",
          "position": {
            "x": 1147,
            "y": 940
          }
        },
        "flowElementId": "39836CD6-3A6F-4240-9079-24E358618815",
        "groupId": null,
        "id": "3E850C8D-041C-44F5-8D60-3F446C7D6025",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "stops",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "shipmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "billOfLading",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "poNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "consigneeReference",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pieces",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "cargoWeight",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weightUnit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "LB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "commodity",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "equipmentTypeId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "freightCharge",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateUnits",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "accessorialCharges",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "stopReferenceNumbers",
              "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": "updateLoad",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Updated load",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Update the load weight",
        "nextElementIds": [
          "FF30FF67-5AC9-49E2-819D-3204CFC6D75A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick out the weights Result"
          },
          "position": {
            "x": 1157,
            "y": 49
          }
        },
        "flowElementId": "E4715F23-17DE-4AFA-970D-5810F8777BA5",
        "groupId": null,
        "id": "1B849B48-4A61-44AA-83F7-DABFD817C93C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "reading",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket reading",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "22EAB8FA-B984-4D3B-AECD-B2C07F29DD5B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "snippet",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Scale ticket email",
                    "subPathSegments": [
                      {
                        "key": "snippet",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const blocks = reading && Array.isArray(reading.blocks) ? reading.blocks : [];\nconst byId = new Map(blocks.map((b) => [b.Id, b]));\nconst answer = (alias) => {\n  const q = blocks.find((b) => b.BlockType === 'QUERY' && b.Query && b.Query.Alias === alias);\n  const rel = q && (q.Relationships || []).find((r) => r.Type === 'ANSWER');\n  const best = rel\n    ? rel.Ids.map((id) => byId.get(id)).filter((b) => b && b.BlockType === 'QUERY_RESULT').sort((a, b) => (b.Confidence || 0) - (a.Confidence || 0))[0]\n    : null;\n  return best ? { text: String(best.Text || '').trim(), confidence: Math.round(best.Confidence || 0) } : { text: '', confidence: 0 };\n};\nconst pounds = (a) => {\n  const t = a.text.replace(/,/g, '');\n  const m = t.match(/\\d+(\\.\\d+)?/);\n  if (!m) return null;\n  const n = Number(m[0]);\n  return /kg/i.test(t) ? Math.round(n * 2.20462) : Math.round(n);\n};\nconst gross = answer('gross');\nconst tare = answer('tare');\nconst net = answer('net');\nconst reference = answer('reference');\nconst inEmail = `${subject || ''} ${snippet || ''}`.match(/\\b\\d{5,10}\\b/);\nconst loadNumber = (inEmail && inEmail[0]) || reference.text.replace(/[^A-Za-z0-9-]/g, '');\nreturn {\n  gross: pounds(gross),\n  grossConfidence: gross.confidence,\n  tare: pounds(tare),\n  net: pounds(net),\n  netConfidence: net.confidence,\n  ticketNumber: answer('ticket').text,\n  scale: answer('scale').text,\n  weighedAt: answer('weighed').text,\n  reference: reference.text,\n  loadNumber,\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Ticket answers",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick out the weights",
        "nextElementIds": [
          "25801791-9AD1-4AA8-A3CA-452E6C94FA1B"
        ],
        "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 new weight Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 813,
            "y": 940
          }
        },
        "flowElementId": "227B970E-2531-46AE-96FB-019BA4F31428",
        "groupId": null,
        "id": "FF30FF67-5AC9-49E2-819D-3204CFC6D75A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to ops",
                    "subPathSegments": [
                      {
                        "key": "channelId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7BFA9605-FD00-4AB3-95E5-1D215A067B40"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Done. Load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " now shows "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "cargoWeight",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " lb in McLeod."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to ops",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7BFA9605-FD00-4AB3-95E5-1D215A067B40"
                  }
                ],
                "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": "New weight note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the new weight",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ticket not read Result"
          },
          "position": {
            "x": 825,
            "y": 219
          }
        },
        "flowElementId": "15A00DA5-14F2-45BE-B6A3-639CAC5B9BA7",
        "groupId": null,
        "id": "803D4774-836C-495F-84BE-1F9AB8CC7C39",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Ticket error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "Ticket not read",
        "nextElementIds": [
          "D7D1CED8-2895-4290-AF3B-283585FD49F6"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "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": 1145,
            "y": 470
          }
        },
        "flowElementId": "89CEF4DC-CE1A-421B-A546-41FD2A63493D",
        "groupId": null,
        "id": "25801791-9AD1-4AA8-A3CA-452E6C94FA1B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "loadNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ticket answers",
                    "subPathSegments": [
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B849B48-4A61-44AA-83F7-DABFD817C93C"
                  }
                ],
                "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
              }
            },
            {
              "name": "includeCustomerContacts",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "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": "findLoadByNumber",
          "onFailElemId": "803D4774-836C-495F-84BE-1F9AB8CC7C39",
          "packageId": "default",
          "resultAlias": "McLeod match",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the load in McLeod",
        "nextElementIds": [
          "A1D3B3FA-3C22-43E0-BAE7-2045E3C41BEA"
        ],
        "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 McLeod's weight stays Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1477,
            "y": 770
          }
        },
        "flowElementId": "55C02BA1-2EA2-4A12-8ADC-18A0EAF701EA",
        "groupId": null,
        "id": "8D434837-F4C5-4853-85ED-5E784621BFA2",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to ops",
                    "subPathSegments": [
                      {
                        "key": "channelId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7BFA9605-FD00-4AB3-95E5-1D215A067B40"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "McLeod's weight on load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Weight check",
                    "subPathSegments": [
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "54DF19AB-77E4-44F5-B812-EC357327DBFD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " stays as it is. The ticket stays filed on the load."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to ops",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7BFA9605-FD00-4AB3-95E5-1D215A067B40"
                  }
                ],
                "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": "Kept weight note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm McLeod's weight stays",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "DDA1613F-C18A-4B64-8F13-815FC4CD5FBD",
    "groups": [],
    "id": "D033B286-A881-45C4-B694-95AA3D604C39",
    "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 'Compare the weights' 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 ops' answer. The Slack buttons open it.",
          "error": "Placeholder Data 'Answer link': value is required",
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "How far the cargo weight on the ticket can be from the McLeod load weight before ops is asked.",
          "error": null,
          "name": "Weight difference allowed (lb)",
          "type": "INT",
          "value": ""
        },
        {
          "description": "A gross weight over this goes to ops.",
          "error": null,
          "name": "Gross weight limit (lb)",
          "type": "INT",
          "value": ""
        },
        {
          "description": "Textract's confidence in the weight, 0 to 100. Below it, ops is asked.",
          "error": null,
          "name": "Minimum read confidence",
          "type": "INT",
          "value": ""
        },
        {
          "description": "The McLeod Imaging document type the ticket is filed under.",
          "error": null,
          "name": "Scale ticket 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-29T02:52:52.357Z"
}
