{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "A3B1D9BF-1B29-4CFD-A76F-1356D0022D0F",
    "name": "Easyship: new product classified for customs"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": 28.53797737814125,
        "y": 141.06244439896005,
        "zoom": 0.6964057403345181
      },
      "autoSave": true,
      "descriptions": {
        "flow": "When a product is added in WooCommerce, an AI agent classifies it with Easyship's item categories and HS codes, asks the compliance owner in Slack when the HS code is unclear, and adds the product to the Easyship catalog with its customs data.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a product is added in WooCommerce, an AI agent classifies it with Easyship's item categories and HS codes, asks the compliance owner in Slack when the HS code is unclear, and adds the product to the Easyship catalog with its customs data.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "HS code": "6764b997-33a0-495a-aceb-132ea408db47"
          },
          "position": {
            "x": 110,
            "y": 540
          }
        },
        "flowElementId": "6AAC3B32-B292-48B2-9841-6F9020BDFFA9",
        "groupId": null,
        "id": "F85B729F-CC7E-4108-B37E-6E0324345E8F",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "HS code",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Compliance answer",
                    "subPathSegments": [
                      {
                        "key": "decision",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "6C427316-C6DF-4023-9605-1421ABE2DA0A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "bucketB",
          "storeResult": true
        },
        "name": "Use the chosen HS code",
        "nextElementIds": [
          "B9583165-5BE8-43A5-A162-FD0359EF448E"
        ],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Classify the product for customs Result"
          },
          "tools": {
            "EXTENSION:::SHARED:::default:::easyship:::listHsCodes": {
              "elementId": "EXTENSION:::SHARED:::default:::easyship:::listHsCodes",
              "dynamicOptionsLabels": {}
            }
          },
          "position": {
            "x": 980,
            "y": 40
          }
        },
        "flowElementId": "F299FC46-8B8D-4C93-9D39-A9A3E30B6B78",
        "groupId": null,
        "id": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Classification",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You classify new store products for cross-border shipping with Easyship. You get the product listing and Easyship's item categories.\n\nPick the one item category that fits the product best. Then find its HS code: call List HS Codes with a short description keyword (one or two words, such as headphones or ceramic vase). If the first search finds nothing that fits, try other keywords. Only use codes that List HS Codes returned.\n\nReply with JSON only, with these fields:\ncategorySlug: the slug of the item category you picked\ncategoryName: its name\nhsCode: the HS code you picked\nhsDescription: its description\nclearMatch: true only when one HS code clearly fits this product; false when two or more codes could apply with different duty treatment, or when nothing fits well\ncandidates: when clearMatch is false, the two to four codes a person should choose from, each as { code, description, note }, where note says in a few words when that code applies; an empty list when clearMatch is true\nreason: one sentence on why the code fits, or why it is unclear\ncontainsLiquids: true if the product is or contains a liquid\nbatteryPi966: true if a lithium battery is packed with the product but not inside it\nbatteryPi967: true if a lithium battery is inside the product\noriginCountry: the two-letter code of the country of manufacture if the listing states it, otherwise empty text"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [
            {
              "connectionId": null,
              "definition": {},
              "enabled": true,
              "hostType": "SHARED",
              "methodName": "listHsCodes",
              "name": "List HS Codes",
              "notes": "Looks up Harmonized System (HS) customs codes by code or description keyword. Use a returned code as the HS Code input of Create Product, Update Product, or a parcel item's hs_code field. Requires the \"public.hs_code:read\" advanced scope to be enabled on the API connection, and Easyship rate-limits this endpoint (1,000 requests per day).",
              "packageId": "default",
              "params": [
                {
                  "name": "page",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "perPage",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "code",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                },
                {
                  "name": "description",
                  "type": "SIMPLE",
                  "value": {
                    "expression": [],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                }
              ],
              "serviceId": "easyship",
              "type": "FR_FUNCTION"
            }
          ],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Product: "
              },
              {
                "id": "RESULT",
                "label": "Product",
                "subPathSegments": [
                  {
                    "key": "name",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSKU: "
              },
              {
                "id": "RESULT",
                "label": "Product",
                "subPathSegments": [
                  {
                    "key": "sku",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nStore categories: "
              },
              {
                "id": "RESULT",
                "label": "Product",
                "subPathSegments": [
                  {
                    "key": "categories",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nAttributes: "
              },
              {
                "id": "RESULT",
                "label": "Product",
                "subPathSegments": [
                  {
                    "key": "attributes",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nShort description: "
              },
              {
                "id": "RESULT",
                "label": "Product",
                "subPathSegments": [
                  {
                    "key": "short_description",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nDescription: "
              },
              {
                "id": "RESULT",
                "label": "Product",
                "subPathSegments": [
                  {
                    "key": "description",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nEasyship item categories (slug, name, default HS code):\n"
              },
              {
                "id": "ELEMENT_RESULT",
                "label": "Categories",
                "subPathSegments": [
                  {
                    "key": "item_categories",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "37CF64B2-D9F8-4916-80A1-AEEF79D6F708"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Classify the product for customs",
        "nextElementIds": [
          "9F58C82F-5078-48D7-AD23-C2CD4D63D9CD"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "HS code": "cf6c14f2-d9c6-45ea-8e62-d6afa29ec6a4"
          },
          "position": {
            "x": 681.3843329362594,
            "y": 377.2829457018452
          }
        },
        "flowElementId": "43D1AD71-DD28-4771-9E2A-5BA6B75CDE14",
        "groupId": null,
        "id": "2CBA8E97-9CA9-4730-8E1C-F1C09B780326",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "HS code",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "hsCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "bucketA",
          "storeResult": true
        },
        "name": "Use the agent's HS code",
        "nextElementIds": [
          "B9583165-5BE8-43A5-A162-FD0359EF448E"
        ],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 8.047939745736159,
            "y": 238.6156670637406
          }
        },
        "flowElementId": "68053AAF-7FF4-4A09-96FE-3BBC9344432F",
        "groupId": null,
        "id": "6C427316-C6DF-4023-9605-1421ABE2DA0A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Compliance answer",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the compliance owner's answer",
        "nextElementIds": [
          "F85B729F-CC7E-4108-B37E-6E0324345E8F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Fires when a new product is added to the catalog. Use to mirror inventory to another channel or announce new arrivals.",
          "elementId": "EXTENSION:::SHARED:::default:::woocommerce:::onProductCreated",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::woocommerce:::onProductCreated",
          "legacyElementId": "JS###v1###WooCommerce###onProductCreated",
          "methodName": "onProductCreated",
          "position": {
            "x": 329.6387189794517,
            "y": 38.56405548937656
          }
        },
        "flowElementId": "D6A0192C-3971-4277-8DBF-8C7CA788D12D",
        "groupId": null,
        "id": "20FF9099-BEC7-437F-83CD-354FBB7A9088",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onProductCreated",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Product",
          "scope": "SINGLE_APP",
          "serviceId": "woocommerce",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "New WooCommerce product",
        "nextElementIds": [
          "37CF64B2-D9F8-4916-80A1-AEEF79D6F708"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new product in the Easyship product catalog with optional dimensions, weight, customs data, and pricing. Products can later be referenced by SKU when creating shipments.",
          "elementId": "EXTENSION:::SHARED:::default:::easyship:::createProduct",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add the product to Easyship Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::easyship:::createProduct",
          "legacyElementId": "JS###v1###EasyshipService###createProduct",
          "methodName": "createProduct",
          "position": {
            "x": 698.6156670637406,
            "y": 527.0764994043891
          }
        },
        "flowElementId": "1AA77A9F-FD4C-47E4-BE11-602F500EA48E",
        "groupId": null,
        "id": "3E550B6E-8724-401C-8687-DE414C26F043",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "identifier",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "sku",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "weight",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "length",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "length",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "width",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "width",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "height",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "height",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sellingPrice",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "sellingPrice",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sellingPriceCurrency",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "currency",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "originCountryAlpha2",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "originCountry",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "hsCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - HS code",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.HS code",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "HS code",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "containsLiquids",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "containsLiquids",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "containsBatteryPi966",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "batteryPi966",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "containsBatteryPi967",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Catalog entry",
                    "subPathSegments": [
                      {
                        "key": "batteryPi967",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B9583165-5BE8-43A5-A162-FD0359EF448E"
                  }
                ],
                "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": "createProduct",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Easyship product",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "easyship",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Add the product to Easyship",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Convert to Easyship units Result"
          },
          "position": {
            "x": 400,
            "y": 540
          }
        },
        "flowElementId": "862D7837-E941-4DF8-9A02-C1DC36C00853",
        "groupId": null,
        "id": "B9583165-5BE8-43A5-A162-FD0359EF448E",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "product",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Product",
                    "subPathSegments": null,
                    "type": "TRIGGER_DATA",
                    "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "classification",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "units",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Store units",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Store units"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "defaultOrigin",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Default country of origin",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Default country of origin"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const w = { kg: 1, g: 0.001, lbs: 0.45359237, lb: 0.45359237, oz: 0.028349523 };\nconst d = { cm: 1, m: 100, mm: 0.1, in: 2.54, yd: 91.44 };\nconst wf = w[String(units.weight_unit || 'kg').trim().toLowerCase()] || 1;\nconst df = d[String(units.dimension_unit || 'cm').trim().toLowerCase()] || 1;\nconst dims = product.dimensions || {};\nconst num = (v, f) => { const n = parseFloat(v); return Number.isFinite(n) && n > 0 ? Math.round(n * f * 1000) / 1000 : null; };\nconst price = parseFloat(product.regular_price || product.price);\nconst c = classification || {};\nreturn {\n  name: String(product.name || '').slice(0, 200),\n  sku: product.sku || `woo-${product.id}`,\n  weight: num(product.weight, wf),\n  length: num(dims.length, df),\n  width: num(dims.width, df),\n  height: num(dims.height, df),\n  sellingPrice: Number.isFinite(price) ? Math.round(price * 100) : null,\n  currency: units.currency || 'USD',\n  originCountry: String(c.originCountry || defaultOrigin || '').toUpperCase(),\n  containsLiquids: c.containsLiquids === true,\n  batteryPi966: c.batteryPi966 === true,\n  batteryPi967: c.batteryPi967 === true,\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Catalog entry",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Convert to Easyship units",
        "nextElementIds": [
          "3E550B6E-8724-401C-8687-DE414C26F043"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 980,
            "y": 230
          }
        },
        "flowElementId": "861E5048-841F-46CC-9F04-AF038CA5FD2C",
        "groupId": null,
        "id": "9F58C82F-5078-48D7-AD23-C2CD4D63D9CD",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "ded46601-5f8d-4058-b994-fa658ed6aba3",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Classification",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "clearMatch",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "ded46601-5f8d-4058-b994-fa658ed6aba3"
            ]
          },
          "elseComponent": {
            "componentId": "B99EE8C1-FDF3-4ED4-9A02-842CEDD639CA",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Clear match",
          "storeResult": false,
          "thenComponent": {
            "componentId": "2CBA8E97-9CA9-4730-8E1C-F1C09B780326",
            "componentType": "ELEMENT"
          }
        },
        "name": "One clear HS code?",
        "nextElementIds": [
          "2CBA8E97-9CA9-4730-8E1C-F1C09B780326",
          "B99EE8C1-FDF3-4ED4-9A02-842CEDD639CA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the compliance owner Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 400,
            "y": 230
          }
        },
        "flowElementId": "1C1D3244-98DF-44FE-9520-62654AE9C15E",
        "groupId": null,
        "id": "3F112BF7-2FCC-43AB-B78C-14EC90E4A1BC",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B99EE8C1-FDF3-4ED4-9A02-842CEDD639CA"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "B99EE8C1-FDF3-4ED4-9A02-842CEDD639CA"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to compliance",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the compliance owner",
        "nextElementIds": [
          "6C427316-C6DF-4023-9605-1421ABE2DA0A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Lists Easyship's item categories with each category's slug and default HS code. Use a category's slug as the \"category\" field and/or its hs_code as the HS code of parcel items in Request Rates and Create Shipment, or the HS Code input of Create Product.",
          "elementId": "EXTENSION:::SHARED:::default:::easyship:::listItemCategories",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get Easyship item categories Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::easyship:::listItemCategories",
          "legacyElementId": "JS###v1###EasyshipService###listItemCategories",
          "methodName": "listItemCategories",
          "position": {
            "x": 668.4608323406485,
            "y": 37.12811097875313
          }
        },
        "flowElementId": "9CEFD956-4C77-4B4F-8278-ABE0FDA20350",
        "groupId": null,
        "id": "37CF64B2-D9F8-4916-80A1-AEEF79D6F708",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "page",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "perPage",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 100
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "listItemCategories",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Categories",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "easyship",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get Easyship item categories",
        "nextElementIds": [
          "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
        ],
        "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 question for compliance Result"
          },
          "position": {
            "x": 690,
            "y": 230
          }
        },
        "flowElementId": "5A01B50C-DBA1-4FF6-BE44-BAF725B31A3C",
        "groupId": null,
        "id": "B99EE8C1-FDF3-4ED4-9A02-842CEDD639CA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Product",
                    "subPathSegments": [
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sku",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Product",
                    "subPathSegments": [
                      {
                        "key": "sku",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "20FF9099-BEC7-437F-83CD-354FBB7A9088"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "categoryName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "categoryName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reason",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "reason",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "candidates",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "candidates",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "hsCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "hsCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "hsDescription",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Classification",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "hsDescription",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "59EF4E80-13C1-4135-91D7-E1D33F8E9FDE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const link = (code) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${encodeURIComponent(code)}`;\nlet options = (Array.isArray(candidates) ? candidates : []).filter(o => o && o.code).slice(0, 4);\nif (!options.length && hsCode) options = [{ code: hsCode, description: hsDescription || '', note: 'the agent\\'s best guess' }];\nconst lines = [\n  `*New product needs an HS code before it ships abroad: ${name}*`,\n  sku ? `SKU: ${sku}` : null,\n  categoryName ? `Easyship category: ${categoryName}` : null,\n  reason ? `Why it is unclear: ${reason}` : null,\n  '',\n  ...options.map(o => `*${o.code}*: ${o.description}${o.note ? ` (${o.note})` : ''}`),\n].filter(l => l !== null);\nreturn {\n  text: `New product ${name} needs an HS code`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: options.map((o, i) => ({\n      type: 'button',\n      ...(i === 0 ? { style: 'primary' } : {}),\n      text: { type: 'plain_text', text: `Use ${o.code}` },\n      url: link(o.code),\n    })) },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for compliance",
        "nextElementIds": [
          "3F112BF7-2FCC-43AB-B78C-14EC90E4A1BC"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "20FF9099-BEC7-437F-83CD-354FBB7A9088",
    "groups": [],
    "id": "7659C1D7-0934-4731-99BC-4B7092D10129",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The units your WooCommerce store uses: weight_unit (kg, g, lbs or oz), dimension_unit (cm, m, mm, in or yd) and currency (three letters).",
          "error": null,
          "name": "Store units",
          "type": "OBJECT",
          "value": ""
        },
        {
          "description": "Two-letter code of the country most of your products are made in. Used when the product listing does not say.",
          "error": null,
          "name": "Default country of origin",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The URL of the block Wait for the compliance owner's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-11-19T02:33:22.115Z"
}
