Alert Rules
Alert Rules let you define automatic notifications when a learner metric crosses a threshold. Rules are evaluated once per hour by a background job.
Go to Thinkific Command Center → Alert Rules to manage rules and evaluator settings.
Creating a rule
- Enter a rule name — this appears in notification messages.
- Choose a condition — the metric to watch.
- Choose an operator — whether to trigger above or below the threshold.
- Enter a threshold — the numeric value that activates the rule.
- Choose an action type — how to notify.
- Enter an action target — the email address or URL to send to.
- Set a cooldown — minutes to wait before the rule can fire again.
- Click Add Rule.
The rule is active immediately and will be evaluated on the next hourly run, or you can trigger a manual run from the evaluator settings.
Conditions
| Condition | What it measures |
|---|---|
high_risk_count | Number of learners with high risk status |
at_risk_count | Number of learners with at-risk status |
inactive_30_plus | Number of learners with no activity for more than 30 days |
no_attribution_count | Number of learners with no marketing source recorded |
queue_size | Total learners currently in the intervention queue |
Operators
| Operator | When it triggers |
|---|---|
≥ (gte) | When the metric is greater than or equal to the threshold |
≤ (lte) | When the metric is less than or equal to the threshold |
Use ≥ to alert when a problem is growing — for example, when the high risk count reaches 10.
Use ≤ to alert when a metric falls below an expected floor — for example, when queue size drops to 0 as confirmation a retention workflow completed.
Action types
Email
Sends a plain-text notification to the specified address.
- Enter a valid email address as the target.
- If the target is left empty, the notification goes to the WordPress site admin email.
- Delivery depends on your site's mail configuration. Test with a known-good address first.
Slack
Posts a message to a Slack channel via an Incoming Webhook URL.
- Enter your Slack Incoming Webhook URL as the target (e.g.
https://hooks.slack.com/services/...). - Set up an Incoming Webhook in your Slack app settings — you get one URL per channel.
- The message includes the rule name, condition, current metric value, and timestamp.
Webhook
Posts a JSON payload to any HTTPS endpoint.
- Enter a valid HTTPS URL as the target.
- The request is a
POSTwithContent-Type: application/json. - Payload fields:
rule_name,condition_key,operator_key,threshold,metric,fired_at.
Cooldown
The cooldown prevents a rule from firing repeatedly while the condition remains true.
- Measured in minutes. Minimum: 1 minute. Default: 60 minutes.
- A rule that fires at 09:00 with a 60-minute cooldown cannot fire again until 10:00, even if the metric stays above the threshold.
Set a longer cooldown for conditions that persist over hours (high risk counts rarely recover quickly). Set a shorter cooldown for conditions that are expected to fluctuate.
Evaluator settings
The evaluator runs once per hour. You can also run it manually from the Alert Rules screen.
| Setting | Description |
|---|---|
| Enable evaluator | Master on/off for the hourly job |
| Dry-run mode | Rules are evaluated and logged but nothing is dispatched |
| Enable live dispatch | Secondary gate — when off, dispatches are blocked even if dry-run is off |
Recommended setup when testing
- Enable the evaluator.
- Leave dry-run mode on.
- Add a rule and click Run now.
- Review the evaluator log to confirm the rule matches as expected and would dispatch to the right target.
- When satisfied, turn off dry-run and enable live dispatch.
Evaluator log
The log shows the last 200 evaluator run entries. Each entry records:
- Timestamp
- Number of rules processed and matched
- Dispatch outcome per matched rule:
sent,failed,blocked,cooldown_active, ordry_run
Troubleshooting
Rule fires but no notification arrives
- Confirm Enable live dispatch is on.
- Verify the target is a valid email address or HTTPS URL.
- For email: test your site's mail configuration independently first.
- For Slack/webhook: confirm the URL is reachable from your server and that the endpoint is accepting POST requests.
Rule is not triggering
- Confirm the rule is Active in the rules list.
- Confirm the evaluator is enabled in evaluator settings.
- Run the evaluator manually and check the log — it shows the current metric value and whether the condition matched.
- Check whether a cooldown is blocking the rule (the log will show
cooldown_active).
Evaluator cron is not running
WP-Cron is triggered by site traffic. On low-traffic or staging environments it may not run on schedule. Use a system cron to call wp-cron.php directly:
* * * * * curl -s https://yoursite.com/wp-cron.php > /dev/null
Verify the cron event is registered with WP-CLI:
wp cron event list | grep bb_tfo_pro_alert_eval_event