{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "B310B2B0-9283-4031-94DD-A7D796477451",
    "name": "Shippo: international order with customs"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -67.68261537488229,
        "y": -174.04125502690886,
        "zoom": 0.6524774738444797
      },
      "autoSave": true,
      "descriptions": {
        "flow": "When a WooCommerce order ships abroad, builds the Shippo customs declaration from the order lines, buys the cheapest label that arrives in time, and sends the customer tracking, with the nearest DHL service point when DHL carries it.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a WooCommerce order ships abroad, builds the Shippo customs declaration from the order lines, buys the cheapest label that arrives in time, and sends the customer tracking, with the nearest DHL service point when DHL carries it.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Retrieves a single product by ID, including price, stock, and category data. Pick the product from the dropdown instead of pasting an ID.",
          "elementId": "EXTENSION:::SHARED:::default:::woocommerce:::getProduct",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the product Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::getProduct",
          "legacyElementId": "JS###v1###WooCommerce###getProduct",
          "methodName": "getProduct",
          "position": {
            "x": 110,
            "y": 50
          }
        },
        "flowElementId": "A0FBD5B1-DDFF-4649-BB06-D5C157121E26",
        "groupId": "00452C25-857D-427B-B09C-FA0CF4B5B67E",
        "id": "7503B2A7-ABBD-4A60-A5F2-57877FE88809",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "productId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "product_id",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "00452C25-857D-427B-B09C-FA0CF4B5B67E"
                  }
                ],
                "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": "getProduct",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Product",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "woocommerce",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the product",
        "nextElementIds": [
          "1AA626A5-B7AA-474F-A07B-135BD01575E3"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": true,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Customs"
          },
          "position": {
            "x": 690,
            "y": 50
          }
        },
        "flowElementId": "B08B76A3-50AD-4686-BC70-166B45263A58",
        "groupId": "00452C25-857D-427B-B09C-FA0CF4B5B67E",
        "id": "8DEAD555-F3F4-4B96-9C67-BD0D5798AD63",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "customs",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - Customs",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.Customs",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "Customs",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "itemId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Customs line",
                    "subPathSegments": [
                      {
                        "key": "object_id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1AA626A5-B7AA-474F-A07B-135BD01575E3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Product",
                    "subPathSegments": [
                      {
                        "key": "weight",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7503B2A7-ABBD-4A60-A5F2-57877FE88809"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "quantity",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "quantity",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "00452C25-857D-427B-B09C-FA0CF4B5B67E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const c = typeof customs === 'string' ? JSON.parse(customs) : (customs || {});\nconst items = Array.isArray(c.items) ? c.items : [];\nconst lineWeight = (parseFloat(weight) || 0) * (Number(quantity) || 1);\nreturn { items: [...items, itemId], weight: (Number(c.weight) || 0) + lineWeight };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Declaration so far",
          "retryPolicy": null,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Customs"
          },
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Add it to the declaration",
        "nextElementIds": [],
        "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": 74.63651691169309,
            "y": 373.3786662473784
          }
        },
        "flowElementId": "C819C874-02B7-497D-95BD-9043C8363570",
        "groupId": null,
        "id": "E830F888-A0F5-4AEF-A3F6-01297128946C",
        "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": "38B2FF8E-B78A-4F18-B61C-A3232EF3EF7D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxDays",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Most days in transit",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Most days in transit"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(rates) ? rates : [];\nconst limit = Number(maxDays);\nconst fits = list.filter(r => r.estimated_days != null && Number(r.estimated_days) <= limit);\nfits.sort((a, b) => Number(a.amount) - Number(b.amount));\nconst best = fits[0];\nif (!best) return { found: false, ratesChecked: list.length };\nreturn {\n  found: true,\n  rateId: best.object_id,\n  carrier: best.provider,\n  service: (best.servicelevel && best.servicelevel.name) || best.servicelevel_name || '',\n  amount: best.amount,\n  currency: best.currency,\n  days: Number(best.estimated_days),\n  ratesChecked: list.length,\n};"
              }
            ],
            "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": [
          "3937F17F-5474-4225-876C-5641975278E4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 904.706938527688,
            "y": 808.3893668442618
          }
        },
        "flowElementId": "A6D8B452-8249-4036-A1E8-EB81DF1F6B35",
        "groupId": null,
        "id": "9107B5AB-D33F-4A14-B047-457B3175085D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "70379644-2ae6-4169-9989-00741ddbe24b",
                "nestedOperation": null,
                "operation": "contains",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Cheapest rate",
                      "subPathSegments": [
                        {
                          "key": "carrier",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "DHL"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "70379644-2ae6-4169-9989-00741ddbe24b"
            ]
          },
          "elseComponent": {
            "componentId": "8C7FB40D-7847-450F-B09D-CA93803B46F0",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "DHL check",
          "storeResult": false,
          "thenComponent": {
            "componentId": "1694DD91-4538-420D-8C1D-7E8F404F7B56",
            "componentType": "ELEMENT"
          }
        },
        "name": "Shipping with DHL?",
        "nextElementIds": [
          "8C7FB40D-7847-450F-B09D-CA93803B46F0",
          "1694DD91-4538-420D-8C1D-7E8F404F7B56"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "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 service point Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dhl:::findLocationsByAddress",
          "legacyElementId": "JS###v1###DHLService###findLocationsByAddress",
          "methodName": "findLocationsByAddress",
          "position": {
            "x": 635.3006530518478,
            "y": 975.9454606764676
          }
        },
        "flowElementId": "B6E3B55F-598E-4749-9D49-D1C629C637B4",
        "groupId": null,
        "id": "1694DD91-4538-420D-8C1D-7E8F404F7B56",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "countryCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "country",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "addressLocality",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "postalCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "postcode",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "streetAddress",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "shipping",
                        "optional": false
                      },
                      {
                        "key": "address_1",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "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": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 10000
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 1
                  }
                ],
                "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": "CF36A9BD-E10D-4369-872E-0325746E3ABF",
          "packageId": "default",
          "resultAlias": "Service point",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dhl",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the nearest DHL service point",
        "nextElementIds": [
          "8C7FB40D-7847-450F-B09D-CA93803B46F0"
        ],
        "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 tracking to the customer Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::createOrderNote",
          "legacyElementId": "JS###v1###WooCommerce###createOrderNote",
          "methodName": "createOrderNote",
          "position": {
            "x": 1195.7114210898762,
            "y": 1125.6416986072725
          }
        },
        "flowElementId": "10A9F9EC-64F9-4D53-BCDD-8EB1E1183B56",
        "groupId": null,
        "id": "64534971-A9C6-4FE5-9E85-42A69442225B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "note",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipping note",
                    "subPathSegments": [
                      {
                        "key": "note",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8C7FB40D-7847-450F-B09D-CA93803B46F0"
                  }
                ],
                "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": "Tracking note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "woocommerce",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send tracking to the customer",
        "nextElementIds": [],
        "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": "Save the label and customs papers Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::createOrderNote",
          "legacyElementId": "JS###v1###WooCommerce###createOrderNote",
          "methodName": "createOrderNote",
          "position": {
            "x": 480.5874964894648,
            "y": 795.926132160933
          }
        },
        "flowElementId": "8719A42E-57A1-4041-A672-21A94C267441",
        "groupId": null,
        "id": "A0D3B353-C8A1-4175-BE29-6E9335EDA9BD",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "note",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Shippo label bought with customs: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "carrier",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "service",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " for "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "amount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "currency",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", cheapest of "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "ratesChecked",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " rates. Tracking number "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Label",
                    "subPathSegments": [
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". Print the label: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Label",
                    "subPathSegments": [
                      {
                        "key": "label_url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " Commercial invoice, if the carrier issued one: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Label",
                    "subPathSegments": [
                      {
                        "key": "commercial_invoice_url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerNote",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "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": "Label note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "woocommerce",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the label and customs papers",
        "nextElementIds": [
          "9107B5AB-D33F-4A14-B047-457B3175085D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 419.8964580076947,
            "y": 234.59149030946804
          }
        },
        "flowElementId": "F558DC9A-DAA4-4D6B-BA1D-CCC2A0A58318",
        "groupId": null,
        "id": "884279B4-A993-4667-9669-36BC75305C0A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "695c544f-b755-45a9-b1f3-d556cf3d79f9",
                "nestedOperation": null,
                "operation": "notEqual",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Order",
                      "subPathSegments": [
                        {
                          "key": "shipping",
                          "optional": false
                        },
                        {
                          "key": "country",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Home country",
                        "subPathSegments": null,
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Home country"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "695c544f-b755-45a9-b1f3-d556cf3d79f9"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Abroad check",
          "storeResult": false,
          "thenComponent": {
            "componentId": "4660DBD9-484E-456A-AB58-562ADA2B5450",
            "componentType": "ELEMENT"
          }
        },
        "name": "Ships to another country?",
        "nextElementIds": [
          "4660DBD9-484E-456A-AB58-562ADA2B5450"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Build the parcel Result"
          },
          "position": {
            "x": 774,
            "y": 384
          }
        },
        "flowElementId": "BC3C891D-3C47-459E-BB6F-F7F5D6446857",
        "groupId": null,
        "id": "3BB5BD2B-B096-4332-B8F4-3ABC415EACDC",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "box",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Box",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Box"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "itemsWeight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - Customs",
                    "subPathSegments": [
                      {
                        "key": "weight",
                        "optional": false
                      }
                    ],
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.Customs",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "Customs",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const b = typeof box === 'string' ? JSON.parse(box) : box;\nconst massUnit = String(b.weight_unit || 'lb').toLowerCase().replace(/s$/, '');\nconst weight = (Number(itemsWeight) || 0) + (Number(b.empty_box_weight) || 0);\nreturn {\n  weight,\n  parcels: [{\n    length: String(b.length),\n    width: String(b.width),\n    height: String(b.height),\n    distance_unit: b.distance_unit || 'in',\n    weight: String(Math.round(weight * 100) / 100),\n    mass_unit: massUnit,\n  }],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Parcel",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the parcel",
        "nextElementIds": [
          "38B2FF8E-B78A-4F18-B61C-A3232EF3EF7D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a shipment from existing addresses and parcels (or inline address/parcel objects) and triggers Shippo to fetch live rates from your connected carriers. Pass async=true to defer rate fetching for large shipments.",
          "elementId": "EXTENSION:::SHARED:::default:::shippo:::createShipment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the shipment with customs Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shippo:::createShipment",
          "legacyElementId": "JS###v1###Shippo###createShipment",
          "methodName": "createShipment",
          "position": {
            "x": 379.29306147231205,
            "y": 371.8460462871706
          }
        },
        "flowElementId": "D4DDA34D-A502-4E16-96CE-55EE5A3DEDCB",
        "groupId": null,
        "id": "38B2FF8E-B78A-4F18-B61C-A3232EF3EF7D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "parcels",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Parcel",
                    "subPathSegments": [
                      {
                        "key": "parcels",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "3BB5BD2B-B096-4332-B8F4-3ABC415EACDC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customsDeclaration",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Declaration",
                    "subPathSegments": [
                      {
                        "key": "object_id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B4631769-A41E-4A63-A8F9-C75B0D626FD9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "async",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "addressFrom",
              "type": "OBJECT",
              "value": [
                {
                  "name": "name",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "name",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "company",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "company",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "street1",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "street1",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "street2",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "street2",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "city",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "city",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "state",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "state",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "zip",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "zip",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "country",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "country",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "phone",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "phone",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "email",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "PLACEHOLDER_DATA",
                        "label": "Ship-from address",
                        "subPathSegments": [
                          {
                            "key": "email",
                            "optional": false
                          }
                        ],
                        "type": "EXECUTION_CONTEXT_STATIC_DATA",
                        "value": "Ship-from address"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                }
              ]
            },
            {
              "name": "addressTo",
              "type": "OBJECT",
              "value": [
                {
                  "name": "name",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "first_name",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      },
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": " "
                      },
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "last_name",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "company",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "company",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "street1",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "address_1",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "street2",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "address_2",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "city",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "city",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "state",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "state",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "zip",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "postcode",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "country",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "shipping",
                            "optional": false
                          },
                          {
                            "key": "country",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "phone",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "billing",
                            "optional": false
                          },
                          {
                            "key": "phone",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "email",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [
                      {
                        "id": "RESULT",
                        "label": "Order",
                        "subPathSegments": [
                          {
                            "key": "billing",
                            "optional": false
                          },
                          {
                            "key": "email",
                            "optional": false
                          }
                        ],
                        "type": "TRIGGER_DATA",
                        "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                      }
                    ],
                    "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": "shippo",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the shipment with customs",
        "nextElementIds": [
          "E830F888-A0F5-4AEF-A3F6-01297128946C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 68.84086459159144,
            "y": 529.705902188572
          }
        },
        "flowElementId": "2A1F356B-2A35-467B-A0BE-2276919E4B83",
        "groupId": null,
        "id": "3937F17F-5474-4225-876C-5641975278E4",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "a2496849-0e1f-4eb7-9185-c7c6eb437cff",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Cheapest rate",
                      "subPathSegments": [
                        {
                          "key": "found",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "a2496849-0e1f-4eb7-9185-c7c6eb437cff"
            ]
          },
          "elseComponent": {
            "componentId": "5B8918C4-D8A7-4C26-B93A-710E10EE4CEE",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Rate found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D",
            "componentType": "ELEMENT"
          }
        },
        "name": "Rate that arrives in time?",
        "nextElementIds": [
          "5B8918C4-D8A7-4C26-B93A-710E10EE4CEE",
          "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a customs declaration grouping previously created customs items into a complete document attachable to international shipments.",
          "elementId": "EXTENSION:::SHARED:::default:::shippo:::createCustomsDeclaration",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the customs declaration Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shippo:::createCustomsDeclaration",
          "legacyElementId": "JS###v1###Shippo###createCustomsDeclaration",
          "methodName": "createCustomsDeclaration",
          "position": {
            "x": 1037.392092461961,
            "y": 367.75532523596564
          }
        },
        "flowElementId": "65C5E2EB-9F2B-49F8-A1E9-52FA9ABA4718",
        "groupId": null,
        "id": "B4631769-A41E-4A63-A8F9-C75B0D626FD9",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "contentsType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "MERCHANDISE"
                  }
                ],
                "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": "certify",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "certifySigner",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Ship-from address",
                    "subPathSegments": [
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Ship-from address"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "items",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - Customs",
                    "subPathSegments": [
                      {
                        "key": "items",
                        "optional": false
                      }
                    ],
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.Customs",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "Customs",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "incoterm",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "DDU"
                  }
                ],
                "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": "b13aFilingOption",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "b13aNumber",
              "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": "createCustomsDeclaration",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Declaration",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shippo",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the customs declaration",
        "nextElementIds": [
          "3BB5BD2B-B096-4332-B8F4-3ABC415EACDC"
        ],
        "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's note Result"
          },
          "position": {
            "x": 1095.7562961556407,
            "y": 983.1080423079487
          }
        },
        "flowElementId": "85EA1149-1EF1-49A5-BA82-8F8A9B3F7199",
        "groupId": null,
        "id": "8C7FB40D-7847-450F-B09D-CA93803B46F0",
        "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": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "trackingNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Label",
                    "subPathSegments": [
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "trackingUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Label",
                    "subPathSegments": [
                      {
                        "key": "tracking_url_provider",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "locations",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Service point",
                    "subPathSegments": [
                      {
                        "key": "locations",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1694DD91-4538-420D-8C1D-7E8F404F7B56"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const lines = [`Your order is on its way with ${carrier}. Tracking number ${trackingNumber}. Track it here: ${trackingUrl}`];\nconst spot = Array.isArray(locations) ? locations[0] : null;\nif (spot && spot.place && spot.place.address) {\n  const a = spot.place.address;\n  const where = [a.streetAddress, a.postalCode, a.addressLocality].filter(Boolean).join(', ');\n  lines.push(`If you miss the delivery, your nearest DHL service point is ${spot.name}, ${where}.`);\n}\nreturn { note: lines.join('\\n\\n') };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Shipping note",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the customer's note",
        "nextElementIds": [
          "64534971-A9C6-4FE5-9E85-42A69442225B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "Customs": "650b5fd7-4d55-40df-9951-6ed04fe47598"
          },
          "position": {
            "x": 786.4722530680708,
            "y": 239.1851038093211
          }
        },
        "flowElementId": "B26B2D0A-085A-4DCC-9E4C-FC3F69E5AEEC",
        "groupId": null,
        "id": "4660DBD9-484E-456A-AB58-562ADA2B5450",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "Customs",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "JSON",
                    "label": null,
                    "parsedValue": {
                      "items": [],
                      "weight": 0
                    },
                    "type": "INPUT",
                    "value": "{\"items\":[],\"weight\":0}"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "d1",
          "storeResult": true
        },
        "name": "Start an empty declaration",
        "nextElementIds": [],
        "nextGroupIds": [
          "00452C25-857D-427B-B09C-FA0CF4B5B67E"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "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": 110,
            "y": 230
          }
        },
        "flowElementId": "F2AE760F-6E71-4ABB-9CAC-C4BDFA6094C7",
        "groupId": null,
        "id": "5B5E3925-81B4-48F0-857B-88FC39E39BBF",
        "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": "Order",
          "scope": "SINGLE_APP",
          "serviceId": "woocommerce",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "New WooCommerce order",
        "nextElementIds": [
          "884279B4-A993-4667-9669-36BC75305C0A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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": "Flag the order for a manual label Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::createOrderNote",
          "legacyElementId": "JS###v1###WooCommerce###createOrderNote",
          "methodName": "createOrderNote",
          "position": {
            "x": 506.64203581299705,
            "y": 605.9123225467022
          }
        },
        "flowElementId": "5C75E09D-00C2-4732-BAA8-1EE4DCAA0B26",
        "groupId": null,
        "id": "5B8918C4-D8A7-4C26-B93A-710E10EE4CEE",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "note",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "No Shippo label was bought for this international order. Either no carrier rate arrives within "
                  },
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Most days in transit",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Most days in transit"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " days or Shippo turned the purchase down. The customs declaration is ready in Shippo ("
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Declaration",
                    "subPathSegments": [
                      {
                        "key": "object_id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B4631769-A41E-4A63-A8F9-C75B0D626FD9"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "); buy the label by hand."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerNote",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "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": "Manual label note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "woocommerce",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Flag the order for a manual label",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Purchases a shipping label from a previously calculated rate. Returns a transaction containing the label_url, tracking_number and tracking_url_provider when status is SUCCESS.",
          "elementId": "EXTENSION:::SHARED:::default:::shippo:::createTransaction",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Buy the label Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shippo:::createTransaction",
          "legacyElementId": "JS###v1###Shippo###createTransaction",
          "methodName": "createTransaction",
          "position": {
            "x": 26.262333226502875,
            "y": 697.2619960207782
          }
        },
        "flowElementId": "37FB2FBE-40AD-480E-B9AA-13DD22CEEC04",
        "groupId": null,
        "id": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "rateId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Cheapest rate",
                    "subPathSegments": [
                      {
                        "key": "rateId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E830F888-A0F5-4AEF-A3F6-01297128946C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "labelFileType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "metadata",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "async",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "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": "createTransaction",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Label",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shippo",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Buy the label",
        "nextElementIds": [
          "D1FDB545-8829-408C-A8C9-4B906F276C06"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "No service point found Result"
          },
          "position": {
            "x": 870.1263344843676,
            "y": 1150.1636179705965
          }
        },
        "flowElementId": "D75C2488-8277-4022-844B-57401FB3CF16",
        "groupId": null,
        "id": "CF36A9BD-E10D-4369-872E-0325746E3ABF",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Service point error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "No service point found",
        "nextElementIds": [
          "8C7FB40D-7847-450F-B09D-CA93803B46F0"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 41.92336034931003,
            "y": 813.7411129965695
          }
        },
        "flowElementId": "4A77D285-BB39-40B8-9C3A-9E1FE821D7EC",
        "groupId": null,
        "id": "D1FDB545-8829-408C-A8C9-4B906F276C06",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "aae752de-7f65-471d-b51f-0ef60bdabc46",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Label",
                      "subPathSegments": [
                        {
                          "key": "status",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "4AC4C2BD-8BD3-4D75-AC5E-354AB794130D"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "SUCCESS"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "aae752de-7f65-471d-b51f-0ef60bdabc46"
            ]
          },
          "elseComponent": {
            "componentId": "5B8918C4-D8A7-4C26-B93A-710E10EE4CEE",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Label ok",
          "storeResult": false,
          "thenComponent": {
            "componentId": "A0D3B353-C8A1-4175-BE29-6E9335EDA9BD",
            "componentType": "ELEMENT"
          }
        },
        "name": "Label bought?",
        "nextElementIds": [
          "A0D3B353-C8A1-4175-BE29-6E9335EDA9BD",
          "5B8918C4-D8A7-4C26-B93A-710E10EE4CEE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a customs item describing a single line of an international customs declaration.",
          "elementId": "EXTENSION:::SHARED:::default:::shippo:::createCustomsItem",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the customs item Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shippo:::createCustomsItem",
          "legacyElementId": "JS###v1###Shippo###createCustomsItem",
          "methodName": "createCustomsItem",
          "position": {
            "x": 400,
            "y": 50
          }
        },
        "flowElementId": "6C1122BF-7013-424D-9A5E-579BA1511863",
        "groupId": "00452C25-857D-427B-B09C-FA0CF4B5B67E",
        "id": "1AA626A5-B7AA-474F-A07B-135BD01575E3",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "description",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "00452C25-857D-427B-B09C-FA0CF4B5B67E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "quantity",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "quantity",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "00452C25-857D-427B-B09C-FA0CF4B5B67E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "netWeight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Product",
                    "subPathSegments": [
                      {
                        "key": "weight",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "7503B2A7-ABBD-4A60-A5F2-57877FE88809"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "massUnit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Box",
                    "subPathSegments": [
                      {
                        "key": "weight_unit",
                        "optional": false
                      }
                    ],
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Box"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "valueAmount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "price",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "00452C25-857D-427B-B09C-FA0CF4B5B67E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "valueCurrency",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "currency",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "originCountry",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Country of origin",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Country of origin"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tariffNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "skuCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "sku",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "00452C25-857D-427B-B09C-FA0CF4B5B67E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "hsCode",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "metadata",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Order",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
                  }
                ],
                "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": "createCustomsItem",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Customs line",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shippo",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the customs item",
        "nextElementIds": [
          "8DEAD555-F3F4-4B96-9C67-BD0D5798AD63"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "5B5E3925-81B4-48F0-857B-88FC39E39BBF",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": 0,
            "y": 0,
            "zoom": 0.8
          },
          "position": {
            "x": 1074.9375099174779,
            "y": 239.1872269997063
          }
        },
        "flowElementId": "00FF07A0-0BA2-4BEC-B769-E709A835EB25",
        "groupId": null,
        "id": "00452C25-857D-427B-B09C-FA0CF4B5B67E",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "7503B2A7-ABBD-4A60-A5F2-57877FE88809",
          "list": {
            "expression": [
              {
                "id": "RESULT",
                "label": "Order",
                "subPathSegments": [
                  {
                    "key": "line_items",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "5B5E3925-81B4-48F0-857B-88FC39E39BBF"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "l1",
          "storeResult": true
        },
        "name": "Declare each item",
        "nextElementIds": [
          "B4631769-A41E-4A63-A8F9-C75B0D626FD9"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "C53EC38F-EE0F-4049-B165-FB92BA8CCE81",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "The address your parcels ship from. The name here also signs the customs declaration.",
          "error": null,
          "name": "Ship-from address",
          "type": "OBJECT",
          "value": ""
        },
        {
          "description": "Two-letter code of the country you ship from. Only orders to other countries run through this flow.",
          "error": null,
          "name": "Home country",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "Two-letter code of the country your goods are made in, declared on every customs line.",
          "error": null,
          "name": "Country of origin",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "Your standard shipping box: its size and unit, the unit your product weights are in (lb, oz, kg or g), and what the empty box and packing weigh.",
          "error": null,
          "name": "Box",
          "type": "OBJECT",
          "value": ""
        },
        {
          "description": "Only rates that arrive within this many days count when the flow picks the cheapest one.",
          "error": null,
          "name": "Most days in transit",
          "type": "INT",
          "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:55:31.755Z"
}
