p202 conversion mark-subids

Mark clicks converted from a list of subids, one per line (the UI's Update Subids)

Web UIUpdate › Update SubidsNew in 1.9.77Writescannot be staged
All commands

01Jobs it does

Each one is a real command line. Copy it, or open it in the builder below to change it.

Update Subids

p202 conversion mark-subids <file|->
Web UIUpdate › Update Subids

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 conversion mark-subids

Set flags below; the command updates as you type.

04Flags

1 flag, plus the global flags every command takes.

FlagWhat it does
--dry-runboolSay what each line would do and write nothing

05How it works

Records each subid's click as converted, at its campaign's payout, through the conversion ledger (source subid_upload) — once per click: a click that is already a lead is answered already_converted and nothing is added, so running the same list twice is safe.

The file holds one subid (a click id) per line; - reads the list from piped stdin. Every line is answered with its file line number: marked (would_mark with --dry-run), already_converted, not_found (no click of this account), not_a_subid, or duplicate_in_list. A long list is sent 1,000 lines a request; when one fails, the lines before it stand and running the command again marks the rest.

Needs a role with access_to_update_section and a key with conversions:write. Cannot be staged.

06For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands conversion mark-subids --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 and cannot be staged: --staged is refused before anything is sent. Have a person run it, or give the agent a key without write scope.
p202 commands conversion mark-subids --json
{
  "path": "p202 conversion mark-subids",
  "use": "mark-subids <file|->",
  "short": "Mark clicks converted from a list of subids, one per line (the UI's Update Subids)",
  "long": "Records each subid's click as converted, at its campaign's payout, through the conversion\nledger (source subid_upload) — once per click: a click that is already a lead is answered\nalready_converted and nothing is added, so running the same list twice is safe.\n\nThe file holds one subid (a click id) per line; - reads the list from piped stdin. Every\nline is answered with its file line number: marked (would_mark with --dry-run),\nalready_converted, not_found (no click of this account), not_a_subid, or duplicate_in_list.\nA long list is sent 1,000 lines a request; when one fails, the lines before it stand and\nrunning the command again marks the rest.\n\nNeeds a role with access_to_update_section and a key with conversions:write. Cannot be staged.",
  "runnable": true,
  "example": "p202 conversion mark-subids subids.txt --dry-run\n  p202 conversion mark-subids subids.txt\n  cut -d, -f2 network-report.csv | p202 conversion mark-subids - --json",
  "tasks": [
    {
      "run": "p202 conversion mark-subids",
      "ui_pages": [
        "Update › Update Subids"
      ]
    }
  ],
  "flags": [
    {
      "name": "dry-run",
      "type": "bool",
      "default": "false",
      "usage": "Say what each line would do and write nothing",
      "required": false
    }
  ]
}