Run triggers
Map external events to workflows: matching, payload filters, name and dedupe templates, prefilled steps, claim SLAs and escalation.
A run trigger connects an event your system sends to work a person does: when this event arrives, create this run, prefilled with this data, in this team's queue. This article follows one example, a shipment arriving at a warehouse, through everything a trigger can do.
Anatomy of a trigger
The running example: your ERP announces event whenever a truck arrives. You want each shipment to become a Receiving Inspection run, prefilled with the shipment's data, waiting in the warehouse team's queue.
ERP posts shipment.received
Trigger rule matches
Run created, prefilled
Warehouse queue
Worker claims and runs it
Completion event back to ERP
Every section below uses this one event. Here is the payload the ERP sends, which the rest of the article keeps pointing back to:
The example event
Triggers are configured in
Integrations, under Run Triggers
Event name matching and source scoping
The WHEN of a trigger is an exact, case-sensitive event name: this trigger fires on event and nothing else. Two more settings narrow it down:
Source scoping. By default a trigger listens to every source. Scope it to one source and a event from your staging ERP will not create production runs.
Multiple triggers per event. Several triggers can listen to the same event name and each creates its own run. Damaged shipments can spawn both an inspection run and a supplier claim run.
Unmatched events are not errors
An event with no matching trigger is stored, marked unmatched, and raises event. Point a notification rule at that type while you connect a new system and you will catch typos in event names the minute they happen.
Payload filters
The IF of a trigger is a set of conditions on the payload, and all of them must hold. For the shipment example:
Paths address nested fields with dots, like path. Filters fail closed: a missing field means no match, so a malformed event can never create a half-configured run.
The operators are the same eleven used by notification rules, documented in
the notification rules article
Name, reference and dedupe templates
Templates pull payload values into the run's identity. A token is a payload path in double curly braces; unresolved tokens stay visibly raw instead of disappearing, so a wrong path is easy to spot:
The three templates, with results
Run name. What the team sees in the queue. Lead with the human-meaningful bit, like the shipment id.
External reference. Your system's id for the work, carried on the run and returned in every event about it, so your ERP can match completions back to its own records.
Dedupe key. If a new event renders the same dedupe key as an open queued run from the same trigger, no second run is created. An ERP that sends the same event twice will not create double work.
Watch out for over-broad dedupe keys
A dedupe key of token would collapse every shipment from the same supplier into one run. Build the key from what makes the work unique, usually the entity id.
Priority, claim SLA and escalation
A trigger gives each run a priority (low, normal, high, critical), which sets its place in the queue's default order. Damaged-goods triggers create critical runs; routine cycle counts create low ones.
The claim SLA is the trigger's answer to work sitting unclaimed. Set it in minutes:
If nobody claims the run in time, it is escalated and raises event. The run stays claimable; escalation adds urgency, it does not reassign.
Point a notification rule at that event to ping managers in Slack, or SMS for urgent work. Without a rule, escalation is still visible on the queue dashboard.
Field mappings and the three modes
Mappings are the prefill: each one connects a payload path to one input step of the workflow, so the worker starts with your system's data already in place. Four step types can be prefilled: short text, long text, number, and date.
For the Receiving Inspection workflow:
Example mappings
Each mapping has a mode, and the mode is exactly what the worker experiences:
Mode
What the worker sees
The field arrives filled in but behaves like any input: the worker can correct it and move on. If they change it, the difference is recorded as a deviation. The default.
The value is displayed but cannot be changed, and the server rejects any attempt, not just the UI. For facts the worker should see but never touch, like the supplier name.
The value is filled in, but the step will not complete until the worker explicitly confirms it, either as-is or after correcting it. For numbers you want a human to actually check, like the pallet count.
Confirm is where deviations come from
When a worker corrects a confirm or editable value, OpsBrain records what your system said next to what the worker found, and reports both in the completion event. That comparison is often the most valuable data the integration produces.
Sample payloads and automatic suggestions
You do not have to type payload paths from memory. Before configuring the trigger, have your system send one representative event to path, same auth and body shape as the real endpoint. Samples are stored for the mapper and never create runs.
With a sample in place, the trigger builder shows your actual fields with their values, previews every template against them, and suggests mappings by matching payload paths like path to compatible workflow steps. You confirm or adjust each one; they are a starting point, not a final answer.
Republishing and needs review
Mappings point at specific workflow steps, and workflows evolve. When a workflow edit removes or moves a mapped step, the trigger is flagged needs review instead of silently breaking or guessing:
The trigger stops creating runs and is clearly marked on the triggers page and on the integrations overview.
Open it and you see each mapping that lost its step, next to the workflow's current steps.
Point each mapping at the right step, or drop it, and save. The trigger resumes immediately.
Events that arrive while a trigger needs review are stored and marked unmatched, so you can see exactly what was missed while it waited for a human.