Autopilot payback actions
get_payback_actionsWhat Loop's Autopilot would do from the revenue ledger's take-home payback, per campaign (scope campaign) and per Apple Ads keyword (scope keyword, keywordRef): verdict pause (campaigns only), lower_bid (Apple Ads keywords only) or hold, with code, a short reason and the numbers used (spend, currency, netRevenue in the spend currency, payers, trials, payback, costPerPayer, taps). It never proposes more spend, a resume or anything new. Spend is settings.windowDays (28) days ending settings.settleDays (3) days ago (since, until); payments of trials started in that window are counted through today, so a trial that converts after the window still counts. Codes: zero_payers (no payer after spend reached settings.killSpendMultiple × settings.targetCostPerPayer), below_line (enough payers and payback below settings.paybackLine), and on hold: pays_back, not_enough_payers (fewer than settings.minPayers and spend below settings.enoughSpendMultiple × the target), maturing (half or more of the trials still open), not_measured, no_spend, unconverted_currency, no_exchange_rate (the target cost per payer cannot be put into the spend's currency), lower_bound (keyword payback is only a lower bound, checked before any cut), attribution_incomplete (under settings.minAttributedShare of the channel's payers, counting payers linked to no campaign unless they cannot be the channel's: Google Play buyers for Apple Ads, signup answers that name another kind of channel, such as social for Apple Ads, and payers whose events list the channel in notFromChannels; checked before any pause), no_taps, bid_at_floor, feed_stale (the ledger counts the workspace's own revenue sender and nothing has arrived for over 36 hours, so every pause and lower_bid is held). On lower_bid, bid gives avgCpt (keyword spend ÷ taps), proposed = avgCpt × payback ÷ paybackLine rounded to the currency, never below floor (the larger of settings.minBid and avgCpt × (1 − settings.maxBidCut)). targetCostPerPayer is appProfile.paybackActions.targetCostPerPayer, else the guardrail's max cost per purchase in the workspace currency, else null (then only payback decides). Settings are set with appProfile.paybackActions in PATCH /api/{workspace}/config. The periodic cycle writes each pause and lower_bid as a change waiting for a person's approval (a lowered bid only when it is below the keyword's current max bid), not again for the same target while one waits or within 7 days of a person's decision on it; a waiting proposal is withdrawn when a later run no longer calls for it or calls for a different amount (then proposed again under a new id). A keyword cut waits while its campaign's pause proposal waits or was approved. Approval runs as a preview unless the workspace is armed for live changes. Money in (revenue) and payback are take-home: after store fees and refunds, so payback compares what the advertiser keeps with spend. Events sent before store fees (amountIsNet false) are reduced by the workspace's fee rate for their store, refunds by the same rate, before any currency conversion; amounts are shown rounded to the currency's smallest unit, payback is computed before rounding. Rows, totals, keyword rows and weeks carry takeHomeBasis (null when no event has an amount): takeHomeBasis.kind says where the take-home figure comes from: net_reported (sent after store fees), net_estimated (sent before fees, reduced by the workspace's store fee rate), net_mixed (both), gross or gross_mixed (not converted to take-home); takeHomeBasis.storeFees lists the rate used per store, isDefault true when it is Loop's default estimate (App Store 15%, Google Play 15%, Stripe 3.6%, other 0%) because the workspace set none (appProfile.storeFeeRates in PATCH /api/{workspace}/config). Taxes are not deducted, and the workspace's current rates are applied to past purchases too.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_payback_actions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||