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 + 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**: apply the duty rate from each item's HTS category to calculate per-item duties.
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.
supplyAssignShipmentCosts(
input: AssignSupplyShipmentCostsInput!
): SupplyShipment!
Arguments
supplyAssignShipmentCosts.input ● AssignSupplyShipmentCostsInput! non-null input
Parameters for AssignSupplyShipmentCosts
Type
SupplyShipment object
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, at_destination, delivered, 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.