p202 attribution model update

Update an attribution model (changing its type resets its weighting config to that type's defaults)

Writessupports --staged
All commands

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 formats

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 attribution model update

Set flags below; the command updates as you type.

04Flags

6 flags, plus the global flags every command takes.

FlagWhat it does
--defaultboolMake this the account default model
--lookback-daysint ยท default 30Days before a conversion whose clicks can earn credit, 1-365
--model-namestringModel name
--model-typestringType: last_touch, first_touch, linear, time_decay, position_based
last_touchfirst_touchlineartime_decayposition_based
--statusstringStatus: active, inactive
activeinactive
--weighting-configstringWeighting 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, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
  • This command writes. Add --staged to record it as a proposal a person applies with p202 change apply.
p202 commands attribution model update --json
{
  "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
    }
  ]
}