Skip to main content

Production Run Type

The ProductionRun type represents a production process that a tracker is associated with.

Type Definition

"""
A production run in the system.
"""
type ProductionRun {
"""
Unique identifier for the production run.
"""
id: ID!

"""
Human-readable name of the production run.
"""
name: String!

"""
Current status of the production run.
"""
status: ProductionStatus!

"""
When the production run started.
Unix timestamp in seconds.
"""
startTime: Int!

"""
When the production run ended.
Unix timestamp in seconds.
"""
endTime: Int

"""
List of trackers associated with this run.
"""
trackers: [Tracker!]!

"""
Storage location where production occurs.
"""
storageLocation: StorageLocation!

"""
Delivery location for the production.
"""
deliveryLocation: DeliveryLocation

"""
Brand associated with the production.
"""
brand: Brand!

"""
Custom metadata fields.
"""
metadata: JSONObject
}

"""
Status of a production run.
"""
enum ProductionStatus {
"""
Production run is scheduled but not started.
"""
SCHEDULED

"""
Production is in progress.
"""
IN_PROGRESS

"""
Production is temporarily paused.
"""
PAUSED

"""
Production has completed successfully.
"""
COMPLETED

"""
Production was cancelled.
"""
CANCELLED

"""
Production encountered an error.
"""
ERROR
}

Fields

ProductionRun Type

FieldTypeDescription
idID!Required. Unique identifier
nameString!Required. Run name
statusProductionStatus!Required. Current status
startTimeInt!Required. Start timestamp
endTimeIntOptional. End timestamp
trackers[Tracker!]!Required. Associated trackers
storageLocationStorageLocation!Required. Production location
deliveryLocationDeliveryLocationOptional. Delivery location
brandBrand!Required. Associated brand
metadataJSONObjectOptional. Custom metadata

Usage

Basic Query

query GetProductionRun {
productionRun(id: "run_123") {
name
status
startTime
endTime
trackers {
id
currentStatus
}
storageLocation {
name
address
}
}
}

With Delivery Information

query GetProductionWithDelivery {
productionRun(id: "run_123") {
name
status
deliveryLocation {
name
address
contactInfo {
name
phone
email
}
}
brand {
name
code
}
metadata
}
}

Best Practices

  1. Status Management

    • Update status promptly
    • Handle transitions properly
    • Log status changes
  2. Tracker Association

    • Validate tracker availability
    • Handle tracker reassignment
    • Monitor tracker status
  3. Location Handling

    • Validate addresses
    • Update delivery info
    • Track location changes
  4. Metadata Usage

    • Document metadata schema
    • Include relevant details
    • Keep data organized