{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "7CF6732A-1F0D-4CF8-AADA-7EC91ACB2F62",
    "name": "RevAddress: delivery alerts and returns to support"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -26.869300911854097,
        "y": -39.027355623100306,
        "zoom": 0.61
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When USPS raises a delivery alert or returns a package, RevAddress reads the tracking history, the ShipStation shipment is found, the address is checked again and a reship is quoted. Support decides in Slack: reship, contact the customer or refund.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When USPS raises a delivery alert or returns a package, RevAddress reads the tracking history, the ShipStation shipment is found, the address is checked again and a reship is quoted. Support decides in Slack: reship, contact the customer or refund.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Build the reship order Result"
          },
          "position": {
            "x": 1538,
            "y": 1299
          }
        },
        "flowElementId": "C5FE6042-B9A6-4CDE-946A-D6A67D7DC747",
        "groupId": null,
        "id": "36013676-2078-4079-B17D-7FBD4D4B1A74",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "order",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Original order",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "853087D0-8358-4B23-BC32-F4F0B0D509DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "validation",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Validation",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "6066C134-B892-4D9F-AF05-B163A1318CB7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shipment",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "event",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "event",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2816C594-0C2A-40FE-B383-CC9E9AB6E71C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "trackingNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const o = order || {};\nconst v = validation && typeof validation === 'object' ? validation : {};\nconst a = v.address;\nconst to = Object.assign({}, o.shipTo || {});\nif (a && a.streetAddress) {\n  to.street1 = a.streetAddress;\n  to.street2 = '';\n  to.city = a.city || to.city;\n  to.state = a.state || to.state;\n  to.postalCode = a.ZIPCode ? a.ZIPCode + (a.ZIPPlus4 ? '-' + a.ZIPPlus4 : '') : to.postalCode;\n}\nconst pick = (x) => {\n  const r = {};\n  for (const k of ['name', 'company', 'street1', 'street2', 'street3', 'city', 'state', 'postalCode', 'country', 'phone', 'residential']) {\n    if (x && x[k] !== undefined && x[k] !== null) r[k] = x[k];\n  }\n  return r;\n};\nconst items = (o.items || []).filter(i => !i.adjustment).map(i => ({\n  sku: i.sku || '',\n  name: i.name || '',\n  quantity: i.quantity || 1,\n  unitPrice: i.unitPrice || 0,\n  imageUrl: i.imageUrl || '',\n  weight: i.weight || undefined,\n}));\nconst hasWeight = o.weight && o.weight.value;\nreturn {\n  orderNumber: `${o.orderNumber || shipment.orderNumber}-R`.slice(0, 50),\n  orderDate: new Date().toISOString(),\n  shipTo: pick(to),\n  billTo: pick(o.billTo && o.billTo.name ? o.billTo : to),\n  items,\n  customerEmail: o.customerEmail || shipment.customerEmail || '',\n  customerUsername: o.customerUsername || o.customerEmail || shipment.customerEmail || '',\n  weightValue: hasWeight ? o.weight.value : shipment.weightOz,\n  weightUnits: hasWeight && o.weight.units ? o.weight.units : 'ounces',\n  carrierCode: shipment.carrierCode,\n  serviceCode: shipment.serviceCode,\n  packageCode: shipment.packageCode,\n  warehouseId: shipment.warehouseId,\n  internalNotes: `Reship of order ${o.orderNumber || shipment.orderNumber} after a USPS ${event} on tracking ${trackingNumber}. Approved by support in Slack.`,\n  address: [to.street1, to.street2, `${to.city || ''}, ${to.state || ''} ${to.postalCode || ''}`].filter(Boolean).join(', '),\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Reship",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the reship order",
        "nextElementIds": [
          "0C54C271-66B5-45C3-B478-4B0EC279DC0A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Returns the USPS tracking status of a package with its normalized status category and its tracking events. Needs a RevAddress Starter plan or higher.",
          "elementId": "EXTENSION:::SHARED:::default:::revaddress:::trackPackage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the tracking history Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::revaddress:::trackPackage",
          "legacyElementId": null,
          "methodName": "trackPackage",
          "position": {
            "x": 443,
            "y": 260
          }
        },
        "flowElementId": "281B7216-5A45-4F49-9DA5-08FF6835CC85",
        "groupId": null,
        "id": "84F8F6A0-D30B-4A3C-A2B4-E78A762490E5",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "trackingNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "expand",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "DETAIL"
                  }
                ],
                "mode": "BASIC",
                "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": "trackPackage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Tracking",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "revaddress",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the tracking history",
        "nextElementIds": [
          "A3EE02C2-2725-417D-B263-7195302CF9A5"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves a paginated list of shipments matching optional filters such as recipient, carrier, service, tracking number, store, and date ranges. Useful for tracking dashboards or post-fulfillment automations.",
          "elementId": "EXTENSION:::SHARED:::default:::shipstation:::listShipments",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the shipment in ShipStation Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipstation:::listShipments",
          "legacyElementId": "JS###v1###ShipStation###listShipments",
          "methodName": "listShipments",
          "position": {
            "x": 792,
            "y": 260
          }
        },
        "flowElementId": "A9217607-D1C6-41E7-B100-77B0D4A35164",
        "groupId": null,
        "id": "A3EE02C2-2725-417D-B263-7195302CF9A5",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "recipientName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "recipientCountryCode",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "carrierCode",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "serviceCode",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "trackingNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "storeId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "createDateStart",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "createDateEnd",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shipDateStart",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shipDateEnd",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeShipmentItems",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortDir",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "page",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "pageSize",
              "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": "listShipments",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Shipments",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipstation",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the shipment in ShipStation",
        "nextElementIds": [
          "15748830-3437-4C1B-B263-801F377E4180"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves the full details of a single warehouse (Ship From Location) by ID, including origin and return addresses.",
          "elementId": "EXTENSION:::SHARED:::default:::shipstation:::getWarehouse",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the ship-from location Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipstation:::getWarehouse",
          "legacyElementId": "JS###v1###ShipStation###getWarehouse",
          "methodName": "getWarehouse",
          "position": {
            "x": 1519,
            "y": 260
          }
        },
        "flowElementId": "9F1E7280-6739-4286-ADE2-42ECAB48B15E",
        "groupId": null,
        "id": "92BE6BD4-A8E7-474F-9951-326B67D1CE6C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "warehouseId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipments",
                    "subPathSegments": [
                      {
                        "key": "shipments",
                        "optional": false
                      },
                      {
                        "index": 0,
                        "last": false
                      },
                      {
                        "key": "warehouseId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A3EE02C2-2725-417D-B263-7195302CF9A5"
                  }
                ],
                "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": "getWarehouse",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Warehouse",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipstation",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the ship-from location",
        "nextElementIds": [
          "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Quotes USPS prices across the domestic mail classes for a package between two ZIP Codes, with delivery estimates. Dimensions default to 6 x 4 x 1 inches. Needs a RevAddress Starter plan or higher.",
          "elementId": "EXTENSION:::SHARED:::default:::revaddress:::getDomesticRates",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Quote the reship Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::revaddress:::getDomesticRates",
          "legacyElementId": null,
          "methodName": "getDomesticRates",
          "position": {
            "x": 833,
            "y": 560
          }
        },
        "flowElementId": "873C670D-A1D4-4432-ABDA-93237F297D65",
        "groupId": null,
        "id": "474632C6-9E52-47CF-B0F2-B1E11CC90F5A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "originZIPCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "originZip",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "destinationZIPCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "zip5",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weight",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "weightLb",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "length",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "length",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "width",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "width",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "height",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "height",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "mailClass",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "processingCategory",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rateIndicator",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "priceType",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "mailingDate",
              "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": "getDomesticRates",
          "onFailElemId": "C6E8DED4-EA90-40EB-9275-780ACC7008D3",
          "packageId": "default",
          "resultAlias": "Rates",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "revaddress",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Quote the reship",
        "nextElementIds": [
          "2816C594-0C2A-40FE-B383-CC9E9AB6E71C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Standardizes a US address. Without paid USPS access the result is standardized against Census data and carries resolution.classification standardized_unverified and degraded true: it is not a USPS delivery-point (DPV) confirmation. With a paid plan and credits it includes the ZIP+4 and DPV flags.",
          "elementId": "EXTENSION:::SHARED:::default:::revaddress:::validateAddress",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Recheck the address Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::revaddress:::validateAddress",
          "legacyElementId": null,
          "methodName": "validateAddress",
          "position": {
            "x": 1189,
            "y": 560
          }
        },
        "flowElementId": "041CD4EB-E0C8-4AF4-991F-B9E75EF5D692",
        "groupId": null,
        "id": "6066C134-B892-4D9F-AF05-B163A1318CB7",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "streetAddress",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "street1",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "secondaryAddress",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "street2",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "city",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "city",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "state",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "state",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "ZIPCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "zip5",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "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": "validateAddress",
          "onFailElemId": "BE22BF6B-0160-4B16-B3D1-83F4586FFA71",
          "packageId": "default",
          "resultAlias": "Validation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "revaddress",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Recheck the address",
        "nextElementIds": [
          "474632C6-9E52-47CF-B0F2-B1E11CC90F5A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 814,
            "y": 1129
          }
        },
        "flowElementId": "CC57E0E4-2C64-49FD-9D28-A4BD7B51FCD7",
        "groupId": null,
        "id": "5CEAAABE-29E6-4188-B9B4-52C4F9D28B0B",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Support decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for support's answer",
        "nextElementIds": [
          "4E283E1D-4ECD-4E39-95B6-6330FD3CB4D1"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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": "Confirm the reship Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 833,
            "y": 1290
          }
        },
        "flowElementId": "8AC60B5B-DAF7-45D2-BBCF-FD4DB5AE4ED0",
        "groupId": null,
        "id": "E2868730-062A-41E7-81E7-6B190ABBE30E",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Reship created. Order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship order",
                    "subPathSegments": [
                      {
                        "key": "orderNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0C54C271-66B5-45C3-B478-4B0EC279DC0A"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " is in ShipStation, awaiting shipment, to "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "address",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to support",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "88E578F7-B376-4526-9291-C8A4F35C7DDA"
                  }
                ],
                "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": [],
                "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": "Reship confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the reship",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new order or updates an existing one in ShipStation. Supplying an existing orderKey updates the matching order; otherwise a new order is created. Includes shipping and billing addresses, line items, totals, the carrier, service and package to ship with, weight and dimensions, the store and Ship From Location, and tags. Set Store, or ShipStation files the order under the account's first manual store (Manual Orders). ShipStation replaces the whole order on update, so send every field the order should keep.",
          "elementId": "EXTENSION:::SHARED:::default:::shipstation:::createOrUpdateOrder",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "orderStatus": {
              "awaiting_shipment": "Awaiting Shipment"
            }
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the reship order Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipstation:::createOrUpdateOrder",
          "legacyElementId": "JS###v1###ShipStation###createOrUpdateOrder",
          "methodName": "createOrUpdateOrder",
          "position": {
            "x": 1181,
            "y": 1290
          }
        },
        "flowElementId": "AE8F2DC0-7E17-42B1-85AC-72EED0D2C421",
        "groupId": null,
        "id": "0C54C271-66B5-45C3-B478-4B0EC279DC0A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "tagIds",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EMPTY_LIST",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "arrays.create()"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "billTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "billTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shipTo",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "shipTo",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "orderNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderDate",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "orderDate",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderStatus",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "awaiting_shipment"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "orderKey",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerUsername",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "customerUsername",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerEmail",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "customerEmail",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "items",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "items",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "amountPaid",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 0
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "taxAmount",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shippingAmount",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customerNotes",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "internalNotes",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "internalNotes",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "gift",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "giftMessage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "requestedShippingService",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "carrierCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "carrierCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "serviceCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "serviceCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "packageCode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "packageCode",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weightValue",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "weightValue",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "weightUnits",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "weightUnits",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dimensionsLength",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dimensionsWidth",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dimensionsHeight",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "dimensionsUnits",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "storeId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "warehouseId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reship",
                    "subPathSegments": [
                      {
                        "key": "warehouseId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "36013676-2078-4079-B17D-7FBD4D4B1A74"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customField1",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customField2",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customField3",
              "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": "createOrUpdateOrder",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Reship order",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipstation",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the reship order",
        "nextElementIds": [
          "E2868730-062A-41E7-81E7-6B190ABBE30E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Gather the shipment details Result"
          },
          "position": {
            "x": 1517,
            "y": 569
          }
        },
        "flowElementId": "2D7BB31C-30E7-46BF-8EB5-F905F7C8FDD2",
        "groupId": null,
        "id": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "found",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipments",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "A3EE02C2-2725-417D-B263-7195302CF9A5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "warehouse",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Warehouse",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "92BE6BD4-A8E7-474F-9951-326B67D1CE6C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = (found && Array.isArray(found.shipments)) ? found.shipments : [];\nconst s = list.find(x => !x.voided) || list[0] || {};\nconst to = s.shipTo || {};\nconst w = s.weight || {};\nconst units = String(w.units || 'ounces').toLowerCase();\nconst value = Number(w.value) || 0;\nconst lb = units.startsWith('pound') ? value : units.startsWith('gram') ? value / 453.592 : value / 16;\nconst d = s.dimensions || {};\nconst origin = (warehouse && warehouse.originAddress) || {};\nreturn {\n  orderId: s.orderId,\n  orderNumber: s.orderNumber || '',\n  warehouseId: s.warehouseId,\n  customerEmail: s.customerEmail || '',\n  name: to.name || '',\n  phone: to.phone || '',\n  street1: to.street1 || '',\n  street2: to.street2 || '',\n  city: to.city || '',\n  state: to.state || '',\n  zip5: String(to.postalCode || '').slice(0, 5),\n  originZip: String(origin.postalCode || '').slice(0, 5),\n  typed: [to.street1, to.street2, `${to.city || ''}, ${to.state || ''} ${to.postalCode || ''}`].filter(Boolean).join(', '),\n  weightLb: Math.max(Math.round(lb * 100) / 100, 0.1),\n  weightOz: Math.max(Math.round(lb * 160) / 10, 1),\n  length: Number(d.length) || 6,\n  width: Number(d.width) || 4,\n  height: Number(d.height) || 1,\n  carrierCode: s.carrierCode || '',\n  serviceCode: s.serviceCode || '',\n  packageCode: s.packageCode || 'package',\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Shipment",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Gather the shipment details",
        "nextElementIds": [
          "6066C134-B892-4D9F-AF05-B163A1318CB7"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "No reship quote Result"
          },
          "position": {
            "x": 459,
            "y": 439
          }
        },
        "flowElementId": "0725A2C8-699E-41CF-BDB3-3303AE919A13",
        "groupId": null,
        "id": "C6E8DED4-EA90-40EB-9275-780ACC7008D3",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Rates error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "No reship quote",
        "nextElementIds": [
          "2816C594-0C2A-40FE-B383-CC9E9AB6E71C"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1191,
            "y": 269
          }
        },
        "flowElementId": "0B10614D-1217-4DEC-AF2C-410D31B935D0",
        "groupId": null,
        "id": "15748830-3437-4C1B-B263-801F377E4180",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "a2d9a231-d2fb-49e4-9bcd-f1b0c0b4443c",
                "nestedOperation": null,
                "operation": "arrayIsNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Shipments",
                      "subPathSegments": [
                        {
                          "key": "shipments",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "A3EE02C2-2725-417D-B263-7195302CF9A5"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "ARRAY",
                "values": []
              }
            ],
            "grouping": [
              "a2d9a231-d2fb-49e4-9bcd-f1b0c0b4443c"
            ]
          },
          "elseComponent": {
            "componentId": "7E04DC09-2BD6-4278-961D-B4307F8179D3",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Shipment check",
          "storeResult": false,
          "thenComponent": {
            "componentId": "92BE6BD4-A8E7-474F-9951-326B67D1CE6C",
            "componentType": "ELEMENT"
          }
        },
        "name": "Shipment found?",
        "nextElementIds": [
          "92BE6BD4-A8E7-474F-9951-326B67D1CE6C",
          "7E04DC09-2BD6-4278-961D-B4307F8179D3"
        ],
        "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": "Note: refund the order Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1535,
            "y": 990
          }
        },
        "flowElementId": "68A40F24-C27C-402C-8F6A-99389BC0F51B",
        "groupId": null,
        "id": "B96847FF-9F13-49C2-8901-F7207839CAAD",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Refund chosen. Nothing was reshipped. Refund order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "orderNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " in the store it came from."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to support",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "88E578F7-B376-4526-9291-C8A4F35C7DDA"
                  }
                ],
                "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": [],
                "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": "Refund note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Note: refund the order",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Address did not validate Result"
          },
          "position": {
            "x": 819,
            "y": 699
          }
        },
        "flowElementId": "A9C1CBF7-815D-438D-986E-3E1D349F9D4B",
        "groupId": null,
        "id": "BE22BF6B-0160-4B16-B3D1-83F4586FFA71",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Validation error",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "Address did not validate",
        "nextElementIds": [
          "474632C6-9E52-47CF-B0F2-B1E11CC90F5A"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "notes": "Fires when USPS reports a tracked package as returned to the sender. Needs a RevAddress Starter plan or higher with webhook delivery enabled on the account.",
          "elementId": "EXTENSION:::SHARED:::default:::revaddress:::onPackageReturned",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::revaddress:::onPackageReturned",
          "legacyElementId": null,
          "methodName": "onPackageReturned",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "07CDC0B6-CD45-46B0-80EB-0C3CB625A6AA",
        "groupId": "85130523-9972-4C20-9308-4D81DECA404E",
        "id": "190EE33F-45F0-4ED1-9855-D205BBB654E7",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onPackageReturned",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Return",
          "scope": "SINGLE_APP",
          "serviceId": "revaddress",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "Package returned",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves the full details of a single order by its ShipStation order ID, including line items, addresses, totals, weights, dimensions, and advanced options.",
          "elementId": "EXTENSION:::SHARED:::default:::shipstation:::getOrder",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Get the original order Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::shipstation:::getOrder",
          "legacyElementId": "JS###v1###ShipStation###getOrder",
          "methodName": "getOrder",
          "position": {
            "x": 1539,
            "y": 1120
          }
        },
        "flowElementId": "E5BB662A-F7FF-4335-BBF9-188175EAFD75",
        "groupId": null,
        "id": "853087D0-8358-4B23-BC32-F4F0B0D509DC",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "orderId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "orderId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "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": "getOrder",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Original order",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "shipstation",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Get the original order",
        "nextElementIds": [
          "36013676-2078-4079-B17D-7FBD4D4B1A74"
        ],
        "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 support Result"
          },
          "position": {
            "x": 425,
            "y": 569
          }
        },
        "flowElementId": "F0630101-54AD-4EEE-A025-75EAEA2F769E",
        "groupId": null,
        "id": "2816C594-0C2A-40FE-B383-CC9E9AB6E71C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "event",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "trackingNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "tracking",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Tracking",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "84F8F6A0-D30B-4A3C-A2B4-E78A762490E5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "shipment",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "validation",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Validation",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "6066C134-B892-4D9F-AF05-B163A1318CB7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "validationError",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Validation error",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BE22BF6B-0160-4B16-B3D1-83F4586FFA71"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rates",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Rates",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "474632C6-9E52-47CF-B0F2-B1E11CC90F5A"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "ratesError",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Rates error",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C6E8DED4-EA90-40EB-9275-780ACC7008D3"
                  }
                ],
                "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 = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst body = (event && event.data) || {};\nconst returned = /return/i.test(String(body.event || body.status || '')) || /return/i.test(String((event && event.source) || ''));\nconst t = tracking && typeof tracking === 'object' ? tracking : {};\nconst events = (Array.isArray(t.trackingEvents) ? t.trackingEvents : []).slice(0, 5).map(e => [e.eventTimestamp ? String(e.eventTimestamp).slice(0, 16).replace('T', ' ') : '', e.eventType || '', e.eventCity ? `${e.eventCity} ${e.eventState || ''}`.trim() : ''].filter(Boolean).join(', '));\nconst v = validation && typeof validation === 'object' ? validation : {};\nconst a = v.address || {};\nconst info = v.additionalInfo || {};\nlet check;\nif (!v.address) {\n  check = `RevAddress could not validate the address${validationError ? ' (' + validationError + ')' : ''}`;\n} else {\n  const std = [a.streetAddress, `${a.city || ''}, ${a.state || ''} ${a.ZIPCode || ''}${a.ZIPPlus4 ? '-' + a.ZIPPlus4 : ''}`].join(', ');\n  const dpvText = ({ Y: 'USPS confirms the delivery point', N: 'USPS does not recognize the delivery point', S: 'USPS does not recognize the unit number', D: 'the building needs a unit number' })[info.DPVConfirmation] || (v.degraded ? 'no USPS delivery-point check on this RevAddress plan' : '');\n  check = `RevAddress standardized it as ${std}${dpvText ? '; ' + dpvText : ''}`;\n}\nconst opts = (rates && rates.rates && Array.isArray(rates.rates.rateOptions)) ? rates.rates.rateOptions : [];\nconst est = (rates && rates.serviceStandards && Array.isArray(rates.serviceStandards.estimates)) ? rates.serviceStandards.estimates : [];\nconst best = {};\nfor (const o of opts) {\n  const p = Number(o.totalBasePrice);\n  if (o.mailClass && !isNaN(p) && (best[o.mailClass] === undefined || p < best[o.mailClass])) best[o.mailClass] = p;\n}\nconst className = (cls) => cls.toLowerCase().split('_').map(w => w === 'usps' ? 'USPS' : w.charAt(0).toUpperCase() + w.slice(1)).join(' ');\nconst quote = Object.entries(best).sort((x, y) => x[1] - y[1]).slice(0, 3).map(([cls, p]) => {\n  const e = est.find(x => x.mailClass === cls);\n  return `${className(cls)} $${p.toFixed(2)}${e && e.days ? ', ' + e.days + ' days' : ''}`;\n}).join('; ');\nconst latest = t.statusSummary || (body.data && body.data.latestEvent && body.data.latestEvent.eventType) || '';\nconst lines = [\n  returned ? `*USPS is returning order ${shipment.orderNumber} to you*` : `*USPS raised a delivery alert on order ${shipment.orderNumber}*`,\n  `Tracking ${trackingNumber}${latest ? ': ' + latest : ''}`,\n  `Customer: ${[shipment.name, shipment.customerEmail, shipment.phone].filter(Boolean).join(', ')}`,\n  `Ship-to on the order: ${shipment.typed}`,\n  `Address check: ${check}`,\n  quote ? `Reship from ${shipment.originZip}: ${quote}` : `No USPS reship quote${ratesError ? ' (' + ratesError + ')' : ''}`,\n  events.length ? `Tracking history:\\n${events.map(x => '- ' + x).join('\\n')}` : null,\n].filter(Boolean);\nreturn {\n  event: returned ? 'return' : 'delivery alert',\n  text: returned ? `USPS is returning order ${shipment.orderNumber}` : `Delivery alert on order ${shipment.orderNumber}`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Reship' }, url: link('reship') },\n      { type: 'button', text: { type: 'plain_text', text: 'Contact the customer' }, url: link('contact') },\n      { type: 'button', text: { type: 'plain_text', text: 'Refund' }, url: link('refund') },\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 support",
        "nextElementIds": [
          "88E578F7-B376-4526-9291-C8A4F35C7DDA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask customer support Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 453,
            "y": 1120
          }
        },
        "flowElementId": "9D6C82D6-39E0-4605-867C-4A8040CEF488",
        "groupId": null,
        "id": "88E578F7-B376-4526-9291-C8A4F35C7DDA",
        "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": "2816C594-0C2A-40FE-B383-CC9E9AB6E71C"
                  }
                ],
                "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": "2816C594-0C2A-40FE-B383-CC9E9AB6E71C"
                  }
                ],
                "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 support",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask customer support",
        "nextElementIds": [
          "5CEAAABE-29E6-4188-B9B4-52C4F9D28B0B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the alert to support as is Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1509,
            "y": 130
          }
        },
        "flowElementId": "B371B961-AE61-4EFF-B1B6-9D514336A3EA",
        "groupId": null,
        "id": "7E04DC09-2BD6-4278-961D-B4307F8179D3",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "*"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": [
                      {
                        "key": "source",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "* on USPS tracking "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Package event",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "tracking_number",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "85130523-9972-4C20-9308-4D81DECA404E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Tracking",
                    "subPathSegments": [
                      {
                        "key": "statusSummary",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "84F8F6A0-D30B-4A3C-A2B4-E78A762490E5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". No ShipStation shipment has this tracking number, so the order, the address check and the reship quote are not attached. Please look it up by hand."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "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": [],
                "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": "Unmatched notice",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the alert to support as is",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "router",
          "isFirstElement": false,
          "blockDefinitionId": "router",
          "casesViewMode": {
            "dbb47f48-4a85-444c-8931-f69df38d948d": "SIMPLE",
            "bbb32ad3-4745-4dea-8f73-b4daa34c9aa8": "SIMPLE"
          },
          "position": {
            "x": 1173,
            "y": 1129
          }
        },
        "flowElementId": "703AD33E-A9B1-4BD7-85AF-A92AFB0227AE",
        "groupId": null,
        "id": "4E283E1D-4ECD-4E39-95B6-6330FD3CB4D1",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Decision",
          "storeResult": true,
          "switchCases": [
            {
              "defaultCase": false,
              "id": "dbb47f48-4a85-444c-8931-f69df38d948d",
              "label": "Reship",
              "nextComponents": [
                {
                  "componentId": "853087D0-8358-4B23-BC32-F4F0B0D509DC",
                  "componentType": "ELEMENT"
                }
              ],
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "reship"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "defaultCase": false,
              "id": "bbb32ad3-4745-4dea-8f73-b4daa34c9aa8",
              "label": "Contact the customer",
              "nextComponents": [
                {
                  "componentId": "713213A7-6B38-4592-8ACB-0A758E9DC411",
                  "componentType": "ELEMENT"
                }
              ],
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "contact"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "defaultCase": true,
              "id": "a7ef303f-c3ba-41da-9f85-934fc91b4667",
              "label": "Everything Else",
              "nextComponents": [
                {
                  "componentId": "B96847FF-9F13-49C2-8901-F7207839CAAD",
                  "componentType": "ELEMENT"
                }
              ],
              "type": "SIMPLE",
              "value": null
            }
          ],
          "switchExpression": {
            "expression": [
              {
                "id": "RESULT",
                "label": "Support decision",
                "subPathSegments": [
                  {
                    "key": "decision",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "5CEAAABE-29E6-4188-B9B4-52C4F9D28B0B"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "What did support decide?",
        "nextElementIds": [
          "853087D0-8358-4B23-BC32-F4F0B0D509DC",
          "B96847FF-9F13-49C2-8901-F7207839CAAD",
          "713213A7-6B38-4592-8ACB-0A758E9DC411"
        ],
        "nextGroupIds": [],
        "type": "VALUE_ROUTER"
      },
      {
        "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": "Note: contact the customer Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1518,
            "y": 860
          }
        },
        "flowElementId": "B8A26BF5-C680-4A5A-B9A5-4A83CA1BFE31",
        "groupId": null,
        "id": "713213A7-6B38-4592-8ACB-0A758E9DC411",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Contact the customer first: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "customerEmail",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "phone",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". Nothing was reshipped or refunded. Reship or refund order "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Shipment",
                    "subPathSegments": [
                      {
                        "key": "orderNumber",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "0BB1FF89-97B0-4621-A9B4-5127D669BDBE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " once you hear back."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to support",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "88E578F7-B376-4526-9291-C8A4F35C7DDA"
                  }
                ],
                "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": [],
                "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": "Contact note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Note: contact the customer",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Fires when USPS raises an alert on a tracked package, such as a delivery exception. Needs a RevAddress Starter plan or higher with webhook delivery enabled on the account.",
          "elementId": "EXTENSION:::SHARED:::default:::revaddress:::onTrackingAlert",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::revaddress:::onTrackingAlert",
          "legacyElementId": null,
          "methodName": "onTrackingAlert",
          "position": {
            "x": 110,
            "y": 220
          }
        },
        "flowElementId": "44959C78-FB5B-4CB9-87F8-D87C19D4F4FD",
        "groupId": "85130523-9972-4C20-9308-4D81DECA404E",
        "id": "EEE01F26-D041-49F7-BF89-7C7FEDFD6C3A",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onTrackingAlert",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Alert",
          "scope": "SINGLE_APP",
          "serviceId": "revaddress",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "Delivery alert",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      }
    ],
    "firstElementId": "85130523-9972-4C20-9308-4D81DECA404E",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "triggers-group",
          "isFirstElement": true,
          "blockDefinitionId": "triggers-group",
          "viewport": {
            "x": 0,
            "y": 0,
            "zoom": 0.8
          },
          "position": {
            "x": 110,
            "y": 269
          }
        },
        "flowElementId": "E28B3F7E-35FC-45EF-9DB0-8553A4895C8E",
        "groupId": null,
        "id": "85130523-9972-4C20-9308-4D81DECA404E",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "occurWithin": null,
          "occurrenceTimeUnit": null,
          "onFailElemId": null,
          "resultAlias": "Package event",
          "storeResult": true,
          "transitionMode": "ONE_OCCUR"
        },
        "name": "Delivery alert or return",
        "nextElementIds": [
          "84F8F6A0-D30B-4A3C-A2B4-E78A762490E5"
        ],
        "nextGroupIds": [],
        "type": "TRIGGERS"
      }
    ],
    "id": "182488F2-AF6F-49C5-8033-E42C2C4E2F7E",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": null,
        "valid": true
      },
      "errorMessage": null,
      "executionStaticData": [
        {
          "description": "The URL of the block Wait for support'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-12-02T01:40:57.247Z"
}
