bulkRecalculateOrderShipmentItemCosts
Recalculates the current shipment-line unit-cost valuations for a batch of V2 orders.
Runs asynchronously and returns a process ID immediately. Every active shipment on each selected order is refreshed from current supplier and product cost data. Each order is processed independently, so one failure does not stop the rest of the batch.
Business Rules
- Between 1 and 50 order IDs can be submitted.
- Duplicate order IDs are processed once.
- Every active shipment line on each order is refreshed.
- Lines without a valid current cost remain without a cost so profitability is not calculated from misleading values.
- Orders without active shipments are reported as skipped in the process result.
- Refreshed orders that still have missing line costs are reported separately from fully costed orders.
- Orders with an active shipment that records no active lines are reported as incomplete, because COGS cannot be calculated for that shipment.
- Missing, malformed, archived, V1, and cross-company order IDs are reported as generic per-order failures without stopping the rest of the batch.
Error Scenarios
- **
BAD_REQUEST**: company context is missing, no order IDs are submitted, or the batch exceeds the maximum size. - **
UNAUTHORIZED**: the caller lacks permission.
Permissions Required
orders:update_fulfillment_costspermission
bulkRecalculateOrderShipmentItemCosts(
input: BulkRecalculateOrderShipmentItemCostsInput!
): AsynchronousActionResponse!
Arguments
bulkRecalculateOrderShipmentItemCosts.input ● BulkRecalculateOrderShipmentItemCostsInput! non-null input common
Parameters for BulkRecalculateOrderShipmentItemCosts
Type
AsynchronousActionResponse object common
Asynchronous action response type