01Run it
Replace the <placeholders> with your own values, or use the builder below.
p202 attribution model update <id>02What you get
Pick the shape you need. People get a table. Add
--json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 attribution model updateSet flags below; the command updates as you type.
04Flags
6 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --defaultbool | Make this the account default model |
| --lookback-daysint ยท default 30 | Days before a conversion whose clicks can earn credit, 1-365 |
| --model-namestring | Model name |
| --model-typestring | Type: last_touch, first_touch, linear, time_decay, position_basedlast_touchfirst_touchlineartime_decayposition_based |
| --statusstring | Status: active, inactiveactiveinactive |
| --weighting-configstring | Weighting config JSON object: time_decay {"half_life_hours":48}, position_based {"first_weight":0.4,"last_weight":0.4} |
05For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands attribution model update --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
- This command writes. Add
--stagedto record it as a proposal a person applies withp202 change apply.
{
"path": "p202 attribution model update",
"use": "update <id>",
"short": "Update an attribution model (changing its type resets its weighting config to that type's defaults)",
"runnable": true,
"flags": [
{
"name": "default",
"type": "bool",
"default": "false",
"usage": "Make this the account default model",
"required": false
},
{
"name": "lookback-days",
"type": "int",
"default": "30",
"usage": "Days before a conversion whose clicks can earn credit, 1-365",
"required": false
},
{
"name": "model-name",
"type": "string",
"default": "",
"usage": "Model name",
"required": false
},
{
"name": "model-type",
"type": "string",
"default": "",
"usage": "Type: last_touch, first_touch, linear, time_decay, position_based",
"allowed_values": [
"last_touch",
"first_touch",
"linear",
"time_decay",
"position_based"
],
"required": false
},
{
"name": "status",
"type": "string",
"default": "",
"usage": "Status: active, inactive",
"allowed_values": [
"active",
"inactive"
],
"required": false
},
{
"name": "weighting-config",
"type": "string",
"default": "",
"usage": "Weighting config JSON object: time_decay {\"half_life_hours\":48}, position_based {\"first_weight\":0.4,\"last_weight\":0.4}",
"required": false
}
]
}