Publish Order Progress

Overview

An Order Progress is a TilliT Edge timeseries entity that tracks the production counts and equipment status every minute to create metrics such as performance, availbility and quality. This data can be published via MQTT into TilliT to give a live up-to-date view of your current production data.

Required Payload for Order Progress

The Order Progress entity is shown below. You will need to find the assetId of the asset you are going to update, you may want to look at how to interact with our API to receive that data.

[{
    assetId: number,
    orderId: number, //Is optional, if not supplied then the current running order is used.
    timestamp: string,
    totalCount: number,
    rejectCount: number,
    EQUIPMENT_STATUS_READY: boolean,
    EQUIPMENT_STATUS_RUNNING: boolean,
    EQUIPMENT_STATUS_STOPPED: boolean,
    EQUIPMENT_STATUS_COMPLETE: boolean,
    EQUIPMENT_STATUS_SUSPENDED: boolean,
    EQUIPMENT_STATUS_ABORTED: boolean,
    EQUIPMENT_STATUS_STARVED: boolean,
    EQUIPMENT_STATUS_BLOCKED: boolean,
    EQUIPMENT_STATUS_FAULTED: boolean,
    downtimeReason: string,
    reasonGroupId: number
}]

It is not necessary to send every field in the payload. It may be easier to start with just counts, stopped and running states. Take note that this is an array, where each element in the array has a unique asset. This allows you to send multiple order-progress for multiple asset in a single message.

Sending to the MQTT Broker

DO NOT send order progress at an interval less than one minute. For best results, order progress is sent every minute.

The topic to publish on is constructed as per the following, replacing ENV, TENANT and THINGNAME with those that apply for you

$aws/rules/ENV_edge_data/TENANT/THINGNAME/order-progress
e.g $aws/rules/production_edge_data/bottling/TillitEdge-717503/order-progress
    $aws/rules/stage_edge_data/bakery/TillitEdge-a0163b/order-progress

You can find your thingName contained in the same file as the certificates supplied to you. You can also contact support to track down the thingName for you.

Now follow these steps to successfully simulate order progress

Find an asset to add order-progress to and record it's ID.

Ensure an order is in the RUNNING state on the asset (only nessecary if orderId is not included in payload)

Publish the following payload on the topic specified prior (replace ids with yours and timestamp of today)

{
  "format": 'json',
  "body": [{
    "assetId": 2,
    "timestamp": "2022-06-30T05:28:40.273Z",
    "totalCount": 10,
    "EQUIPMENT_STATUS_RUNNING": true,
    "EQUIPMENT_STATUS_STOPPED": false
  }]
}
	

You can now see progress on the order and asset card inside TilliT

For a more raw view, you can navigate to History -> Orders and select the order that was running on the asset

Scroll and click on the Progress Pane, observe that there is a row with the order progress we sent via MQTT.

Last updated