register_trigger
Set up a real-time trigger to watch a data source for a threshold condition. When the threshold is met, the trigger runs a simulation template and can post results or auto-execute the decision plan.
Instructions
Register a real-time trigger that watches a data source for a threshold condition. The engine evaluates the condition automatically when the source data updates; when the threshold is met it runs the simulation template and POSTs a result summary to webhook_url if set. auto_execute=true additionally dispatches the full DecisionPlan to execution_webhook_url after every successful fire (same payload format as execute_decision, through the execution-policy gates). Examples: 'alert me when monthly revenue drops below $80k', 'simulate expansion if Downtown revenue exceeds $200k'. Use fire_trigger to test it immediately and delete_trigger to remove it. Returns trigger_id, name, status, condition, and created_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable trigger name. | |
| condition | Yes | Threshold condition to watch. | |
| description | No | Human-readable description of what this trigger monitors. | |
| webhook_url | No | Optional HTTPS URL to POST results to when the trigger fires. | |
| auto_execute | No | When true, automatically dispatch the decision plan to execution_webhook_url after the trigger fires. | |
| simulation_template | Yes | SimulateRequest-compatible payload to run when trigger fires. | |
| execution_webhook_url | No | Optional HTTPS URL to POST the DecisionPlan execution payload to when auto_execute is enabled. |