{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "51952A5B-3A19-486A-BA9E-31717B7D7FC4",
    "name": "Detrack: delivered loads to billing"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -70,
        "y": 0,
        "zoom": 1
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Every evening, finds the day's completed deliveries in Detrack, exports each signed POD as a PDF and emails it to billing with the load number. Deliveries closed with no signature go to dispatch in Slack instead.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Every evening, finds the day's completed deliveries in Detrack, exports each signed POD as a PDF and emails it to billing with the load number. Deliveries closed with no signature go to dispatch in Slack instead.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Runs an advanced search across jobs using structured filters including a date range, one or more D.O. numbers, multiple statuses, type, and zone. More flexible than List Jobs when you need to match several D.O. numbers or statuses at once, or query across a date window.",
          "elementId": "EXTENSION:::SHARED:::default:::detrack:::searchJobs",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find today's delivered loads Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::detrack:::searchJobs",
          "legacyElementId": "JS###v1###DetrackService###searchJobs",
          "methodName": "searchJobs",
          "position": {
            "x": 422,
            "y": 40
          }
        },
        "flowElementId": "E3757A61-EBED-4EBE-B86B-8B6C8730D926",
        "groupId": null,
        "id": "CD3B23F2-3C7B-44A0-963D-996013B0BA9A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "type",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Delivery"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "doNumbers",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "statuses",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "JSON",
                    "label": null,
                    "parsedValue": [
                      "completed"
                    ],
                    "type": "INPUT",
                    "value": "[\"completed\"]"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateFrom",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Dates",
                    "subPathSegments": [
                      {
                        "key": "today",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1804307C-39CB-4743-ACDC-3848BDD53CC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dateTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Dates",
                    "subPathSegments": [
                      {
                        "key": "today",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1804307C-39CB-4743-ACDC-3848BDD53CC4"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "zone",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "page",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 100
                  }
                ],
                "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": "searchJobs",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Delivered loads",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "detrack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find today's delivered loads",
        "nextElementIds": [],
        "nextGroupIds": [
          "4E6E2209-6875-4720-A15C-38E2C1596785"
        ],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a single job by its D.O. number and date, returning the complete job record. This includes proof-of-delivery details captured by the driver such as status, milestones, signature and photo file URLs, recipient name, and geolocation of the completed stop.",
          "elementId": "EXTENSION:::SHARED:::default:::detrack:::getJob",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the delivery record Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::detrack:::getJob",
          "legacyElementId": "JS###v1###DetrackService###getJob",
          "methodName": "getJob",
          "position": {
            "x": 110,
            "y": 220
          }
        },
        "flowElementId": "F84077DF-C1B1-4CFD-BF01-6B0E93392BBD",
        "groupId": "4E6E2209-6875-4720-A15C-38E2C1596785",
        "id": "4D70EC66-DCDF-41E0-9EA9-50AAAB0678A7",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "doNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "do_number",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "date",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "type",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Delivery"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getJob",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Delivery record",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "detrack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the delivery record",
        "nextElementIds": [
          "FCF6C301-780B-4281-BA5A-32B90E8FED86"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends emails through Gmail for AI agents to automate customer communication.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the POD to billing Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 1118,
            "y": 220
          }
        },
        "flowElementId": "6FD55F1A-524B-46DD-9FD3-9596C6D206D3",
        "groupId": "4E6E2209-6875-4720-A15C-38E2C1596785",
        "id": "30664B71-6E92-47CE-BE52-8E94B118046D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Billing email",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Billing email"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Load "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "do_number",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " delivered "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": signed POD attached, ready to bill"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "plain"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyContent",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Load "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "do_number",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " was delivered on "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " and the consignee signed for it."
                  },
                  {
                    "id": "NEWLINE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "\n"
                  },
                  {
                    "id": "NEWLINE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "\n"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Consignee: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery record",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "deliver_to_collect_from",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4D70EC66-DCDF-41E0-9EA9-50AAAB0678A7"
                  },
                  {
                    "id": "NEWLINE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "\n"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Signed at: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery record",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "pod_at",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4D70EC66-DCDF-41E0-9EA9-50AAAB0678A7"
                  },
                  {
                    "id": "NEWLINE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "\n"
                  },
                  {
                    "id": "NEWLINE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "\n"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "The signed POD from Detrack is attached. The load is ready to bill."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bcc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachments",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "[\""
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "POD file",
                    "subPathSegments": [
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1F6834C3-AAFD-4F6A-B30A-C5F93D9C7068"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\"]"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": true,
                "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": "sendMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Billing email sent",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the POD to billing",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 428,
            "y": 229
          }
        },
        "flowElementId": "E47C92C9-D987-4A42-9926-CA04EEFA79D9",
        "groupId": "4E6E2209-6875-4720-A15C-38E2C1596785",
        "id": "FCF6C301-780B-4281-BA5A-32B90E8FED86",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "d0d817a6-05bb-40d8-9d52-831d258efdf1",
                "nestedOperation": null,
                "operation": "isNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Delivery record",
                      "subPathSegments": [
                        {
                          "key": "data",
                          "optional": false
                        },
                        {
                          "key": "signature_file_url",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "4D70EC66-DCDF-41E0-9EA9-50AAAB0678A7"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": []
              }
            ],
            "grouping": [
              "d0d817a6-05bb-40d8-9d52-831d258efdf1"
            ]
          },
          "elseComponent": {
            "componentId": "E2B32C16-A7CA-4776-9C61-93E1CAB0AA0B",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Signed",
          "storeResult": false,
          "thenComponent": {
            "componentId": "1F6834C3-AAFD-4F6A-B30A-C5F93D9C7068",
            "componentType": "ELEMENT"
          }
        },
        "name": "Signed at delivery?",
        "nextElementIds": [
          "1F6834C3-AAFD-4F6A-B30A-C5F93D9C7068",
          "E2B32C16-A7CA-4776-9C61-93E1CAB0AA0B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Exports a job's proof-of-delivery (or shipping label) document as a file, stores it in FlowRunner file storage, and returns a downloadable URL. The POD document contains the captured signature, photos, and delivery details. Choose PDF or TIFF format.",
          "elementId": "EXTENSION:::SHARED:::default:::detrack:::getProofOfDelivery",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Export the POD Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::detrack:::getProofOfDelivery",
          "legacyElementId": "JS###v1###DetrackService###getProofOfDelivery",
          "methodName": "getProofOfDelivery",
          "position": {
            "x": 773,
            "y": 220
          }
        },
        "flowElementId": "52CCF175-1523-40AD-8B36-38FE385C83F2",
        "groupId": "4E6E2209-6875-4720-A15C-38E2C1596785",
        "id": "1F6834C3-AAFD-4F6A-B30A-C5F93D9C7068",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "doNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "do_number",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "date",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "document",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "pod"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "format",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "pdf"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "type",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Delivery"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getProofOfDelivery",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "POD file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "detrack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Export the POD",
        "nextElementIds": [
          "30664B71-6E92-47CE-BE52-8E94B118046D"
        ],
        "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 dispatch the POD is unsigned Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 728,
            "y": 350
          }
        },
        "flowElementId": "D9F86465-D2F6-4A6A-BF48-C4B8696917E2",
        "groupId": "4E6E2209-6875-4720-A15C-38E2C1596785",
        "id": "E2B32C16-A7CA-4776-9C61-93E1CAB0AA0B",
        "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": "Load "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "do_number",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " was closed as delivered in Detrack on "
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "4E6E2209-6875-4720-A15C-38E2C1596785"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", but the POD has no signature. Consignee: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Delivery record",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "deliver_to_collect_from",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4D70EC66-DCDF-41E0-9EA9-50AAAB0678A7"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". It was not sent to billing. Get the signed POD into Detrack, then send it to billing."
                  }
                ],
                "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": "Unsigned POD alert",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell dispatch the POD is unsigned",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": true,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Work out today's date Result"
          },
          "position": {
            "x": 110,
            "y": 49
          }
        },
        "flowElementId": "87B02877-8ECB-46A7-868B-1ED6C95F2980",
        "groupId": null,
        "id": "1804307C-39CB-4743-ACDC-3848BDD53CC4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "timeZone",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Time zone",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Time zone"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const fmt = (d) => new Intl.DateTimeFormat('en-CA', { timeZone: timeZone || 'America/Chicago', year: 'numeric', month: '2-digit', day: '2-digit' }).format(d);\nconst now = new Date();\nreturn { today: fmt(now), tomorrow: fmt(new Date(now.getTime() + 86400000)) };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Dates",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Work out today's date",
        "nextElementIds": [
          "CD3B23F2-3C7B-44A0-963D-996013B0BA9A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "1804307C-39CB-4743-ACDC-3848BDD53CC4",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": -180,
            "zoom": 1
          },
          "position": {
            "x": 774,
            "y": 49
          }
        },
        "flowElementId": "40100C9D-8551-4A28-989E-C7371D1852E6",
        "groupId": null,
        "id": "4E6E2209-6875-4720-A15C-38E2C1596785",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "4D70EC66-DCDF-41E0-9EA9-50AAAB0678A7",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Delivered loads",
                "subPathSegments": [
                  {
                    "key": "data",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "CD3B23F2-3C7B-44A0-963D-996013B0BA9A"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "loop",
          "storeResult": true
        },
        "name": "For each delivered load",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "BE59CA95-DA4B-4C13-B452-DEEC0E82D3E7",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "Your dispatch time zone, used to decide which day counts as today.",
          "error": null,
          "name": "Time zone",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The billing inbox that receives each signed POD.",
          "error": null,
          "name": "Billing email",
          "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:35:18.231Z"
}
