{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "D59E062A-4EE0-4C5C-A0DB-45348092BB20",
    "name": "ShipBob: retailer PO to a B2B order"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -64.05405405405405,
        "y": 2.1621621621621614,
        "zoom": 0.95
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a client emails a retailer's purchase order, reads it, checks every line against the units ShipBob can ship (fulfillable, not just on hand), and creates the B2B order with the PO number, ship-after date, carrier type, freight terms, department and mark-for store when the whole PO can ship. Short lines, unknown SKUs, missing freight terms or a passed cancel date go to the account manager in Slack, who ships what is available or holds the order.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a client emails a retailer's purchase order, reads it, checks every line against on-hand stock in ShipBob, and creates the B2B order when the whole PO can ship. Short lines, unknown SKUs or a passed cancel date go to the account manager in Slack, who ships what is on hand or holds the order.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 546,
            "y": 219
          }
        },
        "flowElementId": "134967E5-B541-4BD2-9514-B49995BCB351",
        "groupId": null,
        "id": "668E1702-7223-49E9-B2FA-4ACEC01AF2EA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "85bf8c5e-bf94-490f-b5af-4ccb7d919625",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "B2B order",
                      "subPathSegments": [
                        {
                          "key": "ready",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "85bf8c5e-bf94-490f-b5af-4ccb7d919625"
            ]
          },
          "elseComponent": {
            "componentId": "56337F05-DB70-4CEF-841C-1956D401F0CA",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "All in stock",
          "storeResult": false,
          "thenComponent": {
            "componentId": "9A6A78F6-5EFC-463B-BE75-8DDAC85C4D86",
            "componentType": "ELEMENT"
          }
        },
        "name": "Every line in stock?",
        "nextElementIds": [
          "9A6A78F6-5EFC-463B-BE75-8DDAC85C4D86",
          "56337F05-DB70-4CEF-841C-1956D401F0CA"
        ],
        "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": "Tell the account manager why Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1240,
            "y": 640
          }
        },
        "flowElementId": "D12BA787-6DE8-472A-9AA9-785DEA8E5B1F",
        "groupId": null,
        "id": "338F9A8B-A30A-49CF-BC05-84BDF38FC93A",
        "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 B2B order for "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "retailer",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Order error",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4798C785-FAFC-4501-A6EB-6304519F1E93"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "69875C3A-3A0D-420B-A2BB-6D76AC473571"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the PO>"
                  }
                ],
                "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 the account manager why",
        "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": "Confirm the order is on hold Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 868,
            "y": 510
          }
        },
        "flowElementId": "2CC636A8-185A-4C6A-A72F-ABAF0250D7FC",
        "groupId": null,
        "id": "37AB2E9E-6160-490C-8EAE-FA8647895511",
        "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": "On hold. No ShipBob order was created for PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "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 account manager",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "56337F05-DB70-4CEF-841C-1956D401F0CA"
                  }
                ],
                "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": "Hold note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the order is on hold",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends emails through Gmail for AI agents to automate customer communication.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the order to the sender Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 1234,
            "y": 380
          }
        },
        "flowElementId": "4B3BCCB0-DEA6-47CE-9595-ED93BAEDA6B2",
        "groupId": null,
        "id": "FE08ECBC-D2C8-4A3B-9741-6D46BE81958C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New PO email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Re: "
                  },
                  {
                    "id": "RESULT",
                    "label": "New PO email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "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": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "retailer",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " PO "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is in for fulfillment as ShipBob order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "9A6A78F6-5EFC-463B-BE75-8DDAC85C4D86"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "units",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " units to "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "shipToName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "state",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", shipping on or after "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "shipAfter",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ".\n\n"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "replyNote",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n\nWarehouse 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 PO email",
                    "subPathSegments": [
                      {
                        "key": "threadId",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "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": "Order confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the order to the sender",
        "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": "Ask the account manager Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 157,
            "y": 210
          }
        },
        "flowElementId": "92A58115-6A3A-4DC3-9ABC-A75D6B3A4E26",
        "groupId": null,
        "id": "56337F05-DB70-4CEF-841C-1956D401F0CA",
        "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": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "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": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "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 account manager",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the account manager",
        "nextElementIds": [
          "0A1F16D5-19A9-461D-8A7D-7966136CC6E4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": true,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Stock"
          },
          "position": {
            "x": 432,
            "y": 49
          }
        },
        "flowElementId": "A1811FE5-24DB-41DE-B4DD-09855014E500",
        "groupId": "D48C1BDD-14E0-468C-8736-58C9F3E387F0",
        "id": "0E38F986-A484-4B70-A338-8A0A445A70F4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "prev",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - Stock",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.Stock",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "Stock",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "line",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "D48C1BDD-14E0-468C-8736-58C9F3E387F0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "result",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Stock lookup",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "3583D1CF-F6F6-4FC3-9EA6-3FB9F110C442"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(prev) ? prev : [];\nconst l = line || {};\nconst want = String(l.sku || '').toLowerCase();\nconst items = (result && result.items) || [];\nconst hit = want ? items.find((i) => String(i.sku || '').toLowerCase() === want) : null;\nreturn list.concat([{\n  sku: l.sku || '',\n  description: l.description || '',\n  quantity: Number(l.quantity) || 0,\n  found: Boolean(hit),\n  fulfillable: hit ? Number(hit.total_fulfillable_quantity) || 0 : 0,\n  onHand: hit ? Number(hit.total_on_hand_quantity) || 0 : 0,\n  committed: hit ? Number(hit.total_committed_quantity) || 0 : 0,\n  name: hit ? hit.name || '' : '',\n}]);"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Stock noted",
          "retryPolicy": null,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Stock"
          },
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Note what can ship",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the purchase order Result"
          },
          "tools": {},
          "position": {
            "x": 879,
            "y": 49
          }
        },
        "flowElementId": "E94760A8-986F-4670-8AAB-CB4D12E22994",
        "groupId": null,
        "id": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3",
        "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 PO email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "mimetype",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "69875C3A-3A0D-420B-A2BB-6D76AC473571"
                  }
                ],
                "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": "PO reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read retail purchase orders that a 3PL's clients forward to the warehouse so the order can be picked and shipped to a retailer's store or distribution center. From the attached PO, reply with JSON only, with these fields:\nretailer: the retailer that issued the PO\npoNumber: the retailer's PO number\nshipToName: the store or distribution center name on the ship-to\naddress1: ship-to street address\naddress2: suite, dock or unit, or empty text\ncity: ship-to city\nstate: two-letter state or province code, or empty text\nzipCode: ship-to postal code\ncountry: two-letter country code, US when the address is in the United States\nshipWindowStart: the ship-not-before or requested ship date as YYYY-MM-DD, or empty text\ncancelDate: the cancel-if-not-shipped-by date as YYYY-MM-DD, or empty text\ncarrierType: Freight when the PO calls for LTL, truckload, pallets or a routed freight carrier; Parcel when it calls for small parcel such as UPS, FedEx or USPS; empty text if it does not say\nfreightTerms: Collect when freight is collect or routed through the retailer's routing guide, Prepaid when freight is prepaid by the vendor, ThirdParty when a third party is billed; empty text if the PO does not say\ndepartment: the retailer's department number, or empty text\nmarkForStore: the mark-for store number when the PO ships to a distribution center for a store, or empty text\nroutingNotes: carrier, routing or appointment instructions in one sentence, or empty text\nlines: one entry per PO line with sku (the vendor's own item number or vendor SKU, not the retailer's item number; empty text if the PO has none), description, and quantity in units\nNever guess a SKU, a quantity, a date or the freight terms."
              }
            ],
            "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 PO email",
                "subPathSegments": [
                  {
                    "key": "fromAddress",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSubject: "
              },
              {
                "id": "RESULT",
                "label": "New PO email",
                "subPathSegments": [
                  {
                    "key": "subject",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the purchase order",
        "nextElementIds": [
          "55996757-300A-4012-B9E5-926EB48BEDBB"
        ],
        "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 B2B order Result"
          },
          "position": {
            "x": 894,
            "y": 219
          }
        },
        "flowElementId": "FF82F395-40CC-4BFA-8143-9BAF95EA9E7B",
        "groupId": null,
        "id": "F171AA92-C569-46AF-A13E-3FF0053C595A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Build the B2B order', Error: The placeholder \"Answer link\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "reading",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "stock",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - Stock",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.Stock",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "Stock",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sender",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New PO email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO file",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "69875C3A-3A0D-420B-A2BB-6D76AC473571"
                  }
                ],
                "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 rows = Array.isArray(stock) ? stock : [];\nconst bySku = {};\nrows.forEach((x, i) => {\n  const k = x.sku ? String(x.sku).toLowerCase() : `line-${i}`;\n  if (!bySku[k]) bySku[k] = { ...x, quantity: 0 };\n  bySku[k].quantity += x.quantity;\n});\nconst lines = Object.values(bySku);\nconst unknown = lines.filter((x) => !x.found);\nconst short = lines.filter((x) => x.found && x.fulfillable < x.quantity);\nconst products = lines\n  .filter((x) => x.found && Math.min(x.quantity, x.fulfillable) > 0)\n  .map((x) => ({ reference_id: x.sku, quantity: Math.min(x.quantity, x.fulfillable), name: x.name || x.description || x.sku }));\nconst termMap = { prepaid: 'Prepaid', collect: 'Collect', thirdparty: 'ThirdParty' };\nconst paymentTerm = termMap[String(r.freightTerms || '').toLowerCase().replace(/[^a-z]/g, '')] || '';\nconst carrierType = /freight|ltl|truck|pallet/i.test(String(r.carrierType || '')) ? 'Freight' : 'Parcel';\nconst today = new Date().toISOString().slice(0, 10);\nconst start = /^\\d{4}-\\d{2}-\\d{2}$/.test(r.shipWindowStart || '') ? r.shipWindowStart : '';\nconst shipAfter = start && start > today ? start : today;\nconst blockers = [];\nif (!r.poNumber) blockers.push('The PO number is missing.');\nif (!r.address1 || !r.city || !r.country) blockers.push('The ship-to address is incomplete.');\nconst cancel = r.cancelDate ? new Date(`${r.cancelDate}T23:59:59Z`) : null;\nif (cancel && !isNaN(cancel.getTime()) && cancel.getTime() < Date.now()) blockers.push(`The cancel date ${r.cancelDate} has passed.`);\nif (!paymentTerm) blockers.push('The PO does not say whether freight is prepaid or collect.');\nif (paymentTerm === 'ThirdParty' && carrierType === 'Freight') blockers.push('ShipBob does not take third-party billing on a freight order.');\nif (!products.length) blockers.push('Nothing on the PO is available to ship in ShipBob.');\nconst partial = short.length > 0 || unknown.length > 0;\nconst ready = blockers.length === 0 && !partial;\nconst canShip = blockers.length === 0;\nconst units = products.reduce((s, p) => s + p.quantity, 0);\nconst ordered = lines.reduce((s, x) => s + x.quantity, 0);\nconst link = (d) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${d}`;\nconst text = `${r.retailer || 'Retailer'} PO ${r.poNumber || '(no PO number)'} needs a look before it goes to ShipBob`;\nconst shortText = short.map((x) => `${x.sku}: ordered ${x.quantity}, ${x.fulfillable} available to ship (${x.onHand} on hand, ${x.committed} committed to other orders)`);\nconst unknownText = unknown.map((x) => `${x.sku || x.description || 'a line with no SKU'}: not set up in ShipBob`);\nconst msg = [\n  `*${text}*`,\n  `Ship to ${r.shipToName || ''}, ${r.city || ''} ${r.state || ''}${r.markForStore ? `, mark for store ${r.markForStore}` : ''}. Ships on or after ${shipAfter}, cancel date ${r.cancelDate || 'not given'}.`,\n  `${carrierType}, freight ${paymentTerm ? paymentTerm.replace('ThirdParty', 'third party').toLowerCase() : 'terms not given'}.`,\n  r.routingNotes ? `Routing: ${r.routingNotes}` : null,\n  ...blockers.map((x) => `- ${x}`),\n  ...shortText.map((x) => `- ${x}`),\n  ...unknownText.map((x) => `- ${x}`),\n  canShip && partial ? `Shipping what is available sends ${units} of ${ordered} units.` : null,\n  `From ${sender}. <${fileUrl}|Open the PO>`,\n].filter(Boolean);\nconst buttons = [];\nif (canShip) {\n  buttons.push({ type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Ship what is available' }, url: link('ship') });\n}\nbuttons.push({ type: 'button', text: { type: 'plain_text', text: 'Hold the order' }, url: link('hold') });\nconst left = [...shortText, ...unknownText];\nreturn {\n  ready,\n  products,\n  units,\n  poNumber: r.poNumber || '',\n  shipAfter,\n  carrierType,\n  paymentTerm,\n  department: r.department || '',\n  markForStore: r.markForStore || '',\n  replyNote: left.length ? `Not shipping on this order: ${left.join('; ')}.` : 'Every line on the PO is on the order.',\n  text,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: msg.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": "B2B order",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the B2B order",
        "nextElementIds": [
          "668E1702-7223-49E9-B2FA-4ACEC01AF2EA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "Stock": "7824b20a-b441-4c57-9abb-ebbf6cdf606b"
          },
          "position": {
            "x": 1272,
            "y": 49
          }
        },
        "flowElementId": "02DE092D-F94C-4839-979A-C776AE36016C",
        "groupId": null,
        "id": "55996757-300A-4012-B9E5-926EB48BEDBB",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "Stock",
              "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 stock list",
        "nextElementIds": [],
        "nextGroupIds": [
          "D48C1BDD-14E0-468C-8736-58C9F3E387F0"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new fulfillment order in ShipBob. Supports DTC (direct-to-consumer), DropShip, and B2B order types. Products can be referenced by SKU in the products list. The order is queued for fulfillment upon creation.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::createOrder",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the B2B order in ShipBob Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::createOrder",
          "legacyElementId": "JS###v1###ShipBobService###createOrder",
          "methodName": "createOrder",
          "position": {
            "x": 853,
            "y": 380
          }
        },
        "flowElementId": "AA932BC6-9C20-4BAD-9EA1-50F686F42AA0",
        "groupId": null,
        "id": "9A6A78F6-5EFC-463B-BE75-8DDAC85C4D86",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "referenceId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shippingMethod",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "B2B ship option",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "B2B ship option"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "B2B"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recipientName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "shipToName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "address1",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "address1",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "city",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "country",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "country",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "productsJson",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "products",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "state",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "state",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "zipCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "zipCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "address2",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "address2",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "PO reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recipientEmail",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recipientPhone",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "giftMessage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "purchaseOrderNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "poNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "retailerProgramType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "SB-B2B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "doNotShipBeforeDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "shipAfter",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "carrierType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "carrierType",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "paymentTerm",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "paymentTerm",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "department",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "department",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "markForStore",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "B2B order",
                    "subPathSegments": [
                      {
                        "key": "markForStore",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "F171AA92-C569-46AF-A13E-3FF0053C595A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Create the B2B 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": "createOrder",
          "onFailElemId": "4798C785-FAFC-4501-A6EB-6304519F1E93",
          "packageId": "default",
          "resultAlias": "New order",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the B2B order in ShipBob",
        "nextElementIds": [
          "FE08ECBC-D2C8-4A3B-9741-6D46BE81958C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 538,
            "y": 389
          }
        },
        "flowElementId": "BC78FB99-87A5-474A-8007-E0F389E32D1C",
        "groupId": null,
        "id": "0138E18C-50BA-4B9B-BD4A-7336442D45BA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "3e26b549-d932-42fc-83cb-d386ee202b46",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Account manager decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "0A1F16D5-19A9-461D-8A7D-7966136CC6E4"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "ship"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "3e26b549-d932-42fc-83cb-d386ee202b46"
            ]
          },
          "elseComponent": {
            "componentId": "37AB2E9E-6160-490C-8EAE-FA8647895511",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Ship partial",
          "storeResult": false,
          "thenComponent": {
            "componentId": "9A6A78F6-5EFC-463B-BE75-8DDAC85C4D86",
            "componentType": "ELEMENT"
          }
        },
        "name": "Ship what is available?",
        "nextElementIds": [
          "9A6A78F6-5EFC-463B-BE75-8DDAC85C4D86",
          "37AB2E9E-6160-490C-8EAE-FA8647895511"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "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": 170,
            "y": 40
          }
        },
        "flowElementId": "B396489E-AFC6-4F4F-8F31-E5ACA48784AF",
        "groupId": null,
        "id": "45540F6F-E015-47FB-A1EA-4060AD22AA6F",
        "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 PO email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "has:attachment subject:(\"purchase order\" OR PO) -subject:(ASN OR \"ship notice\" OR \"packing list\" OR inbound)"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New retailer PO email",
        "nextElementIds": [
          "69875C3A-3A0D-420B-A2BB-6D76AC473571"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "ShipBob refused the order Result"
          },
          "position": {
            "x": 1252,
            "y": 519
          }
        },
        "flowElementId": "1FC97C8F-3B77-4064-8CC5-55EB8571BCD3",
        "groupId": null,
        "id": "4798C785-FAFC-4501-A6EB-6304519F1E93",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Order error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "ShipBob refused the order",
        "nextElementIds": [
          "338F9A8B-A30A-49CF-BC05-84BDF38FC93A"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "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 PO file Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "legacyElementId": "JS###v1###GmailService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 546,
            "y": 40
          }
        },
        "flowElementId": "36402E88-25FF-424B-AD0D-06568630B4EE",
        "groupId": null,
        "id": "69875C3A-3A0D-420B-A2BB-6D76AC473571",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New PO email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New PO email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New PO email",
                    "subPathSegments": [
                      {
                        "key": "attachments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "45540F6F-E015-47FB-A1EA-4060AD22AA6F"
                  }
                ],
                "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": "PO file",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the PO file",
        "nextElementIds": [
          "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 110,
            "y": 389
          }
        },
        "flowElementId": "06CE05EA-FA25-4FAE-8D34-13D5B3712DDF",
        "groupId": null,
        "id": "0A1F16D5-19A9-461D-8A7D-7966136CC6E4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Account manager decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the account manager's answer",
        "nextElementIds": [
          "0138E18C-50BA-4B9B-BD4A-7336442D45BA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves current stock levels across all fulfillment centers: on-hand, committed, fulfillable, sellable, awaiting, backordered, exception (damaged, lost or under investigation) and internal-transfer quantities. Filter by several inventory IDs at once (Get Products returns each variant's inventory ID) or search by name or SKU.",
          "elementId": "EXTENSION:::SHARED:::default:::shipbob:::getInventoryLevels",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check stock in ShipBob Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipbob:::getInventoryLevels",
          "legacyElementId": "JS###v1###ShipBobService###getInventoryLevels",
          "methodName": "getInventoryLevels",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "A39CA403-965C-4EA2-AD9A-5CD649C16F06",
        "groupId": "D48C1BDD-14E0-468C-8736-58C9F3E387F0",
        "id": "3583D1CF-F6F6-4FC3-9EA6-3FB9F110C442",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "inventoryIds",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "search",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "sku",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "D48C1BDD-14E0-468C-8736-58C9F3E387F0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "isActive",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "isDigital",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pageSize",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 50
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Check stock 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": "getInventoryLevels",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Stock lookup",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipbob",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Check stock in ShipBob",
        "nextElementIds": [
          "0E38F986-A484-4B70-A338-8A0A445A70F4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "45540F6F-E015-47FB-A1EA-4060AD22AA6F",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": 0,
            "zoom": 1
          },
          "position": {
            "x": 1272,
            "y": 219
          }
        },
        "flowElementId": "956C8725-8D90-4B2C-8501-D8B050487F8B",
        "groupId": null,
        "id": "D48C1BDD-14E0-468C-8736-58C9F3E387F0",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Each line on the PO', Error: Children have error",
            "valid": false
          },
          "enabled": true,
          "firstElementId": "3583D1CF-F6F6-4FC3-9EA6-3FB9F110C442",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "PO reading",
                "subPathSegments": [
                  {
                    "key": "output",
                    "optional": false
                  },
                  {
                    "key": "lines",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "CD6F33ED-49F5-4B10-83CB-48760E9CB4C3"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "loop",
          "storeResult": true
        },
        "name": "Each line on the PO",
        "nextElementIds": [
          "F171AA92-C569-46AF-A13E-3FF0053C595A"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "1DB76E5B-4ED3-4C09-B2FF-C74ADFB34C8F",
    "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 B2B 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 purchase order.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the account manager's answer. The Slack buttons open it.",
          "error": "Placeholder Data 'Answer link': value is required",
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The ShipBob ship option your B2B retail orders use, as named in your ShipBob ship option mapping.",
          "error": null,
          "name": "B2B ship option",
          "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:14.893Z"
}
