{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "5488C163-A7CE-4C1B-AB72-2C260CE70C2A",
    "name": "EasyPost: international order with customs"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -118.59474554234293,
        "y": -242.9717439405208,
        "zoom": 0.647970482716667
      },
      "autoSave": true,
      "descriptions": {
        "flow": "When a WooCommerce order ships to another country, builds the customs declaration from the line items and a product customs sheet, buys the cheapest label with the customs form attached, and sends the customer a note with tracking and the nearest DHL drop-off point. Orders with missing customs data go to the shipping team in Slack.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a WooCommerce order ships to another country, builds the customs declaration from the line items and a product customs sheet, buys the cheapest label with the customs form attached, and sends the customer a note with tracking and the nearest DHL drop-off point. Orders with missing customs data go to the shipping team in Slack.",
    "elements": [
      {
        "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 shipping team Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": -57.552385824092156,
            "y": 505.16400875294676
          }
        },
        "flowElementId": "B93B9A5E-B123-4DE5-AF0E-8163A579EC9F",
        "groupId": null,
        "id": "257A9E7D-76CD-4984-8E0F-DE720FABC04C",
        "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": "Order "
                  },
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "number",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " to "
                  },
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "country",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is on hold for customs: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customs lines",
                    "subPathSegments": [
                      {
                        "key": "problems",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "111CDD79-2065-4CB9-A4B4-706EB6FC618A"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". Fill in the product customs sheet and ship this order by hand."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "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": "Customs hold message",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell the shipping team",
        "nextElementIds": [],
        "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 customs lines Result"
          },
          "position": {
            "x": 388.7289305900991,
            "y": 300.39749531669025
          }
        },
        "flowElementId": "599593FC-96F7-4487-BA6D-A16394D0005A",
        "groupId": null,
        "id": "111CDD79-2065-4CB9-A4B4-706EB6FC618A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "products",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customs sheet",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "E697C3E8-923A-45DE-BA44-307EE3F0AF49"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "lineItems",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "line_items",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "currency",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "currency",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const bySku = {};\nfor (const p of products || []) {\n  if (p && p.SKU) bySku[String(p.SKU).trim()] = p;\n}\nconst items = [];\nconst problems = [];\nlet totalWeight = 0;\nfor (const line of lineItems || []) {\n  const product = bySku[String(line.sku || '').trim()];\n  if (!product) {\n    problems.push(`no customs data for ${line.sku || line.name}`);\n    continue;\n  }\n  const quantity = Number(line.quantity) || 1;\n  const weight = (Number(product.Weight) || 0) * quantity;\n  const value = Number(line.total) || 0;\n  if (!product['HS Code'] || !product.Origin || weight <= 0) {\n    problems.push(`HS code, origin or weight missing for ${line.sku}`);\n    continue;\n  }\n  if (value > 2500) {\n    problems.push(`${line.sku} is declared at ${value} ${currency}, which needs an AES filing number`);\n  }\n  totalWeight += weight;\n  items.push({\n    description: product.Description || line.name,\n    quantity,\n    weight,\n    value,\n    currency,\n    hs_tariff_number: String(product['HS Code']),\n    origin_country: String(product.Origin),\n    code: line.sku,\n  });\n}\nreturn {\n  ready: problems.length === 0 && items.length > 0,\n  problems: problems.join('; ') || (items.length ? '' : 'the order has no line items'),\n  items,\n  totalWeight,\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Customs lines",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the customs lines",
        "nextElementIds": [
          "6A563E7F-C011-4423-B0C0-32AD4A868671"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves data from Google Sheets for AI agents to analyze spreadsheet content, process existing data, or extract information for automated workflows. Perfect for reading user submissions, analyzing data trends, or importing data for further processing.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::getRows",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Look up the products' customs data Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::getRows",
          "legacyElementId": "JS###v1###GoogleSheets###getRows",
          "methodName": "getRows",
          "position": {
            "x": 671.3063313917455,
            "y": 292.2331689036082
          }
        },
        "flowElementId": "17E1D89F-C181-4607-BF27-52DCE46AD86B",
        "groupId": null,
        "id": "E697C3E8-923A-45DE-BA44-307EE3F0AF49",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "offset",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "withRowNumbers",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Look up the products' customs data', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getRows",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Customs sheet",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Look up the products' customs data",
        "nextElementIds": [
          "111CDD79-2065-4CB9-A4B4-706EB6FC618A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 700.1395730564755,
            "y": 135.63309614248638
          }
        },
        "flowElementId": "F9735383-EC05-47EF-9411-1FB348E64709",
        "groupId": null,
        "id": "D2C49290-72EF-4633-9F11-94B0F9CBA85E",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "aaf94c3c-f6bd-45ac-b079-9b8a3a92bcab",
                "nestedOperation": null,
                "operation": "notEqual",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "New order",
                      "subPathSegments": [
                        {
                          "key": "shipping",
                          "optional": false
                        },
                        {
                          "key": "country",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "ELEMENT_RESULT",
                        "label": "Ship-from",
                        "subPathSegments": [
                          {
                            "key": "country",
                            "optional": false
                          }
                        ],
                        "type": "ELEMENT_LINK",
                        "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "aaf94c3c-f6bd-45ac-b079-9b8a3a92bcab"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Ships abroad",
          "storeResult": false,
          "thenComponent": {
            "componentId": "E697C3E8-923A-45DE-BA44-307EE3F0AF49",
            "componentType": "ELEMENT"
          }
        },
        "name": "Ships to another country?",
        "nextElementIds": [
          "E697C3E8-923A-45DE-BA44-307EE3F0AF49"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 61.4168605665254,
            "y": 300.39749531669025
          }
        },
        "flowElementId": "6593C0F7-DBB7-4400-9C0F-DFEC84E4A2D4",
        "groupId": null,
        "id": "6A563E7F-C011-4423-B0C0-32AD4A868671",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "48cdb731-d593-4060-8694-9b378c6e7cb4",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Customs lines",
                      "subPathSegments": [
                        {
                          "key": "ready",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "111CDD79-2065-4CB9-A4B4-706EB6FC618A"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "48cdb731-d593-4060-8694-9b378c6e7cb4"
            ]
          },
          "elseComponent": {
            "componentId": "257A9E7D-76CD-4984-8E0F-DE720FABC04C",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Customs ready",
          "storeResult": false,
          "thenComponent": {
            "componentId": "6EE43C56-45CE-473F-B4DD-38140B770D65",
            "componentType": "ELEMENT"
          }
        },
        "name": "Customs data complete?",
        "nextElementIds": [
          "257A9E7D-76CD-4984-8E0F-DE720FABC04C",
          "6EE43C56-45CE-473F-B4DD-38140B770D65"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a customs declaration (with its line items) required for international shipments. Attach the returned ID when creating a shipment that crosses a border.",
          "elementId": "EXTENSION:::SHARED:::default:::easypost:::createCustomsInfo",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "contentsType": {
              "merchandise": "Merchandise"
            },
            "restrictionType": {
              "none": "None"
            },
            "nonDeliveryOption": {
              "return": "Return to Sender"
            }
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the customs declaration Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::easypost:::createCustomsInfo",
          "legacyElementId": "JS###v1###EasyPost###createCustomsInfo",
          "methodName": "createCustomsInfo",
          "position": {
            "x": 292.7722139142858,
            "y": 499.97038774587463
          }
        },
        "flowElementId": "E0103DCF-0318-4A05-B363-B6C3728852CE",
        "groupId": null,
        "id": "6EE43C56-45CE-473F-B4DD-38140B770D65",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "contentsType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "merchandise"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customsSigner",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Customs signer",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Customs signer"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customsCertify",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "eelPfc",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "NOEEI 30.37(a)"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "restrictionType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "none"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customsItems",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customs lines",
                    "subPathSegments": [
                      {
                        "key": "items",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "111CDD79-2065-4CB9-A4B4-706EB6FC618A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contentsExplanation",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "nonDeliveryOption",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "return"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "restrictionComments",
              "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": "createCustomsInfo",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Customs declaration",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "easypost",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the customs declaration",
        "nextElementIds": [
          "36313B33-38F6-46AC-A7B7-6ACAAB720C10"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Fires when a new order is placed in the store. Use to kick off fulfillment, send confirmations, or sync the sale to another system in real time.",
          "elementId": "EXTENSION:::SHARED:::default:::woocommerce:::onOrderCreated",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::onOrderCreated",
          "legacyElementId": "JS###v1###WooCommerce###onOrderCreated",
          "methodName": "onOrderCreated",
          "position": {
            "x": 84.08775774456262,
            "y": 126.62014231450814
          }
        },
        "flowElementId": "678581BF-8EFA-45E6-B731-A01CD6222302",
        "groupId": null,
        "id": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onOrderCreated",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New order",
          "scope": "SINGLE_APP",
          "serviceId": "woocommerce",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "New order in WooCommerce",
        "nextElementIds": [
          "A7CEE620-46EE-45A3-8732-3B6CF6403925"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves the details of a specific saved address by its ID.",
          "elementId": "EXTENSION:::SHARED:::default:::easypost:::getAddress",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Load the ship-from address Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::easypost:::getAddress",
          "legacyElementId": "JS###v1###EasyPost###getAddress",
          "methodName": "getAddress",
          "position": {
            "x": 400,
            "y": 130
          }
        },
        "flowElementId": "8F3E9A60-B4C0-473F-85FF-DB3643A17486",
        "groupId": null,
        "id": "A7CEE620-46EE-45A3-8732-3B6CF6403925",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "addressId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Ship-from address ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Ship-from address ID"
                  }
                ],
                "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": "getAddress",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Ship-from",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "easypost",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Load the ship-from address",
        "nextElementIds": [
          "D2C49290-72EF-4633-9F11-94B0F9CBA85E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Adds a note to an order. Mark it as a customer note to email it to the buyer, or leave it private for staff. Use for fulfillment updates or internal remarks.",
          "elementId": "EXTENSION:::SHARED:::default:::woocommerce:::createOrderNote",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the customer the tracking number Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::createOrderNote",
          "legacyElementId": "JS###v1###WooCommerce###createOrderNote",
          "methodName": "createOrderNote",
          "position": {
            "x": 748.6845248054226,
            "y": 971.577445253701
          }
        },
        "flowElementId": "CEEB55BF-40F2-4E53-8A93-0CCB2822EF23",
        "groupId": null,
        "id": "E84A9D5F-AEE8-443C-B871-18F0EDDA3B97",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "note",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customer note",
                    "subPathSegments": [
                      {
                        "key": "note",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "90D11B8C-4121-4432-A376-CAD69DB5B48F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerNote",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "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": "createOrderNote",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Order note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "woocommerce",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the customer the tracking number",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the customer note Result"
          },
          "position": {
            "x": 795.1196029682702,
            "y": 840.3986303736916
          }
        },
        "flowElementId": "F0783B3B-59A6-41CC-8783-81669893FFDE",
        "groupId": null,
        "id": "90D11B8C-4121-4432-A376-CAD69DB5B48F",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "carrier",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "carrier",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "00A5FE18-8C41-47FB-A8E2-5498F93493C0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "service",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "service",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "00A5FE18-8C41-47FB-A8E2-5498F93493C0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "trackingCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Label",
                    "subPathSegments": [
                      {
                        "key": "tracking_code",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "28C3DF63-CC7C-42E8-82C8-041731663D80"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "locations",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "DHL points",
                    "subPathSegments": [
                      {
                        "key": "locations",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E5D15CB3-19E2-4384-BE47-AA831CF04B9B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(locations) ? locations : [];\nconst point = list.find(l => (l.serviceTypes || []).includes('parcel:drop-off')) || list[0];\nconst lines = [`Your order is on its way with ${carrier} ${service}. Tracking number: ${trackingCode}.`];\nif (point) {\n  const a = (point.place && point.place.address) || {};\n  const where = [a.streetAddress, a.postalCode, a.addressLocality].filter(Boolean).join(', ');\n  lines.push(`If you ever need to send something back, your nearest DHL drop-off point is ${point.name}${where ? `, ${where}` : ''}.`);\n}\nreturn { note: lines.join('\\n') };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Customer note",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the customer note",
        "nextElementIds": [
          "E84A9D5F-AEE8-443C-B871-18F0EDDA3B97"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the cheapest rate Result"
          },
          "position": {
            "x": 928.3303002164075,
            "y": 501.5136679209336
          }
        },
        "flowElementId": "7633F414-D199-41E5-B67E-F716FE34F9E5",
        "groupId": null,
        "id": "00A5FE18-8C41-47FB-A8E2-5498F93493C0",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "rates",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "rates",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36313B33-38F6-46AC-A7B7-6ACAAB720C10"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const priced = (rates || []).filter(r => r && r.id && !isNaN(parseFloat(r.rate)));\nif (!priced.length) {\n  throw new Error('EasyPost returned no rates for this shipment. Check the address, the weight and the carriers on your EasyPost account.');\n}\npriced.sort((a, b) => parseFloat(a.rate) - parseFloat(b.rate));\nconst best = priced[0];\nreturn { id: best.id, carrier: best.carrier, service: best.service, rate: best.rate, deliveryDays: best.delivery_days };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Cheapest rate",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the cheapest rate",
        "nextElementIds": [
          "28C3DF63-CC7C-42E8-82C8-041731663D80"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new shipment with inline from/to addresses and parcel details. Returns the shipment with available carrier rates for purchasing.",
          "elementId": "EXTENSION:::SHARED:::default:::easypost:::createShipment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get rates Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::easypost:::createShipment",
          "legacyElementId": "JS###v1###EasyPost###createShipment",
          "methodName": "createShipment",
          "position": {
            "x": 664.5660631924095,
            "y": 506.14350844611033
          }
        },
        "flowElementId": "089894C5-15A2-4E85-8E64-282B934E516E",
        "groupId": null,
        "id": "36313B33-38F6-46AC-A7B7-6ACAAB720C10",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "fromName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ship-from",
                    "subPathSegments": [
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fromStreet1",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ship-from",
                    "subPathSegments": [
                      {
                        "key": "street1",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fromCity",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ship-from",
                    "subPathSegments": [
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fromState",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ship-from",
                    "subPathSegments": [
                      {
                        "key": "state",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fromZip",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ship-from",
                    "subPathSegments": [
                      {
                        "key": "zip",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fromCountry",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Ship-from",
                    "subPathSegments": [
                      {
                        "key": "country",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A7CEE620-46EE-45A3-8732-3B6CF6403925"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "toName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "first_name",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " "
                  },
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "last_name",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "toStreet1",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "address_1",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "toCity",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "toState",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "state",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "toZip",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "postcode",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "toCountry",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "country",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customs lines",
                    "subPathSegments": [
                      {
                        "key": "totalWeight",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "111CDD79-2065-4CB9-A4B4-706EB6FC618A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "length",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "width",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "height",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "predefinedPackage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "labelFormat",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "carrierAccountId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customsInfoId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customs declaration",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6EE43C56-45CE-473F-B4DD-38140B770D65"
                  }
                ],
                "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": "createShipment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Shipment",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "easypost",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get rates",
        "nextElementIds": [
          "00A5FE18-8C41-47FB-A8E2-5498F93493C0"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "No DHL point found Result"
          },
          "position": {
            "x": 377.0273484383787,
            "y": 839.8462382513437
          }
        },
        "flowElementId": "BF6E75F4-5AC2-4C12-A412-49541B76555D",
        "groupId": null,
        "id": "A11E43F6-1704-44D4-B027-89AAD5809DCA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "DHL lookup error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "No DHL point found",
        "nextElementIds": [
          "90D11B8C-4121-4432-A376-CAD69DB5B48F"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "notes": "Purchases a shipping label for a shipment at the selected rate. This is the primary method for buying postage.",
          "elementId": "EXTENSION:::SHARED:::default:::easypost:::buyShipment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Buy the label Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::easypost:::buyShipment",
          "legacyElementId": "JS###v1###EasyPost###buyShipment",
          "methodName": "buyShipment",
          "position": {
            "x": 933.2092878742694,
            "y": 635.7790431510608
          }
        },
        "flowElementId": "96A3670B-6C5A-4879-8F41-37592FB142EE",
        "groupId": null,
        "id": "28C3DF63-CC7C-42E8-82C8-041731663D80",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "shipmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36313B33-38F6-46AC-A7B7-6ACAAB720C10"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "00A5FE18-8C41-47FB-A8E2-5498F93493C0"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "insurance",
              "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": "buyShipment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Label",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "easypost",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Buy the label",
        "nextElementIds": [
          "E5D15CB3-19E2-4384-BE47-AA831CF04B9B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Finds DHL service points, post offices, parcel lockers, and other locations near a postal address using the Location Finder API. Provide a country code and any combination of city, postal code, and street. Returns a locations array where each entry includes the location id, name, type, full address, geo-coordinates, distance, opening hours, and supported service types. Requires the API key to be subscribed to the \"Location Finder\" product in the DHL Developer Portal.",
          "elementId": "EXTENSION:::SHARED:::default:::dhl:::findLocationsByAddress",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the nearest DHL drop-off point Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dhl:::findLocationsByAddress",
          "legacyElementId": "JS###v1###DHLService###findLocationsByAddress",
          "methodName": "findLocationsByAddress",
          "position": {
            "x": 557.8626224019866,
            "y": 631.149202625884
          }
        },
        "flowElementId": "3C5E8DCF-2C53-4B76-9335-1C52862E9966",
        "groupId": null,
        "id": "E5D15CB3-19E2-4384-BE47-AA831CF04B9B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "countryCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "country",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "addressLocality",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "postalCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "postcode",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "streetAddress",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "address_1",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "providerType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "locationType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "radius",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 5
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "findLocationsByAddress",
          "onFailElemId": "A11E43F6-1704-44D4-B027-89AAD5809DCA",
          "packageId": "default",
          "resultAlias": "DHL points",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dhl",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the nearest DHL drop-off point",
        "nextElementIds": [
          "90D11B8C-4121-4432-A376-CAD69DB5B48F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "96F94910-DC1B-4A65-A7D4-0D1749D2A66E",
    "groups": [],
    "id": "923AD058-0F59-4DE2-90E0-2D1443817567",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
      "executionStaticData": [
        {
          "description": "The EasyPost ID of the address you ship from (starts with adr_). Save your warehouse address in EasyPost once and paste its ID here.",
          "error": null,
          "name": "Ship-from address ID",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The full name of the person who certifies your customs declarations.",
          "error": null,
          "name": "Customs signer",
          "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-17T05:54:23.657Z"
}
