push_lead_outcomes
Write the real outcome of leads back into ADS Beast so the ad platforms learn which leads became sales. Each row names a lead by lead_id, email or phone, and its outcome. dry_run defaults to true and reports what would change without writing; run it first. Unmatched rows are skipped unless create_missing is true. The lead's stage follows the outcome unless update_stage is false.
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>"
},
"name": "push_lead_outcomes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Outcome rows, for example [{"lead_id": 812, "outcome": "won", "reason": "signed"}]. For outcome paid add value (amount), currency (ISO 4217) and plan, e.g. {"external_lead_id": "u-1", "outcome": "paid", "value": 690, "currency": "UAH", "plan": "Pro"}. Accepted field names and outcome values come from lead_outcome_contract. | |
| dry_run | No | True reports what would change and writes nothing. False applies the rows. | |
| client_id | No | Client the rows belong to. Optional with a key bound to one client - that client is used. | |
| update_stage | No | Move a matched lead's pipeline stage to match the outcome, for example to won or lost. | |
| source_system | No | Name of the system the outcomes came from, recorded on each row. | mcp |
| create_missing | No | Create a new lead for a row that matches none. Off by default: a typo in an email must not insert a record. |