01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
commission report
Also: network revenue csv
p202 conversion upload-revenue <file.csv>02What you get
--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 conversion upload-revenueSet flags below; the command updates as you type.
04Flags
5 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --amount-columnstring | The commission column: its header, or a 0-based column number (default: read from the header) |
| --dry-runbool | Read the report on the server and write nothing |
| --file-namestring | The name the upload is listed under (default: the file's name) |
| --force, -fbool | Upload without asking |
| --subid-columnstring | The subid column: its header, or a 0-based column number (default: read from the header) |
05How it works
Records each line of the report as a conversion of a new upload batch on its subid's click (source revenue_upload), at the line's commission. A click's lines in one report are summed, and the newest report replaces what earlier reports and conversions set for that click — so uploading a corrected report fixes the old one.
Columns are read from the header when it names them plainly (subid: sub id, click id,
t202…, aff_sub, sid; commission: commission, payout, revenue, amount, earning, sale,
income); name others with --subid-column/--amount-column (a header, or a 0-based column
number). The report is read on the server first (--dry-run stops there), then you confirm
(--force skips). Lines not recorded are listed with the reason, the first 1,000 of them, and
every skipped line is counted by reason. Unlike conversion import,
this is the UI's upload: one batch, values replacing earlier uploads, no transaction ids.
Needs a role with access_to_update_section and a key with conversions:write. At most 8 MB. Cannot be staged.
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands conversion upload-revenue --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 and cannot be staged:
--stagedis refused before anything is sent. Have a person run it, or give the agent a key without write scope.
{
"path": "p202 conversion upload-revenue",
"use": "upload-revenue <file.csv>",
"short": "Record a network's revenue report, a CSV of subid and commission (the UI's Upload Revenue Reports)",
"long": "Records each line of the report as a conversion of a new upload batch on its subid's\nclick (source revenue_upload), at the line's commission. A click's lines in one report are\nsummed, and the newest report replaces what earlier reports and conversions set for that\nclick — so uploading a corrected report fixes the old one.\n\nColumns are read from the header when it names them plainly (subid: sub id, click id,\nt202…, aff_sub, sid; commission: commission, payout, revenue, amount, earning, sale,\nincome); name others with --subid-column/--amount-column (a header, or a 0-based column\nnumber). The report is read on the server first (--dry-run stops there), then you confirm\n(--force skips). Lines not recorded are listed with the reason, the first 1,000 of them, and\nevery skipped line is counted by reason. Unlike `conversion import`,\nthis is the UI's upload: one batch, values replacing earlier uploads, no transaction ids.\n\nNeeds a role with access_to_update_section and a key with conversions:write. At most 8 MB.\nCannot be staged.",
"runnable": true,
"example": "p202 conversion upload-revenue march.csv --dry-run\n p202 conversion upload-revenue march.csv --subid-column 'Sub ID 2' --amount-column Commission\n p202 conversion upload-revenue report.csv --subid-column 0 --amount-column 3 --force --json",
"tasks": [
{
"run": "p202 conversion upload-revenue",
"ui_pages": [
"Update › Upload Revenue Reports"
],
"phrases": [
"commission report",
"network revenue csv"
]
}
],
"flags": [
{
"name": "amount-column",
"type": "string",
"default": "",
"usage": "The commission column: its header, or a 0-based column number (default: read from the header)",
"required": false
},
{
"name": "dry-run",
"type": "bool",
"default": "false",
"usage": "Read the report on the server and write nothing",
"required": false
},
{
"name": "file-name",
"type": "string",
"default": "",
"usage": "The name the upload is listed under (default: the file's name)",
"required": false
},
{
"name": "force",
"shorthand": "f",
"type": "bool",
"default": "false",
"usage": "Upload without asking",
"required": false
},
{
"name": "subid-column",
"type": "string",
"default": "",
"usage": "The subid column: its header, or a 0-based column number (default: read from the header)",
"required": false
}
]
}