Skip to content
  • There are no suggestions because the search field is empty.

How to create a count-based trigger using the conditional expression for the rated speed

Build a trigger that fires on unit counts instead of time, using the product's rated speed so the check lands at roughly the same interval whatever the line is running.

What you'll build

  • A Job trigger that repeats every so many units, rather than every so many minutes.
  • A condition on the product's rated speed, so the count interval matches the product on the line.

Step 1 — Work out the count you want

A count-based trigger fires on units produced. To turn that into an hourly check, use the product's rated speed: a product rated at 1000 units an hour needs a trigger every 1000 units.

Products running at different speeds need different counts, which is what the conditional expression sorts out. One product per trigger, all on the same alert.

Step 2 — Add a Job trigger

In the Triggers tab, select Job and click the + button.

Step 3 — Set the repeat and units

In the General tab, toggle on Repeat, enter the number of units — 1000 in this example — and select the Units, for example In.

Step 4 — Select the lines

Choose the Lines the trigger applies to, and the Services that should deliver the message if the alert needs to notify someone.

Step 5 — Add the conditional expression

Click the Conditional Expression tab, toggle it On, and enter:

jobmeta["ratedSpeed"]==1000

This checks the ratedSpeed value stored against the product in your Product List. Replace 1000 with the actual rated speed for the product this trigger is for.

Step 6 — Save

Click Update, then Save on the page. The dialog's own button stages the change; the page-level Save commits it.

Test it

Run a job on a product with the rated speed you used in the condition and let it produce past the unit count. The alert should fire, then repeat at each multiple of the count.

If it fires on the wrong products, check the rated speed recorded against those products in the Product List rather than the trigger. If it fires on no products at all, check that the expression is not sitting empty — an enabled conditional expression with nothing in it is never true.

Adapting it to your own products

  • Add a second trigger to the same alert for each rated speed you run. Trigger 1 might be jobmeta["ratedSpeed"]==1000 repeating every 1000 In, trigger 2 jobmeta["ratedSpeed"]==500 repeating every 500 In. One alert, one form, correct timing on every product.
  • For a half-hourly check rather than hourly, halve both the repeat count and the value in the condition.
  • If a product's ratedSpeed is blank in the Product List, no trigger matches it and the check never happens on that product, with no error and nothing to indicate a gap. Adding a SKU to a product list is not enough on its own — the metadata the condition reads has to be filled in too.

A full list of variables is available in the Alert Variables article.