{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "26A68CD9-5A3C-4874-B370-020AE26321BD",
    "name": "Microsoft Teams: TONU and layover claims approved"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -43.33333333333333,
        "y": 9.696969696969695,
        "zoom": 0.76
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a carrier emails a TONU or layover claim to an Outlook inbox, finds the load in McLeod, checks the claim against the load status and stop times, and asks the ops manager in Teams on an Adaptive Card. On approval, adds carrier extra pay and the customer charge to the load in McLeod and replies to the carrier.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a carrier emails a TONU or layover claim to an Outlook inbox, finds the load in McLeod, checks the claim against the load status and stop times, and asks the ops manager in Teams on an Adaptive Card. On approval, adds carrier extra pay and the customer charge to the load in McLeod and replies to the carrier.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Sends a reply to an existing message in a team channel as the signed-in user. Supports plain text or HTML content.",
          "elementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::replyToChannelMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm in the Teams thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::replyToChannelMessage",
          "legacyElementId": "JS###v1###MicrosoftTeamsService###replyToChannelMessage",
          "methodName": "replyToChannelMessage",
          "position": {
            "x": 821,
            "y": 940
          }
        },
        "flowElementId": "B643BBDA-B5C2-4E87-A8D2-EA5B2DBD55DB",
        "groupId": null,
        "id": "A3EEFE88-28EC-46CF-8D02-B65FF212C229",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "teamId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams team ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams team ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams channel ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams channel ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ops card",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A947BCC6-1FE4-4B68-A040-11046618C933"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contentType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "text"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "content",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "confirmText",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Confirm in the Teams thread', Error: The placeholder \"Teams team ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "replyToChannelMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "microsoft-teams",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm in the Teams thread",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends a message to a team channel as the signed-in user. Supports plain text or HTML content and an optional subject line.",
          "elementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::sendChannelMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Tell ops it's already on the load Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::sendChannelMessage",
          "legacyElementId": "JS###v1###MicrosoftTeamsService###sendChannelMessage",
          "methodName": "sendChannelMessage",
          "position": {
            "x": 123,
            "y": 210
          }
        },
        "flowElementId": "AE762495-2665-4AFA-A63F-B8ACC5EFA648",
        "groupId": null,
        "id": "FDA347F6-0015-4FA3-8C8D-384F03D601C4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "teamId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams team ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams team ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams channel ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams channel ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contentType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "html"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "content",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "alreadyHtml",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Tell ops it's already on the load', Error: The placeholder \"Teams team ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendChannelMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Already added note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "microsoft-teams",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell ops it's already on the load",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "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": 1204,
            "y": 40
          }
        },
        "flowElementId": "2E19E75E-E198-4CF7-A643-1943DC9DDC0B",
        "groupId": null,
        "id": "D661A865-B2E6-4C4E-8C2F-8610BCEFA732",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "loadNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "lookup",
                        "optional": false
                      },
                      {
                        "key": "orderNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "proNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "lookup",
                        "optional": false
                      },
                      {
                        "key": "proNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "billOfLading",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "lookup",
                        "optional": false
                      },
                      {
                        "key": "billOfLading",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  }
                ],
                "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": null,
          "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": [
          "093E65F8-33EF-450A-9DDC-239331B6249F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "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": "Bill the customer in McLeod Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::updateLoad",
          "legacyElementId": null,
          "methodName": "updateLoad",
          "position": {
            "x": 1191,
            "y": 640
          }
        },
        "flowElementId": "E10C25D5-1F30-424C-B035-D1A6F08999F9",
        "groupId": null,
        "id": "3E960860-A359-4FD9-A185-446B41553E50",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "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": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weightUnit",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "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": [
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "chargeCode",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Claim check",
                            "subPathSegments": [
                              {
                                "key": "chargeCode",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "description",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Claim check",
                            "subPathSegments": [
                              {
                                "key": "description",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "units",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Claim check",
                            "subPathSegments": [
                              {
                                "key": "units",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "rate",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Claim check",
                            "subPathSegments": [
                              {
                                "key": "customerRate",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "amount",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Claim check",
                            "subPathSegments": [
                              {
                                "key": "customerAmount",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                }
              ]
            },
            {
              "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": "Bill the customer in McLeod",
        "nextElementIds": [
          "CABAD364-1B96-48D7-9654-C61DB922AB03"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends a message to a team channel as the signed-in user. Supports plain text or HTML content and an optional subject line.",
          "elementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::sendChannelMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Tell ops the load isn't in McLeod Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::sendChannelMessage",
          "legacyElementId": "JS###v1###MicrosoftTeamsService###sendChannelMessage",
          "methodName": "sendChannelMessage",
          "position": {
            "x": 809,
            "y": 470
          }
        },
        "flowElementId": "1A9CAEE9-7FA6-48C3-BB92-765437B3CEB1",
        "groupId": null,
        "id": "E79760D9-3E18-44D2-A2B8-6B80E55BCC4F",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "teamId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams team ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams team ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams channel ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams channel ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contentType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "html"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "content",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "<p>"
                  },
                  {
                    "id": "RESULT",
                    "label": "Claim email",
                    "subPathSegments": [
                      {
                        "key": "from",
                        "optional": false
                      },
                      {
                        "key": "emailAddress",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " ("
                  },
                  {
                    "id": "RESULT",
                    "label": "Claim email",
                    "subPathSegments": [
                      {
                        "key": "from",
                        "optional": false
                      },
                      {
                        "key": "emailAddress",
                        "optional": false
                      },
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ") sent a "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "claimType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " claim, but no McLeod load matches "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "lookup",
                        "optional": false
                      },
                      {
                        "key": "orderNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "lookup",
                        "optional": false
                      },
                      {
                        "key": "proNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "lookup",
                        "optional": false
                      },
                      {
                        "key": "billOfLading",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ".</p><p>"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "</p><p>Check the number and answer the carrier from the inbox. The email's subject is: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Claim email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "</p>"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Carrier claim: load not found in McLeod"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Tell ops the load isn't in McLeod', Error: The placeholder \"Teams team ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendChannelMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Not found note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "microsoft-teams",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell ops the load isn't in McLeod",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends a reply to an existing message in a team channel as the signed-in user. Supports plain text or HTML content.",
          "elementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::replyToChannelMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Note the denial in the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::replyToChannelMessage",
          "legacyElementId": "JS###v1###MicrosoftTeamsService###replyToChannelMessage",
          "methodName": "replyToChannelMessage",
          "position": {
            "x": 822,
            "y": 770
          }
        },
        "flowElementId": "029739C9-9C52-4B7F-907A-9ED17DBCAAD4",
        "groupId": null,
        "id": "26C217A9-2662-402F-9392-1DB26DC2F583",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "teamId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams team ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams team ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams channel ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams channel ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ops card",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A947BCC6-1FE4-4B68-A040-11046618C933"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contentType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "text"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "content",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "denyText",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Note the denial in the thread', Error: The placeholder \"Teams team ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "replyToChannelMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Denial note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "microsoft-teams",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Note the denial in the thread",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 838,
            "y": 49
          }
        },
        "flowElementId": "A51F7C3D-3EA0-4B8B-A107-094CF56A9A82",
        "groupId": null,
        "id": "7B3EF16F-64D9-4611-AAF1-47C1AC8F111F",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "12f94a95-d93a-4f93-af29-0b8794fd6418",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Claim",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "isClaim",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "12f94a95-d93a-4f93-af29-0b8794fd6418"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Is a claim",
          "storeResult": false,
          "thenComponent": {
            "componentId": "D661A865-B2E6-4C4E-8C2F-8610BCEFA732",
            "componentType": "ELEMENT"
          }
        },
        "name": "TONU or layover claim?",
        "nextElementIds": [
          "D661A865-B2E6-4C4E-8C2F-8610BCEFA732"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1216,
            "y": 349
          }
        },
        "flowElementId": "87F774EF-89AF-490E-A2B1-30954F67CA20",
        "groupId": null,
        "id": "093E65F8-33EF-450A-9DDC-239331B6249F",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "0d6af6bc-0bfd-4700-805b-1d0f9830fc4e",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "McLeod match",
                      "subPathSegments": [
                        {
                          "key": "found",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "D661A865-B2E6-4C4E-8C2F-8610BCEFA732"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "0d6af6bc-0bfd-4700-805b-1d0f9830fc4e"
            ]
          },
          "elseComponent": {
            "componentId": "E79760D9-3E18-44D2-A2B8-6B80E55BCC4F",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Load found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "F4EF34F6-47CA-407E-8BB6-744DD9499E59",
            "componentType": "ELEMENT"
          }
        },
        "name": "Load found?",
        "nextElementIds": [
          "F4EF34F6-47CA-407E-8BB6-744DD9499E59",
          "E79760D9-3E18-44D2-A2B8-6B80E55BCC4F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends a reply to an existing email with the specified content and optional parameters.",
          "elementId": "EXTENSION:::SHARED:::default:::outlook:::replyToMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Tell the carrier it's approved Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::outlook:::replyToMessage",
          "legacyElementId": "JS###v1###OutlookService###replyToMessage",
          "methodName": "replyToMessage",
          "position": {
            "x": 1189,
            "y": 940
          }
        },
        "flowElementId": "65EC0F76-C9B9-46B6-81F2-23B46BB87344",
        "groupId": null,
        "id": "CABAD364-1B96-48D7-9654-C61DB922AB03",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Claim email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "HTML"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "body",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "approvedHtml",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Tell the carrier it's approved', Error: OAuth Connection is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "replyToMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Approval reply",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "outlook",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell the carrier it's approved",
        "nextElementIds": [
          "A3EEFE88-28EC-46CF-8D02-B65FF212C229"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check the claim against McLeod Result"
          },
          "position": {
            "x": 808,
            "y": 349
          }
        },
        "flowElementId": "012C1522-3ACB-44DB-9E21-BD57CA4E4B19",
        "groupId": null,
        "id": "F4EF34F6-47CA-407E-8BB6-744DD9499E59",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Check the claim against McLeod', Error: The placeholder \"TONU carrier pay\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "claim",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "match",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "McLeod match",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "D661A865-B2E6-4C4E-8C2F-8610BCEFA732"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "senderAddress",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Claim email",
                    "subPathSegments": [
                      {
                        "key": "from",
                        "optional": false
                      },
                      {
                        "key": "emailAddress",
                        "optional": false
                      },
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tonuPay",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "TONU carrier pay",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "TONU carrier pay"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tonuCharge",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "TONU customer charge",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "TONU customer charge"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "layoverPay",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Layover carrier pay per night",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Layover carrier pay per night"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "layoverCharge",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Layover customer charge per night",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Layover customer charge per night"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tonuPayCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "TONU pay code",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "TONU pay code"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tonuChargeCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "TONU charge code",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "TONU charge code"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "layoverPayCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Layover pay code",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Layover pay code"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "layoverChargeCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Layover charge code",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Layover charge code"
                  }
                ],
                "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 num = (v) => { const n = Number(v); return Number.isFinite(n) ? n : 0; };\nconst round2 = (n) => Math.round(num(n) * 100) / 100;\nconst usd = (n) => '$' + num(n).toFixed(2);\nconst esc = (s) => String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\nconst upper = (s) => String(s || '').trim().toUpperCase();\nconst clean = (s) => String(s || '').toLowerCase().replace(/[^a-z0-9 ]/g, ' ').replace(/\\b(inc|llc|ltd|co|corp|company|trucking|transport|transportation|logistics|express|freight|lines?)\\b/g, ' ').replace(/\\s+/g, ' ').trim();\nconst domainOf = (e) => String(e || '').toLowerCase().split('@')[1] || '';\n// Stop times are compared as the local wall-clock time McLeod shows for that stop\nconst wall = (iso) => { const m = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})/.exec(String(iso || '')); return m ? Date.UTC(+m[1], +m[2] - 1, +m[3], +m[4], +m[5]) : null; };\nconst fmt = (t) => (t == null ? 'not recorded' : new Date(t).toISOString().slice(0, 16).replace('T', ' '));\n\nconst c = claim && typeof claim === 'object' ? claim : {};\nconst type = /lay/i.test(String(c.claimType || '')) ? 'layover' : 'tonu';\nconst label = type === 'tonu' ? 'TONU' : 'Layover';\nconst load = match && match.load ? match.load : {};\nconst stops = Array.isArray(load.stops) ? load.stops : [];\nconst moves = Array.isArray(load.movements) ? load.movements : [];\nconst named = clean(c.carrierName);\nconst sameCarrier = (m) => { const n = clean(m && m.carrier && m.carrier.name); return Boolean(named && n && (n.includes(named) || named.includes(n))); };\nconst movement = moves.find(sameCarrier) || moves.find((m) => String(m.movementId) === String(load.currentMovementId)) || moves[moves.length - 1] || {};\nconst carrierName = (movement.carrier && movement.carrier.name) || (load.carrier && load.carrier.name) || c.carrierName || 'the carrier';\nconst customerName = (load.customer && load.customer.name) || 'Not shown';\nconst orderId = String(load.orderId || '');\nconst stopName = (s) => `${s.stopTypeDescription || s.stopType || 'Stop'} at ${[s.locationName, s.city].filter(Boolean).join(', ') || 'stop ' + (s.sequence || '')}`;\n\nconst checks = [];\nif (named && moves.length && !moves.some(sameCarrier)) checks.push(`Check: McLeod has ${carrierName} on this load, not ${c.carrierName}.`);\nconst carrierDomain = domainOf(movement.carrierEmail);\nconst senderDomain = domainOf(senderAddress);\nif (carrierDomain && senderDomain && carrierDomain !== senderDomain) checks.push(`Check: the email came from ${senderDomain}, but McLeod has ${carrierDomain} for this carrier.`);\n\nlet nights = 0;\nconst pickup = stops.find((s) => upper(s.stopType) === 'PU') || stops[0] || {};\nif (type === 'tonu') {\n  checks.push(`McLeod status: ${load.statusDescription || load.status || 'not shown'}.`);\n  const pArr = wall(pickup.actualArrival);\n  const pDep = wall(pickup.actualDeparture);\n  const pOpen = wall(pickup.scheduledArriveEarly);\n  if (pDep != null) checks.push(`Check: McLeod shows the truck left ${stopName(pickup)} at ${fmt(pDep)}, so the load moved.`);\n  else if (pArr != null) checks.push(`Supports it: the truck arrived at ${stopName(pickup)} at ${fmt(pArr)} (appointment ${fmt(pOpen)}) and McLeod has no departure.`);\n  else checks.push(`McLeod has no arrival or departure at ${stopName(pickup)} (appointment ${fmt(pOpen)}).`);\n} else {\n  for (const s of stops) {\n    const arr = wall(s.actualArrival);\n    const dep = wall(s.actualDeparture);\n    const closes = wall(s.scheduledArriveLate);\n    if (arr == null || dep == null) continue;\n    const days = Math.floor(dep / 864e5) - Math.floor(arr / 864e5);\n    if (days > 0) {\n      nights = Math.max(nights, days);\n      const late = closes != null && arr > closes;\n      checks.push(`${late ? 'Check' : 'Supports it'}: ${stopName(s)}, arrived ${fmt(arr)}${late ? `, after the window closed at ${fmt(closes)}` : ''}, departed ${fmt(dep)}, ${days} night${days > 1 ? 's' : ''}.`);\n    }\n  }\n  if (!nights) {\n    checks.push('Check: McLeod stop times show no overnight stay at any stop.');\n    nights = Math.max(0, Math.round(num(c.nights)));\n  }\n}\n\nconst units = type === 'tonu' ? 1 : Math.max(nights, 1);\nconst standardPay = type === 'tonu' ? round2(tonuPay) : round2(units * num(layoverPay));\nconst customerRate = type === 'tonu' ? round2(tonuCharge) : round2(layoverCharge);\nconst customerAmount = round2(units * customerRate);\nconst claimed = round2(c.amountClaimed);\nconst carrierAmount = claimed > 0 ? claimed : standardPay;\nif (claimed > 0 && standardPay > 0 && claimed > standardPay) checks.push(`Check: the carrier claims ${usd(claimed)}; your standard is ${usd(standardPay)}.`);\n\nconst payCode = type === 'tonu' ? tonuPayCode : layoverPayCode;\nconst chargeCode = type === 'tonu' ? tonuChargeCode : layoverChargeCode;\nconst extraPay = Array.isArray(movement.extraPay) && movement.extraPay.length ? movement.extraPay : (Array.isArray(load.carrierExtraPay) ? load.carrierExtraPay : []);\nconst paid = extraPay.find((e) => upper(e.deductCodeId) === upper(payCode));\nconst billed = (Array.isArray(load.accessorials) ? load.accessorials : []).find((a) => upper(a.chargeCode) === upper(chargeCode));\nconst outcome = paid || billed ? 'already' : 'ask';\nconst inv = c.invoiceNumber ? `, invoice ${c.invoiceNumber}` : '';\nconst what = type === 'tonu' ? 'TONU' : `Layover, ${units} night${units > 1 ? 's' : ''}`;\n\nconst link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst card = {\n  type: 'AdaptiveCard',\n  $schema: 'http://adaptivecards.io/schemas/adaptive-card.json',\n  version: '1.4',\n  body: [\n    { type: 'TextBlock', text: `${label} claim from ${carrierName} on load ${orderId}`, weight: 'Bolder', size: 'Medium', wrap: true },\n    { type: 'TextBlock', text: String(c.summary || c.reason || ''), wrap: true, isSubtle: true },\n    { type: 'FactSet', facts: [\n      { title: 'Claim', value: what + inv },\n      { title: 'Customer', value: customerName },\n      { title: 'Carrier claims', value: claimed > 0 ? usd(claimed) : 'No amount given' },\n      { title: 'Pay the carrier', value: `${usd(carrierAmount)} as ${upper(payCode)}` },\n      { title: 'Bill the customer', value: `${units} x ${usd(customerRate)} = ${usd(customerAmount)} as ${upper(chargeCode)}` },\n    ] },\n    { type: 'TextBlock', text: 'What McLeod shows', weight: 'Bolder', spacing: 'Medium', wrap: true },\n    { type: 'TextBlock', text: checks.map((x) => `- ${x}`).join('\\n'), wrap: true },\n  ],\n  actions: [\n    { type: 'Action.OpenUrl', title: 'Pay and bill it', url: link('approve') },\n    { type: 'Action.OpenUrl', title: 'Deny', url: link('deny') },\n  ],\n};\n\nreturn {\n  outcome,\n  type,\n  orderId,\n  movementId: String(movement.movementId || load.currentMovementId || ''),\n  payCode,\n  chargeCode,\n  description: `${what} (${c.reason || 'carrier claim'})`.slice(0, 60),\n  units,\n  carrierAmount,\n  carrierRate: round2(carrierAmount / units),\n  customerRate,\n  customerAmount,\n  subject: `${label} claim on load ${orderId}`,\n  card,\n  alreadyHtml: `<p><b>${esc(label)} claim from ${esc(carrierName)} on load ${esc(orderId)}${esc(inv)}:</b> McLeod already has ${paid ? `carrier extra pay ${esc(upper(payCode))} of ${usd(paid.amount)}` : ''}${paid && billed ? ' and ' : ''}${billed ? `customer charge ${esc(upper(chargeCode))} of ${usd(billed.amount)}` : ''} on this load, so nothing was added.</p><p>Check the load and answer the carrier from the inbox.</p>`,\n  approvedHtml: `<p>Hi,</p><p>Your ${esc(label)} claim on load ${esc(orderId)}${esc(inv)} is approved. We added ${usd(carrierAmount)} to your pay on this load.</p><p>Thank you</p>`,\n  confirmText: `Added to load ${orderId} in McLeod: carrier extra pay ${upper(payCode)} ${usd(carrierAmount)} for ${carrierName}, and customer charge ${upper(chargeCode)} ${usd(customerAmount)} for ${customerName}. The carrier has been told by email.`,\n  denyText: `Denied. Nothing was added to load ${orderId} in McLeod. Answer the carrier from the inbox.`,\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Claim check",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Check the claim against McLeod",
        "nextElementIds": [
          "467F294E-6943-4F86-BBA3-08FCA94BB798"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Posts an Adaptive Card to a team channel as the signed-in user, with optional text above it and an optional subject line. Use it for actionable notices such as an invoice exception card with Approve and Dispute buttons. Buttons must be Action.OpenUrl: Microsoft Graph supports only that action on a card a user posts, and other actions need a bot. Uses the same ChannelMessage.Send permission as Send Channel Message.",
          "elementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::sendAdaptiveCardToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the ops manager Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::microsoft-teams:::sendAdaptiveCardToChannel",
          "legacyElementId": "JS###v1###MicrosoftTeamsService###sendAdaptiveCardToChannel",
          "methodName": "sendAdaptiveCardToChannel",
          "position": {
            "x": 157,
            "y": 340
          }
        },
        "flowElementId": "2565ED85-31E0-4435-8039-C448713A4D14",
        "groupId": null,
        "id": "A947BCC6-1FE4-4B68-A040-11046618C933",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "teamId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams team ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams team ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Teams channel ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Teams channel ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "text",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "card",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "card",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Ask the ops manager', Error: The placeholder \"Teams team ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendAdaptiveCardToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Ops card",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "microsoft-teams",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the ops manager",
        "nextElementIds": [
          "46F22329-7084-424A-B53D-50EF2EF11963"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 508,
            "y": 649
          }
        },
        "flowElementId": "50E1D2E4-67F6-46B9-8979-1801F0924BF7",
        "groupId": null,
        "id": "33F12A90-376C-437B-8C44-1E30C3BDDA35",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "7b7a339f-70bd-4dc0-a719-36c54fb6bef9",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Ops decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "46F22329-7084-424A-B53D-50EF2EF11963"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "approve"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "7b7a339f-70bd-4dc0-a719-36c54fb6bef9"
            ]
          },
          "elseComponent": {
            "componentId": "26C217A9-2662-402F-9392-1DB26DC2F583",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Approved",
          "storeResult": false,
          "thenComponent": {
            "componentId": "76790530-FBAD-4E4E-8C20-BCB96CF0BE03",
            "componentType": "ELEMENT"
          }
        },
        "name": "Pay and bill it?",
        "nextElementIds": [
          "76790530-FBAD-4E4E-8C20-BCB96CF0BE03",
          "26C217A9-2662-402F-9392-1DB26DC2F583"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 508,
            "y": 349
          }
        },
        "flowElementId": "AB148DA1-8C56-4BE6-AD89-1D3C2978A2C6",
        "groupId": null,
        "id": "467F294E-6943-4F86-BBA3-08FCA94BB798",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "1284d2f5-1bbb-4c22-8e13-db9686e3abd9",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Claim check",
                      "subPathSegments": [
                        {
                          "key": "outcome",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "ask"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "1284d2f5-1bbb-4c22-8e13-db9686e3abd9"
            ]
          },
          "elseComponent": {
            "componentId": "FDA347F6-0015-4FA3-8C8D-384F03D601C4",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "New claim",
          "storeResult": false,
          "thenComponent": {
            "componentId": "A947BCC6-1FE4-4B68-A040-11046618C933",
            "componentType": "ELEMENT"
          }
        },
        "name": "Not on the load yet?",
        "nextElementIds": [
          "FDA347F6-0015-4FA3-8C8D-384F03D601C4",
          "A947BCC6-1FE4-4B68-A040-11046618C933"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Adds extra pay owed to the carrier on a load (McLeod other pay on the movement), such as detention, layover or a lumper the carrier paid. Paid to the movement's carrier unless another payee is given. McLeod applies its usual validation; the movement's extra pay is read before and after, and the action fails if no new entry appears. Returns the new entry and all of the movement's extra pay.",
          "elementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::addCarrierExtraPay",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pay the carrier in McLeod Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::mcleod-loadmaster:::addCarrierExtraPay",
          "legacyElementId": null,
          "methodName": "addCarrierExtraPay",
          "position": {
            "x": 831,
            "y": 640
          }
        },
        "flowElementId": "3BA3998D-077E-4925-9090-325CA3FAC3F4",
        "groupId": null,
        "id": "76790530-FBAD-4E4E-8C20-BCB96CF0BE03",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "movementId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "movementId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "payCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "payCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "amount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "carrierAmount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "units",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "units",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "carrierRate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "description",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Claim check",
                    "subPathSegments": [
                      {
                        "key": "description",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F4EF34F6-47CA-407E-8BB6-744DD9499E59"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "payeeId",
              "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": "addCarrierExtraPay",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Carrier extra pay",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "mcleod-loadmaster",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Pay the carrier in McLeod",
        "nextElementIds": [
          "3E960860-A359-4FD9-A185-446B41553E50"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the claim Result"
          },
          "tools": {},
          "position": {
            "x": 508,
            "y": 49
          }
        },
        "flowElementId": "E0FE1CA0-61DA-4A53-9FF3-8AB6E107C50C",
        "groupId": null,
        "id": "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Claim",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read emails that carriers send to a freight broker. Decide whether the email claims a TONU (truck ordered not used: the carrier was dispatched and the load was cancelled or was not ready, so the truck left empty) or a layover (the truck was held overnight because the shipper or receiver could not load or unload it on the appointment day). Reply with JSON only, with these fields:\nisClaim: true if the email claims a TONU or a layover, otherwise false\nclaimType: \"tonu\", \"layover\" or empty text\ncarrierName: the carrier's company name, or empty text\nmcNumber: the carrier's MC number, or empty text\ninvoiceNumber: the carrier's invoice number for the claim, or empty text\nlookup: an object with three fields, orderNumber, proNumber and billOfLading. Fill only the first of these that the email gives, in this order: the broker's load or order number, then the PRO number, then the bill of lading number. Leave the other two as empty text.\namountClaimed: the amount the carrier claims, as a number, or 0\nnights: for a layover, the number of nights claimed, otherwise 0\nreason: the carrier's reason in a few words\nsummary: one plain sentence saying what the carrier claims"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "From "
              },
              {
                "id": "RESULT",
                "label": "Claim email",
                "subPathSegments": [
                  {
                    "key": "from",
                    "optional": false
                  },
                  {
                    "key": "emailAddress",
                    "optional": false
                  },
                  {
                    "key": "name",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": " <"
              },
              {
                "id": "RESULT",
                "label": "Claim email",
                "subPathSegments": [
                  {
                    "key": "from",
                    "optional": false
                  },
                  {
                    "key": "emailAddress",
                    "optional": false
                  },
                  {
                    "key": "address",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ">\nSubject: "
              },
              {
                "id": "RESULT",
                "label": "Claim email",
                "subPathSegments": [
                  {
                    "key": "subject",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\n"
              },
              {
                "id": "RESULT",
                "label": "Claim email",
                "subPathSegments": [
                  {
                    "key": "body",
                    "optional": false
                  },
                  {
                    "key": "content",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "82AEA530-2D08-4761-9F56-1E470BFB5B29"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the claim",
        "nextElementIds": [
          "7B3EF16F-64D9-4611-AAF1-47C1AC8F111F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Fires once for each new email that arrives in a mail folder (the Inbox unless another folder is chosen), optionally only for emails from a sender, with a subject, with attachments or still unread.",
          "elementId": "EXTENSION:::SHARED:::default:::outlook:::onNewEmail",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::outlook:::onNewEmail",
          "newElementId": "EXTENSION:::SHARED:::default:::outlook:::onNewEmail",
          "legacyElementId": "JS###v1###OutlookService###onNewEmail",
          "methodName": "onNewEmail",
          "position": {
            "x": 128,
            "y": 40
          }
        },
        "flowElementId": "9B2493D3-C8BE-49CF-81BA-B8E300D75DAF",
        "groupId": null,
        "id": "82AEA530-2D08-4761-9F56-1E470BFB5B29",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'New email in the carrier inbox', Error: OAuth Connection is required",
            "valid": false
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewEmail",
          "frequency": {
            "repeat": {
              "every": 120
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Claim email",
          "serviceId": "outlook",
          "slaConditions": [],
          "staticData": {
            "bodyFormat": "text"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New email in the carrier inbox",
        "nextElementIds": [
          "3C5431E9-E256-4AAA-9C94-AB6D2F9C6D92"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 110,
            "y": 649
          }
        },
        "flowElementId": "5A18D164-2378-4258-9E59-43EEEEAA0F69",
        "groupId": null,
        "id": "46F22329-7084-424A-B53D-50EF2EF11963",
        "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 the ops manager's answer",
        "nextElementIds": [
          "33F12A90-376C-437B-8C44-1E30C3BDDA35"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      }
    ],
    "firstElementId": "82AEA530-2D08-4761-9F56-1E470BFB5B29",
    "groups": [],
    "id": "01D4EB28-A1DC-4A5F-9DA0-F6888BCCED7C",
    "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 'Check the claim against McLeod' has an invalid configuration. Code Argument 'tonuPay' has invalid value. Placeholder Data 'TONU carrier pay': value is required",
      "executionStaticData": [
        {
          "description": "Your Anthropic API key, for the block Read the claim.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the ops manager's answer. The Teams card buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The ID of the Microsoft Teams team that holds the ops channel (groupId in the channel's link).",
          "error": null,
          "name": "Teams team ID",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The ID of the ops channel, 19:...@thread.tacv2 (in the channel's link).",
          "error": null,
          "name": "Teams channel ID",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "Your standard TONU paid to a carrier.",
          "error": "Placeholder Data 'TONU carrier pay': value is required",
          "name": "TONU carrier pay",
          "type": "DOUBLE",
          "value": ""
        },
        {
          "description": "What you bill the customer for a TONU.",
          "error": null,
          "name": "TONU customer charge",
          "type": "DOUBLE",
          "value": ""
        },
        {
          "description": "Your standard layover paid to a carrier for each night.",
          "error": null,
          "name": "Layover carrier pay per night",
          "type": "DOUBLE",
          "value": ""
        },
        {
          "description": "What you bill the customer for each night of layover.",
          "error": null,
          "name": "Layover customer charge per night",
          "type": "DOUBLE",
          "value": ""
        },
        {
          "description": "The McLeod pay code for a TONU paid to the carrier.",
          "error": null,
          "name": "TONU pay code",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The McLeod other charge code for a TONU billed to the customer.",
          "error": null,
          "name": "TONU charge code",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The McLeod pay code for layover paid to the carrier.",
          "error": null,
          "name": "Layover pay code",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The McLeod other charge code for layover billed to the customer.",
          "error": null,
          "name": "Layover charge code",
          "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:51:11.421Z"
}
