label_preflight
Validate a FedEx shipment proposal with zero side effects: check parties, contacts, commodity lines, HTS codes, unit values, and international declared value limits. Run before label creation.
Instructions
Validate a proposed FedEx shipment with ZERO side effects: party resolution + contact system flags (these break FedEx invoices), per-line commodity checks (exists, not soft-deleted, valid 10-digit HTS, required construction/type/fabric), unit-value suggestions (manual price, then commodity_prices), the international declared-value limit (CN $680 / else 5000 RMB live) with a projected total, and env wiring. Custom (off-catalog) lines are checked for their own required fields and get no unit-value suggestion (there is no catalog key to look up). Run this first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Target database environment (wired now: dev). Defaults to dev (safe). | dev |
| lines | No | International only: commodity lines (catalog or custom/off-catalog). MCP cap: 50. Refused on a domestic shipment, which is weight-only. | |
| weight | No | Domestic only: package weight per box. | |
| numBoxes | Yes | Boxes in the multi-piece shipment (identical contents per box). MCP cap: 10. | |
| shipmentType | Yes | ||
| shipToStoreId | No | Domestic: destination store id (must differ from origin). | |
| shipFromStoreId | No | Domestic: origin store id (Store Locations API). | |
| shipToContactId | No | International: destination shipping_contacts id. | |
| importerContactId | No | International only: importer shipping_contacts id. | |
| shipFromContactId | No | International: origin shipping_contacts id. | |
| packageDescription | Yes |