cogs_upload
Bulk-update COGS (cost of goods sold) and related product fields for one venue, then recompute historic COGS transactions. This MUTATES seller data and is gated: the first call returns a summary of what will change and does nothing. The confirmation is a HUMAN checkpoint — present the returned summary and warnings to the seller and get their explicit approval before re-calling with confirmed=true. Never set confirmed=true without the seller's approval.
venueId is required. Provide rows, each with an msku plus the values to set. Rows whose msku does not exist in the venue are skipped (reported, never written).
The columns list declares which fields you are writing — ONLY listed columns are touched; any column you do not list is left completely untouched for every SKU (this prevents wiping data you did not intend to change). Allowed columns: "COGS", "LEAD TIME", "SL PRODUCT GROUP". If omitted, columns defaults to ["COGS"].
Clearing: for "LEAD TIME" and "SL PRODUCT GROUP", a listed column with a null/blank value in a row CLEARS that field for that SKU. So only list a column if you intend to write it for every row. "COGS" cannot be cleared — a null cost of goods is ignored (left unchanged).
When COGS is written, up to 3 years of historic COGS transaction amounts are recomputed for the affected SKUs. Aggregated profit reports that read pre-computed pivot data refresh on the next settlement import, so they may reflect the old COGS until then (same behavior as the web app's bulk upload page).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rows": "<rows>",
"venueId": "<venueId>"
},
"name": "cogs_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Rows to update. Each row needs an msku plus the values for the columns being written. | |
| columns | No | Which columns to write: any of "COGS", "LEAD TIME", "SL PRODUCT GROUP". Columns not listed are left untouched. Defaults to ["COGS"]. | |
| venueId | Yes | Venue ID whose products are being updated (required). | |
| confirmed | No | Set to true to apply the changes. When false/omitted, the tool returns a summary of what would change and applies nothing. |