supplyAssignShipmentCosts
Distributes shipment-level costs to individual line items using a specified allocation method.
Authentication
Requires authentication and the supply:update_shipment_financials
permission.
Behavior
- Accepts a single shipment, a cost type, and an allocation method.
- Calculates per-item cost amounts and persists them on each line item.
- Returns the full shipment for Apollo cache update.
Valid Combinations
- **SHIPPING + QUANTITY**: distribute total shipping costs proportionally by each item's quantity. Always available, since every line item carries a quantity.
- **SHIPPING + WEIGHT**: distribute total shipping costs proportionally by each item's estimated weight.
- **SHIPPING + VOLUME**: distribute total shipping costs proportionally by each item's total volume.
- **DUTIES + COST**: distribute total duties proportionally by each item's total units cost (assumes uniform duty rate).
- **DUTIES + DUTY_RATE**: distribute total duties proportionally by each item's duty-rate-adjusted total units cost.
- **DUTIES + HTS_AMOUNTS**: distribute each HTS category's entered
amount (saved via
supplyUpdateShipmentFinancialshtsCodes[].amount) within matching items, proportionally by item cost. The remainder of total duties and fees is distributed across every eligible item by cost. Re-running replaces every line-item duties and fees value.
Possible Errors
Shipment not found- The specified shipment does not exist.Invalid combination- The cost type and method combination is not supported.No items eligible for distribution- No line items have the required data for the chosen method.HTS categories have no eligible line items- A category with an entered amount has no matching item with a positive cost.HTS category amounts cannot exceed total duties and fees- The categorized duty exceeds the worksheet total.
supplyAssignShipmentCosts(
input: AssignSupplyShipmentCostsInput!
): SupplyShipment!
Arguments
supplyAssignShipmentCosts.input ● AssignSupplyShipmentCostsInput! non-null input common
Parameters for AssignSupplyShipmentCosts
Type
SupplyShipment object shipments
Represents a shipment in the supply chain system.
Shipments are physical movements of goods through the supply chain. They can be linked to purchase orders and track the movement of materials from origin to destination. Each shipment maintains its status, payment information, and relationship to other shipments (hierarchical parent-child structure).
Shipment Types
- **Shipment**: Direct shipment to a final destination (building/warehouse)
- **ASN**: Advanced Shipment Notice, typically an intermediate shipment to a port or hub
Status Lifecycle
Shipments progress through various statuses: pending, in_transit, delivered, in_receiving, received, closed, or canceled
Related Data
Each shipment includes associated items, status history, brand information, purchase order reference, and destination facility information. Shipments can have parent-child relationships for consolidated/split shipment scenarios.