| name | clari-webhooks-events |
| description | Monitor Clari forecast changes using export job polling and change detection.
Use when tracking forecast submission changes, building alerts
for significant forecast movements, or syncing Clari data in near-real-time.
Trigger with phrases like "clari webhooks", "clari notifications",
"clari forecast alerts", "clari change detection".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(python3:*) |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","revenue-intelligence","forecasting","clari"] |
| compatibility | Designed for Claude Code |
Clari Webhooks & Events
Overview
Clari does not provide real-time webhooks. Instead, build change detection by comparing periodic exports. This skill covers scheduled export diffing, Slack alerts for forecast movements, and Copilot webhook integration.
Instructions
Step 1: Forecast Change Detection Pipeline
import json
from pathlib import Path
from datetime import datetime
def detect_changes(
current: list[dict],
previous: list[dict],
threshold_pct: float = 10.0,
) -> list[dict]:
prev_map = {e["ownerEmail"]: e for e in previous}
changes = []
for entry in current:
prev = prev_map.get(entry["ownerEmail"])
if not prev:
continue
prev_fc = prev["forecastAmount"]
curr_fc = entry["forecastAmount"]
if prev_fc == 0:
continue
change_pct = ((curr_fc - prev_fc) / prev_fc) * 100
if abs(change_pct) >= threshold_pct:
changes.append({
"rep": entry["ownerName"],
"previous": prev_fc,
"current": curr_fc,
"change_pct": round(change_pct, 1),
: change_pct > ,
: datetime.utcnow().isoformat(),
})
(changes, key= x: (x[]), reverse=)
():
Path(path).parent.mkdir(exist_ok=)
(path, ) f:
json.dump(entries, f)
() -> []:
:
(path) f:
json.load(f)
FileNotFoundError:
[]