← Home

Mission Control

Reference

# Mission Control

Looking for information about Jobs?

We have moved our Job APIs into their own section - the Zaikio data platform to represent their importance as the core of our offering. If you've already started integration efforts please don't worry, nothing is broken. We have more details in our Changelog here, or reach out in our community slack for more details.

# Introduction

Mission Control is the ultimate looking glass into what actually is happening in a print shop. Its advanced, rules based smart lists let printers classify jobs based on intelligent real-world criteria and act on the insights gained. As if that wasn't already enough, it also enables state-of-the-art production planning with a single click, as well as shop floor data collection using the Mission Control Shopfloor iPad app. mission control list view Mission Control's core feature is the List, and its API is entirely built around creating Lists, interacting with them and acting on changes to List membership. Whilst Mission Control offers the production planning and shopfloor features, other projects can use the same technologies by integrating the Zaikio data platform.

# Why use the Mission Control API?

Rather than building your own rule engines, why not leverage ours? You can always check if an Organisation has Mission Control installed, and if it does you can create lists that represent meaningful conditions for your application. We would envisage you then listening to the list_membership events to be notified whenever a Job or Workstep enters or leaves that condition.

# Data Model

# Structure

The basic architecture of a List can be seen below. list model As you can see, a List has one-or-many Predicates - groups of Rules which are either applied exhaustively ("only if ALL of these match") or opportunistically ("if ANY of these match") to determine the membership of the List.

Lists hold a single data type, so need to be specified as a List of Job resources, or a List of Workstep resources at the point of creation. This cannot be changed once created, so to change, simply create a new List of another type.

# Predicates

A Predicate is a group of rules, and a pattern with which to apply them. Other than acting as the decision nexus for that group of rules, they have no particular properties of their own.

# Rules

Rules are the heart of the Mission Control engine. The combination of a subject and an operator that allows checks to be actioned against resources such as Job or Workstep records. At their simplest, this could be something like JOB_NAME being equal to a value. Some Rule subjects are much more complicated though and allow compound functionalities to be build.

# Subjects

Name Description Applicable rule type
CUSTOMER_NAME The name of the Customer record associated, if present String
FINISHING_KIND The kind of an associated Finishing Enum
FINISHINGS_FILE_REFERENCES_PRESENCE Do any finishings have provided File References, for example to provide a foiling path Boolean
JOB_CREATED_AT When was the Job created Date
JOB_DUE_AT When must the Job be completed by Date
JOB_HAS_UNCLEARED_DELAYS Does the Job have delay data that has not been resolved? Boolean
JOB_KIND The kind of the Job, e.g. flyer Enum
JOB_NAME The name of the Job String
JOB_PROGRESS The current progress of the job between 0 (none) and 1 (complete) Number
JOB_QUANTITY How many of a Job should be printed Number
JOB_REFERENCE The reference fields of a Job String array (any will match)
JOB_SOURCE The source application of the Job String
JOB_STATE The current state of the Job Enum
MILESTONE_POSITION The position of a Milestone represents the sequence it should be done in, from low (early) to high (late) Number
PART_FILE_REFERENCES_PRESENCE Do any parts have file references present? Boolean
SUBSTRATE_PAPER_WEIGHT The grammage of substrates within a Job Number
TODO_STATE The state of any Todo within a Job Enum
WORKSTEP_HAS_EXECUTIONS Does a workstep have performed execution data Boolean
WORKSTEP_HAS_NO_EXECUTIONS Does a workstep have no execution data Boolean
WORKSTEP_HAS_NO_SLOTS Check whether a workstep has not been scheduled for production Boolean
WORKSTEP_HAS_SLOTS Check whether a workstep has been scheduled for production Boolean
WORKSTEP_KIND The kind of a workstep Enum
WORKSTEP_PRESENCE Does a Job have worksteps present? Boolean
WORKSTEP_STATE The state of a workstep Enum

# Rules

Many rules require a value to check against, but some are dynamically calculated. If a rule contains a time-based date rule such as DATE_IS_FUTURE then the list will be recalculated overnight to provide correct data for the following day's operations.

Name Applicable value types Description Needs value
ARRAY_CONTAINS Array Does this list have the provided value as a member true
BETWEEN Number Does the number fall inside a range? true
COLLECTION_IS_EMPTY Array Checks if the array is empty false
COLLECTION_IS_NOT_EMPTY Array Checks if something if present inside the array false
DATE_IS_FUTURE Date Checks if the date is in the future false
DATE_IS_PAST Date Checks if the date is in the past false
IN_THE_NEXT_DAYS Date Checks if the date is within the provided number of days true
DATE_IS_TODAY Date Checks if the date is today false
EQUALS Any Checks if the value matches the value of the subject true
NOT_EQUALS Any Checks if the value is not the value of the subject true
GREATER_THAN Number Checks if the subject is greater than the provided value true
LESS_THAN Number Checks if the subject is less than the provided value true
STRING_BEGINS String Checks if the subject begins with the provided string true
STRING_CONTAINS String Checks if the subject contains the provided string true
STRING_ENDS String Checks if the subject ends with the provided string true
IDENTITY Any Checks if a value is present false

# Sample Data

The following is a sample payload for creating a List. Full details of the API can be found in our OpenAPI browser

{
  "list": {
    "name": "Hardcover Books due today",
    "member_klass": "Job",
    "predicates": [
      {
        "match": "match_all",
        "rules": [
          {
            "subject_type": "JOB_DUE_AT",
            "type": "DateIsToday"
          },
          {
            "subject_type": "JOB_KIND",
            "type": "Equals",
            "value": "hardcover_book"
          }
        ]
      }
    ]
  }
}