update_intervention
TRIGGER: Call WITHOUT asking when an existing intervention's details need correcting — a check date that should move, a note to add, a hypothesis to sharpen, or a threshold watch to attach. Interventions could previously only be created and closed, so a wrong check date stayed wrong and surfaced as due on the wrong day; closing and re-creating is NOT a workaround, because it discards the captured baseline snapshots and the applied date. NOTES APPEND by default with a date stamp, since corrections accumulate — pass notesMode:'replace' only to deliberately overwrite. Verdict and status are not editable here: closing goes through complete_intervention so post-fix snapshots and deltas are captured with it. EXAMPLE: update_intervention({interventionId: '63f81dc3-...', removeCheckDates: ['2026-09-22'], addCheckDates: ['2026-09-25'], notes: 'Moved the check to the 25th — the 22nd fell before the campaign had 14 days of runtime.'}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Note to record. APPENDED under a date stamp by default, preserving earlier corrections. | |
| watch | No | Attach (or with null, clear) a threshold watch evaluated on every get_briefing, so a breach SURFACES instead of being recomputed by hand. Shape: {metric:'orders'|'revenue', windowDays: 1-90, op:'lt'|'lte'|'gt'|'gte', threshold: number, note?: string}. Example: {metric:'orders', windowDays:3, op:'lt', threshold:55}. Windows cover COMPLETE days only (today is excluded), and a window the order sync does not fully cover reports as indeterminate rather than breached. | |
| _offset | No | Pagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page. | |
| notesMode | No | Default 'append'. Use 'replace' only when deliberately discarding the existing notes. | |
| checkDates | No | REPLACE the whole check-date set with these ISO dates (YYYY-MM-DD). To move a single date, prefer addCheckDates/removeCheckDates so the others cannot be dropped by accident. Cannot be combined with add/remove. | |
| hypothesis | No | Correct or sharpen why it was expected to work. | |
| description | No | Correct what was changed. | |
| addCheckDates | No | ISO dates to ADD, leaving the rest in place. Result is deduped and sorted. | |
| interventionId | Yes | The intervention to edit. Ids are per-shop — one from another store will not resolve. | |
| expectedMetrics | No | Replace the per-metric expectations, e.g. {orders: {deltaPercent: 10, direction: 'up'}}. | |
| removeCheckDates | No | ISO dates to REMOVE, leaving the rest in place. Pair with addCheckDates to move one date. |