CLI command
decisions
The GTM decision register: what was decided about a product, why, by whom, and the records it rested on.
Invocation#
echo-cli decisions list --product <id>
echo-cli decisions add --product <id> --decision <text> --rationale <text> [--link <kind>:<id>]... --by <name>
echo-cli decisions show <decision-id>Inputs and output#
list writes the product's decisions, newest first: id, product_id, decision, rationale, links (each { kind, id }), decided_by and decided_at. add writes the decision it recorded. show writes the decision with linked, every link with the record as it is stored now under record, and gone, the links whose record has been removed since.
State effect#
Every verb calls Echo Web's authenticated /api/analytics/decisions or /api/analytics/decisions/<id> with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the GTM decisions section of the tracking screen and the GTM decisions section of Echo Desktop's GEO screen (links typed one kind:id per line) call the same operations, and echo-mcp reads decisions (echo_list_decisions, echo_show_decision) but cannot record them. A link's kind is one of experiment, report, campaign, ad_campaign, mmm_fit, objective or approval, and its id is the record's id as experiments, tracking reports list, outreach, paid-ads, mmm list, okr list or approvals list prints it. Each link is read before the decision is stored, so a decision can only rest on records that exist; --link may be repeated and a decision may rest on none. A decision is never edited or removed: a later decision supersedes it. show reads every linked record on each call, so it prints the experiment's result, the report or the fit as stored now, never a copy taken when the decision was made.
Refusals#
- A wrong invocation is refused before anything is sent: "decisions takes list --product <id>; add …; show <decision-id>; got <word>", "decisions list needs --product <id>", "decisions list takes only --product; got …", "decisions add does not take <flag>; it takes --product, --decision, --rationale, --by, --link", "<flag> needs a value", "decisions add needs <flag>" for each of --product, --decision, --rationale and --by, "--link takes <kind>:<id>, such as experiment:<id>; got <text>", "decisions show needs a decision id, as decisions list prints it" and "decisions show takes only the id; got …".
- Echo Web answers a bad request with "product_id is required: the product the decision is about", "decision is required: what was decided", "rationale is required: why, in words", "links is required: the records the decision rests on, [] when it rests on none", "link <n> has kind <kind>; a decision rests on experiment, report, campaign, ad_campaign, mmm_fit, objective, approval", "link <n> (<kind>) names no id" or "decided_by is required: an internal caller has no signed-in user, so it names who is acting"; and not found with "no product has id <id>; echo-cli products lists the ones that exist", "the decision rests on <kind> <id>, which <table> does not hold" (nothing is stored) or "no decision has id <id>; echo-cli decisions list --product <id> lists them". The command prints Echo Web's sentence and exits non-zero.