Skip to main content

InventoryShipment

Requires read_inventory_shipments access scope.

Subscribe to field-level changes on the InventoryShipment GraphQL Admin API object. You can subscribe to create, delete, and update events, as well as changes to specific fields.

Each topic corresponds to a commerce resource (for example, an inventory shipment) that can exist independently within its domain. Child entities that depend on a parent within the same domain don't have their own topic. Instead, changes to child entities trigger a delivery on the parent topic. Calculated fields, derived fields, auto-updated timestamps, and cross-domain fields aren't available as triggers.

shopify.app.toml

[events]
api_version = "unstable"

[[events.subscription]]
handle = "my_inventory_shipment_events"

topic = "InventoryShipment"
actions = ["update"]
triggers = [
"inventoryShipment.status",
"inventoryShipment.tracking.trackingNumber"
]

uri = "https://your-app.com/events"

query = """
query inventory_shipment_details($inventoryShipmentId: ID!) {
inventoryShipment(id: $inventoryShipmentId) {
id
name
status
tracking {
company
trackingNumber
trackingUrl
}
}
shop {
id
}
}
"""

# Optional
query_filter = "inventoryShipment.status:'IN_TRANSIT'"

Field-level triggers for InventoryShipment subscriptions.

All triggers require the read_inventory_shipments access scope, and those triggers that require additional scopes are documented where relevant. Deprecated triggers are listed last.

Subscriptions can include multiple triggers. Use the shopify-webhook-id header for deduplication when handling duplicate deliveries.

Custom queries aren't limited to InventoryShipment. They can query the full GraphQL Admin API.

Anchor to list-of-topics-inventoryShipment.*
inventoryShipment.*

Fires when events involve the InventoryShipment object.

The "create" and "delete" actions are only relevant within the context of this parent topic. Use fields_changed to follow or replicate impacted data after a delete event. Define a custom query to retrieve specific fields from create events.

inventoryShipment.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under inventoryShipment, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Variables: inventoryShipmentId

Anchor to list-of-topics-inventoryShipment.status
inventoryShipment.status

Fires when the status field on the InventoryShipment object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The status field represents the current status of the shipment.

Variables: inventoryShipmentId

Anchor to list-of-topics-inventoryShipment.tracking.*
inventoryShipment.tracking.*

Fires when the tracking field on the InventoryShipment object changes.

inventoryShipment.tracking.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under inventoryShipment.tracking, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The tracking field represents the tracking information for the shipment.

Variables: inventoryShipmentId

Anchor to list-of-topics-inventoryShipment.tracking.arrivesAt
inventoryShipment.tracking.arrivesAt

Fires when the arrivesAt field on the InventoryShipmentTracking object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The arrivesAt field represents the estimated date and time that the shipment will arrive.

Variables: inventoryShipmentId

Anchor to list-of-topics-inventoryShipment.tracking.company
inventoryShipment.tracking.company

Fires when the company field on the InventoryShipmentTracking object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The company field represents the name of the shipping carrier company.

Variables: inventoryShipmentId

Anchor to list-of-topics-inventoryShipment.tracking.trackingNumber
inventoryShipment.tracking.trackingNumber

Fires when the trackingNumber field on the InventoryShipmentTracking object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The trackingNumber field represents the tracking number used by the carrier to identify the shipment.

Variables: inventoryShipmentId

Anchor to list-of-topics-inventoryShipment.tracking.trackingUrl
inventoryShipment.tracking.trackingUrl

Fires when the trackingUrl field on the InventoryShipmentTracking object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The trackingUrl field represents the URL to track the shipment.

Variables: inventoryShipmentId


Was this page helpful?