Skip to main content

supplyShipmentsAdvance

Moves one shipment to its next status during the request and returns it: Pending to In Transit, In Transit to Delivered, Delivered to In Receiving, In Receiving to Received, and Received to Closed.

Business Rules​

  • statusDate is recorded as the ship date for In Transit, the delivery date for Delivered, and the received date for Received. It defaults to now. Other statuses do not record a date
  • Moving to Received needs a received quantity on at least one line, and lowers each line received short to what arrived, returning the rest to its purchase order
  • expectedStatus is the status the caller saw. The request is refused when the shipment has moved since, so a repeated or stale request cannot move it one more step
  • Use supplyAdvanceShipments to advance several shipments in the background

Error Scenarios​

  • “Shipment not found”
  • “Shipment is in a terminal state and cannot be advanced”
  • “This shipment is now In Transit. Reload it and try again.”
  • “This shipment changed. Reload and try again.”
  • A message naming what the next status needs, such as a destination

Permissions Required​

  • supply:change_shipment_status
supplyShipmentsAdvance(
input: SupplyShipmentsAdvanceInput!
): SupplyShipment!

Arguments​

supplyShipmentsAdvance.input ● SupplyShipmentsAdvanceInput! non-null input common​

Parameters for SupplyShipmentsAdvance

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

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.