{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "63D94A79-8DBF-4DEB-AF9B-075C5BC5548A",
    "name": "ShipBob: emailed ASN to a receiving order"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -34.19898819561551,
        "y": 13.018549747048901,
        "zoom": 0.67
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a client or supplier emails an ASN or packing list, reads it, matches every SKU and the ship-to fulfillment center in ShipBob, creates the warehouse receiving order with its boxes and expected quantities, and replies to the sender with the receiving order number and ShipBob's box labels as a PDF. Unknown SKUs, a duplicate PO, a past date or a ship-to that matches no fulfillment center go to the receiving lead in Slack first.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a client or supplier emails an ASN or packing list, reads it, matches every SKU and the ship-to fulfillment center in ShipBob, and creates the warehouse receiving order with its boxes and expected quantities. Unknown SKUs, a duplicate PO, a past date or a ship-to that matches no fulfillment center go to the receiving lead in Slack first.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Searches and lists products in your ShipBob account with comprehensive filtering options. Returns variant details including SKU, inventory levels, dimensions, and status. Supports filtering by name, SKU, barcode, category, taxonomy, channel, platform, product type, variant status, inventory sync, and more. Results are paginated with cursor-based navigation.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::getProductsShipBob",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the SKU in ShipBob Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::getProductsShipBob",
          "legacyElementId": "JS###v1###ShipBobService###getProductsShipBob",
          "methodName": "getProductsShipBob",
          "position": {
            "x": 110,
            "y": 130
          }
        },
        "flowElementId": "98DB42C2-C40D-4B77-856D-BB3F3FEE085E",
        "groupId": "9A055D63-2362-4F61-9E07-477CC71C2E3C",
        "id": "AB42CF7F-79A6-4C49-B5CA-39A329CF3796",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "search",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sku",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "9A055D63-2362-4F61-9E07-477CC71C2E3C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sellerSku",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "barcode",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "barcodes",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "productId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "variantId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "inventoryId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "categoryIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "taxonomyIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "channelIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "platformIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "legacyIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "salesChannel",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "productType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "variantStatus",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "hasVariants",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "hasDigitalVariants",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "onHand",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "isInventorySyncEnabled",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reviewsPending",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "lastUpdatedTimestamp",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pageSize",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortOrder",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Find the SKU in ShipBob', 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": "getProductsShipBob",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "SKU lookup",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the SKU in ShipBob",
        "nextElementIds": [
          "D21E3B95-1335-43AE-8FA3-C23B89D0ED61"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm it is set aside Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1721,
            "y": 380
          }
        },
        "flowElementId": "40F857B8-01DF-43F2-A9F9-5DB06D4D9353",
        "groupId": null,
        "id": "02D50F9C-7C31-44DC-B580-EB0CCD778900",
        "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": "Set aside. No receiving order was created for PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to receiving lead",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "5F595FA6-429E-4AB6-9A32-1A0E763C657B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "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": "BASIC",
                "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": "Set aside note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm it is set aside",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Saves a Gmail attachment to FlowRunner Files and returns the file URL.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the ASN file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "legacyElementId": "JS###v1###GmailService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 520,
            "y": 40
          }
        },
        "flowElementId": "AC406FB2-9DCF-4BB8-98D5-290CC407DA06",
        "groupId": null,
        "id": "216632E1-6802-4833-9354-2D6D0AD97BD3",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "ASN file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the ASN file",
        "nextElementIds": [
          "BBB64CFB-6F8F-4B9E-BDD0-96010356E877"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a list of Warehouse Receiving Orders with optional filtering by status, date range, fulfillment center, and external sync flag. Supports pagination. Useful for monitoring inbound shipments and inventory receiving progress.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::getWROs",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get open receiving orders Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::getWROs",
          "legacyElementId": "JS###v1###ShipBobService###getWROs",
          "methodName": "getWROs",
          "position": {
            "x": 501,
            "y": 210
          }
        },
        "flowElementId": "A6F7920A-DEFC-4242-87F4-F0A9CECA3CA8",
        "groupId": null,
        "id": "ADD21222-84C3-4191-A5D2-DB9DDA0F785E",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "statuses",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "[\"Awaiting\",\"Arrived\",\"PartiallyArrived\",\"Processing\",\"ArrivedAtHub\",\"PartiallyArrivedAtHub\",\"ProcessingAtHub\"]"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": true,
                "resultType": null
              }
            },
            {
              "name": "insertStartDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "insertEndDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "externalSync",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "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": 250
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Get open receiving orders', 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": "getWROs",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Open receipts",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get open receiving orders",
        "nextElementIds": [
          "128A84B6-833E-4A93-A0E1-028E8E238E62"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": true,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "SKU matches"
          },
          "position": {
            "x": 436,
            "y": 139
          }
        },
        "flowElementId": "84C7C1CC-4E42-47EA-8FD0-62007E3A48BA",
        "groupId": "9A055D63-2362-4F61-9E07-477CC71C2E3C",
        "id": "D21E3B95-1335-43AE-8FA3-C23B89D0ED61",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "prev",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - SKU matches",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.SKU matches",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "SKU matches",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sku",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "9A055D63-2362-4F61-9E07-477CC71C2E3C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "result",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "SKU lookup",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "AB42CF7F-79A6-4C49-B5CA-39A329CF3796"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(prev) ? prev : [];\nconst items = (result && result.items) || [];\nlet match = null;\nfor (const p of items) {\n  for (const v of p.variants || []) {\n    if (String(v.sku || '').toLowerCase() === String(sku || '').toLowerCase() && v.inventory && v.inventory.inventory_id) {\n      match = { sku, inventoryId: v.inventory.inventory_id, name: v.name || p.name || '', found: true };\n    }\n  }\n}\nreturn list.concat([match || { sku, inventoryId: null, name: '', found: false }]);"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "SKU noted",
          "retryPolicy": null,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "SKU matches"
          },
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Note the inventory ID",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "SKU matches": "ddb6bd67-fd5e-46db-8f8d-cb7dc2cf06b2"
          },
          "position": {
            "x": 1363,
            "y": 219
          }
        },
        "flowElementId": "68CEB0FC-BAFD-4C99-B1BD-9AD813D5DB20",
        "groupId": null,
        "id": "E3D9D0E3-ED70-4377-9F44-90DEFBF1DB91",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "SKU matches",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EMPTY_LIST",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "arrays.create()"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "bucket",
          "storeResult": true
        },
        "name": "Start the SKU list",
        "nextElementIds": [],
        "nextGroupIds": [
          "9A055D63-2362-4F61-9E07-477CC71C2E3C"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new Warehouse Receiving Order (WRO) to send inventory to a ShipBob fulfillment center. Specify the target fulfillment center, package type, box packaging configuration, expected arrival date, and boxes with their inventory items and quantities. Maximum 50 boxes per request for Package type.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::createWRO",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the receiving order in ShipBob Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::createWRO",
          "legacyElementId": "JS###v1###ShipBobService###createWRO",
          "methodName": "createWRO",
          "position": {
            "x": 1305,
            "y": 940
          }
        },
        "flowElementId": "57B9D05F-D71F-4E35-BEDB-5FA8AAC898AE",
        "groupId": null,
        "id": "72C92835-8DFC-4F39-AE28-5E9012B622BE",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "fulfillmentCenterId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "fulfillmentCenterId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "packageType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "packageType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "boxPackagingType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "boxPackagingType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "expectedArrivalDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "expectedArrivalDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "boxes",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "boxes",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "purchaseOrderNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Create the receiving order in ShipBob', 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": "createWRO",
          "onFailElemId": "D6783AEC-519C-4264-820D-0947E8CAFEAD",
          "packageId": "default",
          "resultAlias": "New WRO",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the receiving order in ShipBob",
        "nextElementIds": [
          "6AF69F5B-8E0A-43DC-9BFF-321EF4595642"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Triggers when an email with a new attachment is received. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "legacyElementId": "JS###v1###GmailService###onNewAttachment",
          "methodName": "onNewAttachment",
          "position": {
            "x": 124,
            "y": 40
          }
        },
        "flowElementId": "634BD95A-B254-49D8-AA6B-16048DD0B88D",
        "groupId": null,
        "id": "110BAD23-BC0F-4489-8268-8A363C3FA0DC",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewAttachment",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New ASN email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "has:attachment subject:(ASN OR \"ship notice\" OR \"packing list\" OR inbound)"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New ASN email",
        "nextElementIds": [
          "216632E1-6802-4833-9354-2D6D0AD97BD3"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "ShipBob refused it Result"
          },
          "position": {
            "x": 953,
            "y": 1079
          }
        },
        "flowElementId": "26EE44C5-6FA1-455C-BE64-083F4FB5C006",
        "groupId": null,
        "id": "D6783AEC-519C-4264-820D-0947E8CAFEAD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Create error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "ShipBob refused it",
        "nextElementIds": [
          "D9CADE4C-855D-41C0-B465-8DCB61698AF7"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the ASN Result"
          },
          "tools": {},
          "position": {
            "x": 1363,
            "y": 49
          }
        },
        "flowElementId": "0DDAD730-E3DE-4CEA-B0BE-9D269B8DF165",
        "groupId": null,
        "id": "D0611C0C-C3D5-49D0-9883-E108A1936864",
        "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": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "mimetype",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "216632E1-6802-4833-9354-2D6D0AD97BD3"
                  }
                ],
                "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": "ASN reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read advance ship notices (ASNs), packing lists and inbound BOLs that clients and suppliers email to a warehouse receiving team. From the attached document, reply with JSON only, with these fields:\npoNumber: the PO or reference number for the shipment, or empty text\nshipper: the company shipping the goods\ncarrier: the carrier name, or empty text\nexpectedArrivalDate: the expected arrival or delivery date as YYYY-MM-DD, or empty text if none is given\nshipTo: the ship-to address on one line\nfulfillmentCenterId: the id of the ShipBob fulfillment center in the list below whose address matches the ship-to, or empty text if none matches\npackageType: Package for parcel boxes, Pallet for palletized freight, FloorLoadedContainer for a floor-loaded container\nboxes: one entry per box or pallet, each with trackingNumber (the parcel tracking number, or the PRO or BOL number for LTL and truckload freight) and items, a list of objects with sku, quantity, lotNumber and lotDate (YYYY-MM-DD); lotNumber and lotDate are empty text when not given. If the document does not split the lines by box or pallet, return one entry holding every line.\nskus: every distinct SKU on the document, as a list of text\nNever guess a SKU, a quantity or a date."
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Email from "
              },
              {
                "id": "RESULT",
                "label": "New ASN email",
                "subPathSegments": [
                  {
                    "key": "fromAddress",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSubject: "
              },
              {
                "id": "RESULT",
                "label": "New ASN email",
                "subPathSegments": [
                  {
                    "key": "subject",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nShipBob fulfillment centers:\n"
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Fulfillment centers",
                "subPathSegments": null,
                "type": "ELEMENT_LINK",
                "value": "BBB64CFB-6F8F-4B9E-BDD0-96010356E877"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the ASN",
        "nextElementIds": [
          "E3D9D0E3-ED70-4377-9F44-90DEFBF1DB91"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 901,
            "y": 389
          }
        },
        "flowElementId": "6F969357-0D62-4E04-B823-9AD0BF2683C7",
        "groupId": null,
        "id": "0C65F170-D8C1-493D-A33C-ABC2FE6C8985",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Receiving decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the receiving lead's answer",
        "nextElementIds": [
          "BB7C22B6-D2AC-438D-9ED2-7915429D6DD8"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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": "Reply with the receiving order number Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 438,
            "y": 930
          }
        },
        "flowElementId": "75583D42-A385-42ED-929E-E1BE920E700E",
        "groupId": null,
        "id": "5E7ACCEF-47E5-4FD9-B847-1A1A3035313D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Re: "
                  },
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "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": "Thank you for the ASN. ShipBob receiving order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New WRO",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "72C92835-8DFC-4F39-AE28-5E9012B622BE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is set up for PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "unitCount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " units, arriving at "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New WRO",
                    "subPathSegments": [
                      {
                        "key": "fulfillment_center",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "72C92835-8DFC-4F39-AE28-5E9012B622BE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " on "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "expectedArrivalDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D0611C0C-C3D5-49D0-9883-E108A1936864"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ".\n\nThe ShipBob box labels are attached. Please print them and put each label on its box or pallet before the freight ships, and show the receiving order number on the BOL so our dock can match the freight to it.\n\n"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "replyNote",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n\nReceiving team"
                  }
                ],
                "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": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "threadId",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachments",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "[\""
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Box labels",
                    "subPathSegments": [
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6AF69F5B-8E0A-43DC-9BFF-321EF4595642"
                  },
                  {
                    "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": "Reply to sender",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Reply with the receiving order and box labels",
        "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,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Tell receiving why Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 520,
            "y": 1070
          }
        },
        "flowElementId": "1222AB94-5094-4197-8A44-3BF5A81163B3",
        "groupId": null,
        "id": "D9CADE4C-855D-41C0-B465-8DCB61698AF7",
        "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": "ShipBob refused the receiving order for PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " from "
                  },
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Create error",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D6783AEC-519C-4264-820D-0947E8CAFEAD"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "216632E1-6802-4833-9354-2D6D0AD97BD3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the ASN>"
                  }
                ],
                "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": "BASIC",
                "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": "BASIC",
                "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": "Refusal note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell receiving why",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves all available ShipBob fulfillment centers with their addresses, contact information, and timezone details. Use this to identify valid fulfillment center IDs for creating Warehouse Receiving Orders.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::getFulfillmentCenters",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get ShipBob fulfillment centers Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::getFulfillmentCenters",
          "legacyElementId": "JS###v1###ShipBobService###getFulfillmentCenters",
          "methodName": "getFulfillmentCenters",
          "position": {
            "x": 917,
            "y": 40
          }
        },
        "flowElementId": "5FEBFE17-DD2B-45B2-8CB3-6A0AE21307F9",
        "groupId": null,
        "id": "BBB64CFB-6F8F-4B9E-BDD0-96010356E877",
        "metaInfo": {
          "bodyParams": [],
          "clientValidationState": {
            "errorMessage": "Block: 'Get ShipBob fulfillment centers', 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": "getFulfillmentCenters",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Fulfillment centers",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get ShipBob fulfillment centers",
        "nextElementIds": [
          "D0611C0C-C3D5-49D0-9883-E108A1936864"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 124,
            "y": 389
          }
        },
        "flowElementId": "F2E03881-0897-4254-9C43-DAD7814472E3",
        "groupId": null,
        "id": "A0D2D1D1-20D3-4776-B54D-EC2522204988",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "1b3ef57a-e860-4c5f-9a3b-c85836fecf7d",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Receiving order",
                      "subPathSegments": [
                        {
                          "key": "ready",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "1b3ef57a-e860-4c5f-9a3b-c85836fecf7d"
            ]
          },
          "elseComponent": {
            "componentId": "5F595FA6-429E-4AB6-9A32-1A0E763C657B",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Ready",
          "storeResult": false,
          "thenComponent": {
            "componentId": "72C92835-8DFC-4F39-AE28-5E9012B622BE",
            "componentType": "ELEMENT"
          }
        },
        "name": "Ready to create?",
        "nextElementIds": [
          "5F595FA6-429E-4AB6-9A32-1A0E763C657B",
          "72C92835-8DFC-4F39-AE28-5E9012B622BE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the receiving lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 514,
            "y": 380
          }
        },
        "flowElementId": "9C9B5D6D-56BD-4125-AF8F-FE79D948454D",
        "groupId": null,
        "id": "5F595FA6-429E-4AB6-9A32-1A0E763C657B",
        "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": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "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": "BASIC",
                "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": "BASIC",
                "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": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  }
                ],
                "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 receiving lead",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the receiving lead",
        "nextElementIds": [
          "0C65F170-D8C1-493D-A33C-ABC2FE6C8985"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Build the receiving order Result"
          },
          "position": {
            "x": 110,
            "y": 219
          }
        },
        "flowElementId": "F53C75B7-BD7A-45F1-A9AB-6C60330920DF",
        "groupId": null,
        "id": "128A84B6-833E-4A93-A0E1-028E8E238E62",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Build the receiving order', Error: The placeholder \"Answer link\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "reading",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D0611C0C-C3D5-49D0-9883-E108A1936864"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "matches",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - SKU matches",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.SKU matches",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "SKU matches",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fcs",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Fulfillment centers",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "BBB64CFB-6F8F-4B9E-BDD0-96010356E877"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "openWros",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Open receipts",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "ADD21222-84C3-4191-A5D2-DB9DDA0F785E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sender",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "216632E1-6802-4833-9354-2D6D0AD97BD3"
                  }
                ],
                "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 r = reading || {};\nconst known = {};\n(Array.isArray(matches) ? matches : []).forEach((m) => {\n  if (m && m.found) known[String(m.sku).toLowerCase()] = m;\n});\nconst centers = Array.isArray(fcs) ? fcs : [];\nconst openList = Array.isArray(openWros) ? openWros : [];\nconst blockers = [];\nconst unknown = [];\nconst boxes = [];\nconst summary = [];\nlet lineCount = 0;\nlet unitCount = 0;\n(r.boxes || []).forEach((b, i) => {\n  const items = [];\n  (b.items || []).forEach((it) => {\n    const m = known[String(it.sku || '').toLowerCase()];\n    const qty = Number(it.quantity) || 0;\n    if (!m) {\n      if (!unknown.includes(it.sku)) unknown.push(it.sku);\n      return;\n    }\n    const item = { inventory_id: m.inventoryId, quantity: qty };\n    if (it.lotNumber) item.lot_number = it.lotNumber;\n    if (it.lotDate) item.lot_date = it.lotDate;\n    items.push(item);\n    lineCount += 1;\n    unitCount += qty;\n    summary.push(`${it.sku} x ${qty}`);\n  });\n  if (!b.trackingNumber) blockers.push(`Box or pallet ${i + 1} has no tracking or PRO number on the ASN.`);\n  if (items.length) boxes.push({ tracking_number: b.trackingNumber || '', box_items: items });\n});\nconst fc = centers.find((c) => String(c.id) === String(r.fulfillmentCenterId));\nif (!fc) blockers.push(`The ship-to (${r.shipTo || 'not given'}) does not match a ShipBob fulfillment center.`);\nconst due = r.expectedArrivalDate ? new Date(`${r.expectedArrivalDate}T23:59:59Z`) : null;\nif (!due || isNaN(due.getTime()) || due.getTime() < Date.now()) blockers.push(`The expected arrival date (${r.expectedArrivalDate || 'not given'}) is missing or already past.`);\nconst dup = r.poNumber ? openList.find((w) => String(w.purchase_order_number || '') === String(r.poNumber)) : null;\nif (dup) blockers.push(`PO ${r.poNumber} already has open receiving order ${dup.id} in ShipBob.`);\nif (!lineCount) blockers.push('No SKU on the ASN is set up in ShipBob.');\nconst notes = unknown.length ? [`Not set up in ShipBob: ${unknown.join(', ')}.`] : [];\nconst oneSkuPerBox = boxes.every((b) => b.box_items.length === 1);\nconst boxPackagingType = boxes.length === 1 ? 'EverythingInOneBox' : oneSkuPerBox ? 'OneSkuPerBox' : 'MultipleSkuPerBox';\nconst ready = blockers.length === 0 && unknown.length === 0;\nconst canCreate = blockers.length === 0;\nconst link = (d) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${d}`;\nconst text = `ASN for PO ${r.poNumber || '(no PO number)'} from ${sender} needs a look`;\nconst lines = [\n  `*${text}*`,\n  ...blockers.map((x) => `- ${x}`),\n  ...notes.map((x) => `- ${x}`),\n  `Lines ShipBob knows: ${summary.join(', ') || 'none'}`,\n  `Carrier: ${r.carrier || 'not given'}. Expected: ${r.expectedArrivalDate || 'not given'}. <${fileUrl}|Open the ASN>`,\n];\nconst buttons = [];\nif (canCreate) {\n  buttons.push({ type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Create without those SKUs' }, url: link('create') });\n}\nbuttons.push({ type: 'button', text: { type: 'plain_text', text: 'Set it aside' }, url: link('aside') });\nreturn {\n  ready,\n  canCreate,\n  fulfillmentCenterId: fc ? String(fc.id) : '',\n  packageType: ['Package', 'Pallet', 'FloorLoadedContainer'].includes(r.packageType) ? r.packageType : 'Package',\n  boxPackagingType,\n  expectedArrivalDate: r.expectedArrivalDate ? `${r.expectedArrivalDate}T00:00:00Z` : '',\n  poNumber: r.poNumber || '',\n  boxes,\n  unitCount,\n  replyNote: unknown.length ? `These SKUs are not set up in ShipBob yet, so they are not on the receiving order: ${unknown.join(', ')}. Please send their product details before the freight arrives.` : '',\n  text,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: buttons },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Receiving order",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the receiving order",
        "nextElementIds": [
          "A0D2D1D1-20D3-4776-B54D-EC2522204988"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1363,
            "y": 389
          }
        },
        "flowElementId": "0799ABD6-BDAC-46B2-A8B1-0737F0E81C93",
        "groupId": null,
        "id": "BB7C22B6-D2AC-438D-9ED2-7915429D6DD8",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "d405450b-2b66-4ec9-b382-21a0a3a36537",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Receiving decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "0C65F170-D8C1-493D-A33C-ABC2FE6C8985"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "create"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "d405450b-2b66-4ec9-b382-21a0a3a36537"
            ]
          },
          "elseComponent": {
            "componentId": "02D50F9C-7C31-44DC-B580-EB0CCD778900",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Create it",
          "storeResult": false,
          "thenComponent": {
            "componentId": "72C92835-8DFC-4F39-AE28-5E9012B622BE",
            "componentType": "ELEMENT"
          }
        },
        "name": "Create it?",
        "nextElementIds": [
          "02D50F9C-7C31-44DC-B580-EB0CCD778900",
          "72C92835-8DFC-4F39-AE28-5E9012B622BE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Downloads the box labels PDF of a Warehouse Receiving Order and saves it to FlowRunner file storage, returning a link to the file to email, print or attach. Get WRO Box Labels returns the raw content instead.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::getWROBoxLabelsFile",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the box labels Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::getWROBoxLabelsFile",
          "legacyElementId": "JS###v1###ShipBobService###getWROBoxLabelsFile",
          "methodName": "getWROBoxLabelsFile",
          "position": {
            "x": 953,
            "y": 940
          }
        },
        "flowElementId": "059D2D38-5895-4714-A5FB-492A8D850C48",
        "groupId": null,
        "id": "6AF69F5B-8E0A-43DC-9BFF-321EF4595642",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "wroId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New WRO",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "72C92835-8DFC-4F39-AE28-5E9012B622BE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Get the box labels', 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": "getWROBoxLabelsFile",
          "onFailElemId": "D354DE90-D6D0-4CCB-B841-38700FC1DFD0",
          "packageId": "default",
          "resultAlias": "Box labels",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the box labels",
        "nextElementIds": [
          "5E7ACCEF-47E5-4FD9-B847-1A1A3035313D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask receiving to send the labels Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 481,
            "y": 550
          }
        },
        "flowElementId": "4B26A4DB-66D4-4286-A783-765E4EE090D0",
        "groupId": null,
        "id": "B1041340-D22D-4C1C-A0B0-777F2A53DE37",
        "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": "Receiving order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New WRO",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "72C92835-8DFC-4F39-AE28-5E9012B622BE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " for PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is created, but ShipBob's box labels could not be saved: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Labels error",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D354DE90-D6D0-4CCB-B841-38700FC1DFD0"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". The sender, "
                  },
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", was told the labels follow from us. Please download them from the receiving order in ShipBob and email them in the same thread. <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "216632E1-6802-4833-9354-2D6D0AD97BD3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the ASN>"
                  }
                ],
                "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": "BASIC",
                "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": "BASIC",
                "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": "Labels request",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask receiving to send the labels",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Labels not ready Result"
          },
          "position": {
            "x": 520,
            "y": 819
          }
        },
        "flowElementId": "2A955CF5-6F43-4930-9260-19E802B8BD4B",
        "groupId": null,
        "id": "D354DE90-D6D0-4CCB-B841-38700FC1DFD0",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Labels error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "Labels not ready",
        "nextElementIds": [
          "8B8F8668-412A-4242-BEDF-31C60ABA8100"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "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": "Reply without the labels Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 508,
            "y": 680
          }
        },
        "flowElementId": "A7BDAFF1-3398-43B5-BB47-955677A05761",
        "groupId": null,
        "id": "8B8F8668-412A-4242-BEDF-31C60ABA8100",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Re: "
                  },
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "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": "Thank you for the ASN. ShipBob receiving order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New WRO",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "72C92835-8DFC-4F39-AE28-5E9012B622BE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is set up for PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "unitCount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " units, arriving at "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New WRO",
                    "subPathSegments": [
                      {
                        "key": "fulfillment_center",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "72C92835-8DFC-4F39-AE28-5E9012B622BE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " on "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "ASN reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "expectedArrivalDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D0611C0C-C3D5-49D0-9883-E108A1936864"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ".\n\nThe ShipBob box labels will follow from our receiving team. Please put one on each box or pallet before the freight ships, and show the receiving order number on the BOL so our dock can match the freight to it.\n\n"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Receiving order",
                    "subPathSegments": [
                      {
                        "key": "replyNote",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "128A84B6-833E-4A93-A0E1-028E8E238E62"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n\nReceiving team"
                  }
                ],
                "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": [
                  {
                    "id": "RESULT",
                    "label": "New ASN email",
                    "subPathSegments": [
                      {
                        "key": "threadId",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "110BAD23-BC0F-4489-8268-8A363C3FA0DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachments",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Reply without labels",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Reply without the labels",
        "nextElementIds": [
          "B1041340-D22D-4C1C-A0B0-777F2A53DE37"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "110BAD23-BC0F-4489-8268-8A363C3FA0DC",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": -90,
            "zoom": 1
          },
          "position": {
            "x": 949,
            "y": 219
          }
        },
        "flowElementId": "751119B6-C4DA-4AF2-82C4-0D635E656EAC",
        "groupId": null,
        "id": "9A055D63-2362-4F61-9E07-477CC71C2E3C",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Each SKU on the ASN', Error: Children have error",
            "valid": false
          },
          "enabled": true,
          "firstElementId": "AB42CF7F-79A6-4C49-B5CA-39A329CF3796",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "ASN reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "skus",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "D0611C0C-C3D5-49D0-9883-E108A1936864"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "loop",
          "storeResult": true
        },
        "name": "Each SKU on the ASN",
        "nextElementIds": [
          "ADD21222-84C3-4191-A5D2-DB9DDA0F785E"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "95AFC42D-5B7D-44EB-A421-8F3CEE1F45E4",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Block 'Build the receiving order' has an invalid configuration. Code Argument 'answerLink' has invalid value. Placeholder Data 'Answer link': value is required",
      "executionStaticData": [
        {
          "description": "Your Anthropic API key for the step that reads the ASN.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the receiving lead's answer. The Slack buttons open it.",
          "error": "Placeholder Data 'Answer link': value is required",
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-11-26T05:51:06.886Z"
}
