{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "93DADF76-29A7-4221-972F-6216BF3631A6",
    "name": "NetSuite: carrier invoice three-way match"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -24.896755162241888,
        "y": 16.40117994100295,
        "zoom": 0.59
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a carrier invoice reaches the AP mailbox in Outlook, finds the rate con and POD for the same load, and books the vendor bill in NetSuite when all three agree. Anything that doesn't match goes to the AP lead in Slack with the three side by side.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a carrier invoice reaches the AP mailbox in Outlook, finds the rate con and POD for the same load, and books the vendor bill in NetSuite when all three agree. Anything that doesn't match goes to the AP lead in Slack with the three side by side.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the rate con and POD Result"
          },
          "position": {
            "x": 121,
            "y": 219
          }
        },
        "flowElementId": "2BA22398-3960-4273-845C-351931119E22",
        "groupId": null,
        "id": "A03DD8A7-DCA6-440C-87F9-8FACD90F0808",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "emails",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Load emails",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "13F42E00-B96C-48D2-BF4E-680221955F7F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "invoiceEmailId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Invoice email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "loadNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const messages = (emails && emails.value) || [];\nconst others = messages.filter(m => m.id !== invoiceEmailId && m.hasAttachments !== false);\nconst subject = m => m.subject || '';\nconst rateCon = loadNumber ? others.find(m => /rate ?con|rate confirmation|load confirmation|carrier confirmation/i.test(subject(m))) : null;\nconst pod = loadNumber ? others.find(m => /\\bpod\\b|proof of delivery|delivery receipt|signed bol/i.test(subject(m))) : null;\nconst missing = [!rateCon && 'rate con', !pod && 'POD'].filter(Boolean);\nreturn {\n  found: missing.length === 0,\n  rateConEmailId: rateCon ? rateCon.id : '',\n  podEmailId: pod ? pod.id : '',\n  missing: missing.join(' or '),\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Load documents",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the rate con and POD",
        "nextElementIds": [
          "A01DF81B-331B-4A09-A896-A9CC936805EB"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Records a bill from a vendor in NetSuite, with expense lines (charged to an account), item lines, or both. At least one line is required. Returns the internal ID of the new vendor bill.",
          "elementId": "EXTENSION:::SHARED:::default:::netsuite:::createVendorBill",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Book the bill at the rate con amount Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::netsuite:::createVendorBill",
          "legacyElementId": "JS###v1###NetSuiteService###createVendorBill",
          "methodName": "createVendorBill",
          "position": {
            "x": 471,
            "y": 1110
          }
        },
        "flowElementId": "4BF35A38-B5B4-444B-88DA-B581084457EA",
        "groupId": null,
        "id": "426E18C5-5608-44F5-A15F-CB079F6E0DBB",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "vendorId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Carrier match",
                    "subPathSegments": [
                      {
                        "key": "items",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tranId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tranDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dueDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "expenseLines",
              "type": "COMPLEX_LIST",
              "value": [
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "accountId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "PLACEHOLDER_DATA",
                            "label": "Freight expense account",
                            "subPathSegments": null,
                            "type": "EXECUTION_CONTEXT_STATIC_DATA",
                            "value": "Freight expense account"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "amount",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Match",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "rateConTotal",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "memo",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "Load "
                          },
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Invoice reading",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "loadNumber",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                          },
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": ": rate con "
                          },
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Match",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "rateConCharges",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "locationId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "departmentId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "classId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "itemLines",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "accountId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "termsId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subsidiaryId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "currencyId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "locationId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "departmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "classId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "memo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", PRO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "proNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". Short-paid to the rate con; invoiced "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Book the bill at the rate con amount', Error: The placeholder \"Freight expense account\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createVendorBill",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Short-paid bill",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "netsuite",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Book the bill at the rate con amount",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the bill is held Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 516,
            "y": 1240
          }
        },
        "flowElementId": "330D7D27-0AEC-45E1-B4BD-A7AF4544D030",
        "groupId": null,
        "id": "E274E6AC-D47E-4FD1-832A-6368906AB8F5",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Held. Carrier invoice "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " for load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is not booked in NetSuite."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to AP lead",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "11630FE1-45A7-44D7-9D8D-73265A46E816"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Hold note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the bill is held",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 874,
            "y": 219
          }
        },
        "flowElementId": "E6677744-5ADA-48CB-A27F-3C66CD40124E",
        "groupId": null,
        "id": "2BADC71D-B644-437B-8E9B-83B7A380A024",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "315054a2-084b-44e0-9541-89ebdaeb6da5",
                "nestedOperation": null,
                "operation": ">",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Carrier match",
                      "subPathSegments": [
                        {
                          "key": "totalResults",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "INT",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 0
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "e1c18fa8-58f8-4168-b115-1aa73dab9e35",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Existing bills",
                      "subPathSegments": [
                        {
                          "key": "totalResults",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "6B24411F-2F5F-4170-9053-8AF9A7E52A63"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "INT",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 0
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "315054a2-084b-44e0-9541-89ebdaeb6da5",
              "AND",
              "e1c18fa8-58f8-4168-b115-1aa73dab9e35"
            ]
          },
          "elseComponent": {
            "componentId": "4B172009-2F96-43D7-A571-7A657B9968C1",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Carrier ready",
          "storeResult": false,
          "thenComponent": {
            "componentId": "13F42E00-B96C-48D2-BF4E-680221955F7F",
            "componentType": "ELEMENT"
          }
        },
        "name": "Carrier found and not booked yet?",
        "nextElementIds": [
          "4B172009-2F96-43D7-A571-7A657B9968C1",
          "13F42E00-B96C-48D2-BF4E-680221955F7F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Compare invoice, rate con and POD Result"
          },
          "tools": {},
          "position": {
            "x": 1268,
            "y": 519
          }
        },
        "flowElementId": "00C44FEE-D41F-41D4-9A8F-3118D19508B9",
        "groupId": null,
        "id": "6A553C4F-16FA-4314-804F-A44726BDECC4",
        "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": [
            {
              "mimeType": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "contentType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6685ACF1-A822-4298-BE28-923A7DEEA312"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6685ACF1-A822-4298-BE28-923A7DEEA312"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              }
            },
            {
              "mimeType": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Rate con file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "contentType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B56C7855-EE60-4B53-ADCC-C20D0B0DC92F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Rate con file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B56C7855-EE60-4B53-ADCC-C20D0B0DC92F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              }
            },
            {
              "mimeType": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "POD file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "contentType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "9A00D333-3590-4238-8B48-9E2BD0C8C745"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "POD file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "9A00D333-3590-4238-8B48-9E2BD0C8C745"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              }
            }
          ],
          "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": "Match",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You check a carrier invoice against the rate confirmation (rate con) and the proof of delivery (POD) for the same load before accounts payable books it. The first file is the carrier invoice, the second the rate con, the third the POD. Reply with JSON only, with these fields:\nrateConTotal: the total agreed on the rate con, line haul plus any accessorials it lists, as a number with no currency sign or commas\nrateConCharges: the rate con's charges in one line, for example \"Line haul 2,400.00; fuel 310.00\"\ninvoiceCharges: the invoice's charges in one line, including any detention, lumper, layover or TONU\npodSigned: true if the consignee signed the POD, false if the signature line is blank\npodExceptions: any shortage, overage, damage or refusal noted on the POD, in one sentence; empty text if the POD is clean\nagrees: true only when all of these hold: the three documents are for the same load, the invoice total equals rateConTotal to the cent, every charge on the invoice is on the rate con (an accessorial such as detention, lumper, layover or TONU that is not on the rate con does not agree), and the POD is signed with nothing noted on it\ndifferences: what does not agree, in one or two short sentences; empty text when agrees is true"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Carrier: "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Invoice reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "carrierName",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "AC4427AC-8411-43E9-9203-A1235285380B"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nInvoice number: "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Invoice reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "invoiceNumber",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "AC4427AC-8411-43E9-9203-A1235285380B"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nLoad number: "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Invoice reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "loadNumber",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "AC4427AC-8411-43E9-9203-A1235285380B"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nPRO: "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Invoice reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "proNumber",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "AC4427AC-8411-43E9-9203-A1235285380B"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nInvoice total: "
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Invoice reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "total",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "AC4427AC-8411-43E9-9203-A1235285380B"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Compare invoice, rate con and POD",
        "nextElementIds": [
          "DEA219FD-04D6-4738-B39A-F4D5E77EDD7D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the carrier invoice Result"
          },
          "tools": {},
          "position": {
            "x": 910,
            "y": 49
          }
        },
        "flowElementId": "317BD8A7-C00A-4880-B05A-7FE999630E62",
        "groupId": null,
        "id": "AC4427AC-8411-43E9-9203-A1235285380B",
        "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": [
            {
              "mimeType": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "contentType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6685ACF1-A822-4298-BE28-923A7DEEA312"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6685ACF1-A822-4298-BE28-923A7DEEA312"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              }
            }
          ],
          "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": "Invoice reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read carrier freight invoices that arrive in the accounts payable mailbox. From the attached invoice, reply with JSON only, with these fields:\ncarrierName: the carrier's company name as printed on the invoice, without LLC, Inc, Corp or Co at the end\ninvoiceNumber: the carrier's invoice number\ninvoiceDate: the invoice date as YYYY-MM-DD\nloadNumber: our load number printed on the invoice, letters, digits and dashes only; empty text if there is none\nproNumber: the PRO number, or empty text\ntotal: the invoice total as a number, with no currency sign or commas\ncharges: every charge on the invoice in one line, for example \"Line haul 2,400.00; detention 150.00; lumper 85.00\""
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Email from "
              },
              {
                "id": "RESULT",
                "label": "Invoice email",
                "subPathSegments": [
                  {
                    "key": "from",
                    "optional": false
                  },
                  {
                    "key": "emailAddress",
                    "optional": false
                  },
                  {
                    "key": "address",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSubject: "
              },
              {
                "id": "RESULT",
                "label": "Invoice email",
                "subPathSegments": [
                  {
                    "key": "subject",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\n"
              },
              {
                "id": "RESULT",
                "label": "Invoice email",
                "subPathSegments": [
                  {
                    "key": "body",
                    "optional": false
                  },
                  {
                    "key": "content",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the carrier invoice",
        "nextElementIds": [
          "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Queries vendors in NetSuite using SuiteQL. Supports optional search filtering by company name or entity ID. Results are paginated using limit and offset.",
          "elementId": "EXTENSION:::SHARED:::default:::netsuite:::listVendors",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the carrier in NetSuite Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::netsuite:::listVendors",
          "legacyElementId": "JS###v1###NetSuiteService###listVendors",
          "methodName": "listVendors",
          "position": {
            "x": 1298,
            "y": 40
          }
        },
        "flowElementId": "E994D854-7F19-4EEE-8B93-FB82BF168A56",
        "groupId": null,
        "id": "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "search",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "carrierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 5
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "offset",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Find the carrier in NetSuite', 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": "listVendors",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Carrier match",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "netsuite",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the carrier in NetSuite",
        "nextElementIds": [
          "6B24411F-2F5F-4170-9053-8AF9A7E52A63"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the question for the AP lead Result"
          },
          "position": {
            "x": 876,
            "y": 819
          }
        },
        "flowElementId": "B17BB2BD-4B00-4C55-B605-0CD0E7CE0E5A",
        "groupId": null,
        "id": "0CA943F3-6347-4A37-83D5-E2D706B0325E",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "invoiceNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "carrier",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "carrierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "loadNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "invoiceTotal",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "invoiceCharges",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Match",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceCharges",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateConTotal",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Match",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "rateConTotal",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateConCharges",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Match",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "rateConCharges",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "podSigned",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Match",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "podSigned",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "podExceptions",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Match",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "podExceptions",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "differences",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Match",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "differences",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "invoiceUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6685ACF1-A822-4298-BE28-923A7DEEA312"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateConUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Rate con file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B56C7855-EE60-4B53-ADCC-C20D0B0DC92F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "podUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "POD file",
                    "subPathSegments": [
                      {
                        "key": "files",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "9A00D333-3590-4238-8B48-9E2BD0C8C745"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst money = (n) => (n === '' || n == null || isNaN(Number(n))) ? 'amount not read' : Number(n).toLocaleString('en-US', { style: 'currency', currency: 'USD' });\nconst title = `Carrier invoice ${invoiceNumber} from ${carrier} for load ${loadNumber} does not match`;\nreturn {\n  text: `${title}. It needs your call before it is booked in NetSuite.`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: `*${title}*\\n${differences || 'See the three documents below.'}` } },\n    { type: 'section', fields: [\n      { type: 'mrkdwn', text: `*Carrier invoice*\\n${money(invoiceTotal)}\\n${invoiceCharges}\\n<${invoiceUrl}|Open the invoice>` },\n      { type: 'mrkdwn', text: `*Rate con*\\n${money(rateConTotal)}\\n${rateConCharges}\\n<${rateConUrl}|Open the rate con>` },\n      { type: 'mrkdwn', text: `*POD*\\n${podSigned ? 'Signed' : 'Not signed'}${podExceptions ? `\\n${podExceptions}` : ''}\\n<${podUrl}|Open the POD>` },\n    ] },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Book as invoiced' }, url: link('invoice') },\n      { type: 'button', text: { type: 'plain_text', text: 'Book at rate con amount' }, url: link('ratecon') },\n      { type: 'button', style: 'danger', text: { type: 'plain_text', text: 'Hold' }, url: link('hold') },\n    ] },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for the AP lead",
        "nextElementIds": [
          "11630FE1-45A7-44D7-9D8D-73265A46E816"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a list of email messages from the user's mailbox with optional filtering by sender, subject, date range, and read status.",
          "elementId": "EXTENSION:::SHARED:::default:::outlook:::getMessagesList",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the rate con and POD emails Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::outlook:::getMessagesList",
          "legacyElementId": "JS###v1###OutlookService###getMessagesList",
          "methodName": "getMessagesList",
          "position": {
            "x": 479,
            "y": 210
          }
        },
        "flowElementId": "3A44268D-1199-4F29-91B0-31B2122FAE92",
        "groupId": null,
        "id": "13F42E00-B96C-48D2-BF4E-680221955F7F",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "maxResults",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 30
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "since",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "before",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "loadUnread",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "nextLink",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Find the rate con and POD emails', 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": "getMessagesList",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Load emails",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "outlook",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the rate con and POD emails",
        "nextElementIds": [
          "A03DD8A7-DCA6-440C-87F9-8FACD90F0808"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 123,
            "y": 519
          }
        },
        "flowElementId": "1080EAAA-1C35-4D40-9A8F-D5885BD83102",
        "groupId": null,
        "id": "A01DF81B-331B-4A09-A896-A9CC936805EB",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "a40cda00-5b88-42bb-a3c3-4df08d6cb295",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Load documents",
                      "subPathSegments": [
                        {
                          "key": "found",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "A03DD8A7-DCA6-440C-87F9-8FACD90F0808"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "a40cda00-5b88-42bb-a3c3-4df08d6cb295"
            ]
          },
          "elseComponent": {
            "componentId": "5E24EC6D-5801-453C-A90A-5D6AD8CC8709",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Paperwork found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "B56C7855-EE60-4B53-ADCC-C20D0B0DC92F",
            "componentType": "ELEMENT"
          }
        },
        "name": "Rate con and POD found?",
        "nextElementIds": [
          "B56C7855-EE60-4B53-ADCC-C20D0B0DC92F",
          "5E24EC6D-5801-453C-A90A-5D6AD8CC8709"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Downloads the file attachments of an email message into FlowRunner file storage and returns a link to each saved file. Choose one attachment, or leave it empty to save every file attachment. Attached Outlook items (emails, events, contacts) and links to cloud files have no file to save and are listed as skipped. A stored file with the same name is replaced.",
          "elementId": "EXTENSION:::SHARED:::default:::outlook:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the rate con file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::outlook:::saveAttachment",
          "legacyElementId": "JS###v1###OutlookService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 520,
            "y": 510
          }
        },
        "flowElementId": "C78BF25C-6CFF-453F-BBF3-AAAC26B9B8C3",
        "groupId": null,
        "id": "B56C7855-EE60-4B53-ADCC-C20D0B0DC92F",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Load documents",
                    "subPathSegments": [
                      {
                        "key": "rateConEmailId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A03DD8A7-DCA6-440C-87F9-8FACD90F0808"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeInline",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Save the rate con file', 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": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Rate con file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "outlook",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the rate con file",
        "nextElementIds": [
          "9A00D333-3590-4238-8B48-9E2BD0C8C745"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Queries vendor bills in NetSuite using SuiteQL, newest first. Optionally filters by vendor and by transaction ID (reference number). Results include date, vendor, total and status. Paginated using limit and offset.",
          "elementId": "EXTENSION:::SHARED:::default:::netsuite:::listVendorBills",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check for a bill already booked Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::netsuite:::listVendorBills",
          "legacyElementId": "JS###v1###NetSuiteService###listVendorBills",
          "methodName": "listVendorBills",
          "position": {
            "x": 1284,
            "y": 210
          }
        },
        "flowElementId": "A944370C-4187-4FAC-AA07-DF90885ADC2B",
        "groupId": null,
        "id": "6B24411F-2F5F-4170-9053-8AF9A7E52A63",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "vendorId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Carrier match",
                    "subPathSegments": [
                      {
                        "key": "items",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "search",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 5
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "offset",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Check for a bill already booked', 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": "listVendorBills",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Existing bills",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "netsuite",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Check for a bill already booked",
        "nextElementIds": [
          "2BADC71D-B644-437B-8E9B-83B7A380A024"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Tell AP what's missing Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 516,
            "y": 640
          }
        },
        "flowElementId": "99F6DC73-B2D2-4CDC-870A-FBCB2AFC7BA1",
        "groupId": null,
        "id": "5E24EC6D-5801-453C-A90A-5D6AD8CC8709",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Carrier invoice "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "carrierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " for load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is not booked yet: no "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Load documents",
                    "subPathSegments": [
                      {
                        "key": "missing",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A03DD8A7-DCA6-440C-87F9-8FACD90F0808"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " found in the mailbox for that load number. Book it by hand once the paperwork is in."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Missing note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell AP what's missing",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 110,
            "y": 819
          }
        },
        "flowElementId": "3EF9E288-F565-4BD2-BB6A-E5CAD0ADDACE",
        "groupId": null,
        "id": "742DB135-EB44-4BD7-9B55-1795542C096C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "AP decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the AP lead's answer",
        "nextElementIds": [
          "103601B7-8180-47C0-B4BF-B2DEF7F9D789"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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": 141,
            "y": 40
          }
        },
        "flowElementId": "5BC7C2ED-F1AA-4704-A9EE-135C3BA24827",
        "groupId": null,
        "id": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'New carrier invoice', Error: OAuth Connection is required",
            "valid": false
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewEmail",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Invoice email",
          "serviceId": "outlook",
          "slaConditions": [],
          "staticData": {
            "subjectContains": "invoice",
            "hasAttachmentsOnly": true,
            "includeAttachments": true,
            "bodyFormat": "text"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New carrier invoice",
        "nextElementIds": [
          "6685ACF1-A822-4298-BE28-923A7DEEA312"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the invoice to AP by hand Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 487,
            "y": 340
          }
        },
        "flowElementId": "E75E43CC-4608-47A9-B55B-811C96E28E84",
        "groupId": null,
        "id": "4B172009-2F96-43D7-A571-7A657B9968C1",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Carrier invoice "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "carrierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " for load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " needs AP by hand.\nVendors in NetSuite matching the carrier name: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Carrier match",
                    "subPathSegments": [
                      {
                        "key": "totalResults",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nBills already booked with this invoice number: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Existing bills",
                    "subPathSegments": [
                      {
                        "key": "totalResults",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6B24411F-2F5F-4170-9053-8AF9A7E52A63"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nEmail: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Invoice email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from "
                  },
                  {
                    "id": "RESULT",
                    "label": "Invoice email",
                    "subPathSegments": [
                      {
                        "key": "from",
                        "optional": false
                      },
                      {
                        "key": "emailAddress",
                        "optional": false
                      },
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "By hand note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the invoice to AP by hand",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Downloads the file attachments of an email message into FlowRunner file storage and returns a link to each saved file. Choose one attachment, or leave it empty to save every file attachment. Attached Outlook items (emails, events, contacts) and links to cloud files have no file to save and are listed as skipped. A stored file with the same name is replaced.",
          "elementId": "EXTENSION:::SHARED:::default:::outlook:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the POD file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::outlook:::saveAttachment",
          "legacyElementId": "JS###v1###OutlookService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 921,
            "y": 510
          }
        },
        "flowElementId": "447B1AB9-295D-4335-BC83-9E1BC032F15F",
        "groupId": null,
        "id": "9A00D333-3590-4238-8B48-9E2BD0C8C745",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Load documents",
                    "subPathSegments": [
                      {
                        "key": "podEmailId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A03DD8A7-DCA6-440C-87F9-8FACD90F0808"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeInline",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Save the POD file', 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": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "POD file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "outlook",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the POD file",
        "nextElementIds": [
          "6A553C4F-16FA-4314-804F-A44726BDECC4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Downloads the file attachments of an email message into FlowRunner file storage and returns a link to each saved file. Choose one attachment, or leave it empty to save every file attachment. Attached Outlook items (emails, events, contacts) and links to cloud files have no file to save and are listed as skipped. A stored file with the same name is replaced.",
          "elementId": "EXTENSION:::SHARED:::default:::outlook:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the invoice file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::outlook:::saveAttachment",
          "legacyElementId": "JS###v1###OutlookService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 523,
            "y": 40
          }
        },
        "flowElementId": "618FE429-D89B-4DAA-BC21-0D1155965587",
        "groupId": null,
        "id": "6685ACF1-A822-4298-BE28-923A7DEEA312",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Invoice email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeInline",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Save the invoice file', 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": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Invoice file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "outlook",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the invoice file",
        "nextElementIds": [
          "AC4427AC-8411-43E9-9203-A1235285380B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "router",
          "isFirstElement": false,
          "blockDefinitionId": "router",
          "casesViewMode": {
            "987546a9-e05b-4d79-850d-346388e60284": "SIMPLE",
            "87a5f2c5-01a5-49bc-bad7-518391e50fb1": "SIMPLE"
          },
          "position": {
            "x": 111,
            "y": 1119
          }
        },
        "flowElementId": "574D8947-813F-4123-A501-546CE6DF8B86",
        "groupId": null,
        "id": "103601B7-8180-47C0-B4BF-B2DEF7F9D789",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "AP choice",
          "storeResult": true,
          "switchCases": [
            {
              "defaultCase": false,
              "id": "987546a9-e05b-4d79-850d-346388e60284",
              "label": "Book as invoiced",
              "nextComponents": [
                {
                  "componentId": "FDFB76F9-5D99-4100-8350-3FC5192D0E50",
                  "componentType": "ELEMENT"
                }
              ],
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "invoice"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "defaultCase": false,
              "id": "87a5f2c5-01a5-49bc-bad7-518391e50fb1",
              "label": "Book at rate con amount",
              "nextComponents": [
                {
                  "componentId": "426E18C5-5608-44F5-A15F-CB079F6E0DBB",
                  "componentType": "ELEMENT"
                }
              ],
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "ratecon"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "defaultCase": true,
              "id": "c6d6c0c4-cda6-4635-82e9-6ed22d034070",
              "label": "Everything Else",
              "nextComponents": [
                {
                  "componentId": "E274E6AC-D47E-4FD1-832A-6368906AB8F5",
                  "componentType": "ELEMENT"
                }
              ],
              "type": "SIMPLE",
              "value": null
            }
          ],
          "switchExpression": {
            "expression": [
              {
                "id": "RESULT",
                "label": "AP decision",
                "subPathSegments": [
                  {
                    "key": "decision",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "742DB135-EB44-4BD7-9B55-1795542C096C"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "What did the AP lead decide?",
        "nextElementIds": [
          "426E18C5-5608-44F5-A15F-CB079F6E0DBB",
          "E274E6AC-D47E-4FD1-832A-6368906AB8F5",
          "FDFB76F9-5D99-4100-8350-3FC5192D0E50"
        ],
        "nextGroupIds": [],
        "type": "VALUE_ROUTER"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the AP lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 523,
            "y": 810
          }
        },
        "flowElementId": "150CCBD3-5F3F-4BBB-87DE-CCE85BC56165",
        "groupId": null,
        "id": "11630FE1-45A7-44D7-9D8D-73265A46E816",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0CA943F3-6347-4A37-83D5-E2D706B0325E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0CA943F3-6347-4A37-83D5-E2D706B0325E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to AP lead",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the AP lead",
        "nextElementIds": [
          "742DB135-EB44-4BD7-9B55-1795542C096C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1319,
            "y": 819
          }
        },
        "flowElementId": "5927862C-DF68-4D18-B486-18C7A4B7532F",
        "groupId": null,
        "id": "DEA219FD-04D6-4738-B39A-F4D5E77EDD7D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "ec91b645-4153-4019-92d2-0b5572d23dec",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Match",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "agrees",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "6A553C4F-16FA-4314-804F-A44726BDECC4"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "ec91b645-4153-4019-92d2-0b5572d23dec"
            ]
          },
          "elseComponent": {
            "componentId": "0CA943F3-6347-4A37-83D5-E2D706B0325E",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "All agree",
          "storeResult": false,
          "thenComponent": {
            "componentId": "FDFB76F9-5D99-4100-8350-3FC5192D0E50",
            "componentType": "ELEMENT"
          }
        },
        "name": "All three agree?",
        "nextElementIds": [
          "0CA943F3-6347-4A37-83D5-E2D706B0325E",
          "FDFB76F9-5D99-4100-8350-3FC5192D0E50"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Records a bill from a vendor in NetSuite, with expense lines (charged to an account), item lines, or both. At least one line is required. Returns the internal ID of the new vendor bill.",
          "elementId": "EXTENSION:::SHARED:::default:::netsuite:::createVendorBill",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Book the bill Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::netsuite:::createVendorBill",
          "legacyElementId": "JS###v1###NetSuiteService###createVendorBill",
          "methodName": "createVendorBill",
          "position": {
            "x": 523,
            "y": 980
          }
        },
        "flowElementId": "CB45E392-0C32-47BF-A47F-753EF4EC9AE3",
        "groupId": null,
        "id": "FDFB76F9-5D99-4100-8350-3FC5192D0E50",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "vendorId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Carrier match",
                    "subPathSegments": [
                      {
                        "key": "items",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AB03CB47-C799-43A0-ABCA-FBD037EFA3F9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tranId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tranDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "invoiceDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dueDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "expenseLines",
              "type": "COMPLEX_LIST",
              "value": [
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "accountId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "PLACEHOLDER_DATA",
                            "label": "Freight expense account",
                            "subPathSegments": null,
                            "type": "EXECUTION_CONTEXT_STATIC_DATA",
                            "value": "Freight expense account"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "amount",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Invoice reading",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "total",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "memo",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "Load "
                          },
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Invoice reading",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "loadNumber",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                          },
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": ": "
                          },
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Invoice reading",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "charges",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "locationId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "departmentId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "classId",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "itemLines",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "accountId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "termsId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subsidiaryId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "currencyId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "locationId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "departmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "classId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "memo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Load "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "loadNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", PRO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Invoice reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "proNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "AC4427AC-8411-43E9-9203-A1235285380B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Book the bill', Error: The placeholder \"Freight expense account\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createVendorBill",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Vendor bill",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "netsuite",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Book the bill",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "5F99D9A3-15CF-4FEF-A9BA-95BF5E373CAB",
    "groups": [],
    "id": "BAB55A97-AD1A-4D32-9D22-3A396C8CDF6F",
    "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": "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.",
      "executionStaticData": [
        {
          "description": "The Anthropic key the two AI steps use.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the AP lead's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "Internal ID of the NetSuite expense account carrier bills are charged to (for example Freight Expense or Purchased Transportation).",
          "error": null,
          "name": "Freight expense account",
          "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-19T06:33:10.693Z"
}
