Revenue diagnosis
get_revenue_diagnosisRead the revenue ledger as verdicts: for each path, whether it pays back (at least 1.1× on take-home money in), is below the line, is below even at its upper bound, could cross the line depending on money in excluded for lack of an exchange rate (unconverted_currency, see excludedRevenue), or is unmeasured; where it is stuck (the ad, the store page, or the purchase); and how far the network's own report is from the advertiser's revenue. creatorSignupCost counts from each creator's start date and gives each creator code's cost per signup (paid, and with planned payments) and the total, judged against the workspace's line; with fewer signups than minSignups the verdict is not_enough_signups rather than a guess. stagedTestGuard (null when the workspace has no staged ad test) judges the test's stop lines every day from its first day, on ad spend per trial: totals.trialCostJpy is totals.judgedSpendJpy divided by totals.trials (production trial starts tied to a test campaign on a planned platform, by name or by the platform's id, each user once; null when there are none), both counted through judgedThrough, the last day every platform delivering the test has sent its spend rows (a platform whose test campaigns are all stopped is not waited for). It is read from day plan.trialCostFromDay against plan.trialStopAboveJpy and plan.trialScaleAtOrBelowJpy, comparing the unrounded figure. holdReasons (spend_rows_missing, spend_not_in_jpy, trials_without_spend) say why neither cost line is read yet; notes (trial_sources_mixed, channel_not_awaited) do not change the verdict. Verdicts: stop (with reasons: daily_cap, month_total, cost_per_trial above the stop line or no trials once spend passes it, day2_zero_trials), hold, eligible_to_scale (ad spend per trial at or below the scale line after plan.minDays; Loop does not raise the budget), not_started or not_enough_data. judgedOn says which figure the verdict used. totals.costPerPayerJpy (spend per added paid subscriber) is shown beside it against plan.scaleAtOrBelowJpy and plan.stopAboveJpy, and decides the verdict (stop reason cost_per_payer) only when trials are not tied to campaigns (adTrialsMeasured false). Its campaigns are the ones whose names start with the plan's campaignNamePrefixes. On stop, stopProposal says what the periodic cycle does: pause_proposed (one pause proposal per running test campaign, waiting for a person to approve), or no proposal: outside_test_window (the reasons in proposalReasons are only acted on through the last test day, month_total through its month), no_matching_campaign or already_paused. Spend lines count only the test campaigns' spend; the daily_cap line applies through the shortest test length. creatorSignupQuestion (null when the workspace has no such question) answers its dated question from the creator subtotal (creatorTotal, paid plus planned yen ÷ signups): at_or_below_line, up_to_ceiling or above_ceiling, or, with no figure made up, no_cost, no_signups, signups_not_counted, cost_not_in_jpy or no_creators; thin is true below minSignups. keywords judges Apple Ads keywords with the same verdicts: scope campaign (one keyword in one campaign, campaignKey and keywordRef) and scope all_campaigns (the same keyword text summed across two or more campaigns). thin is true below 3 payers, and such a payback is not a verdict to act on. With lowCoverage the payback is a lower bound: the verdict is pays_back only if even the lower bound clears the line, otherwise unmeasured. A partial all_campaigns row (excludedCampaignKeys) is always unmeasured. A keyword to review is verdict below_line with thin false. splitVerdict is true when a campaign's own verdict and the all-campaign verdict are both settled (pays_back or below_line, not thin, not maturing) and on opposite sides of the line. trend gives the last 8 weeks whatever days is, and is there even when the days window has no purchase (null only when none of those weeks has a purchase event): weeks lists each week's from and through, 7 UTC days ending today or a multiple of 7 days before, oldest first, so the newest week is the 7-day window. trend.total (ad platforms and unattributed purchases), trend.creatorTotal and each of trend.rows (kind, key, channel as in rows) have one entry per week with cost, revenue, trials, openTrials, payers, payback and the same fields as the ledger. A person counts as a payer once, in the week of their earliest first payment; a later first_payment of the same person adds money in but no payer. When a channel with linked money in that week has no confirmed spend through the week's end, its rows and trend.total have payback null, paybackNullReason spend_not_covered and the channel in spendNotCovered (missing spend is not read as zero). A creator week counts what was paid and what came in that week (not from the creator's start); a payment made before the creator started sits in the week it was paid, and weeks before the start with no payment are null. thin is true below 3 payers and that week's payback is not to be read, except a week with spend, no payers and no money in, which is a settled 0. maturing is true when at least half of the week's trials started in the last 7 days and have no outcome yet. storePage is the store's own product-page funnel the advertiser sends (POST /api/{workspace}/store-funnel), null when none was sent in the last 35 days (or it could not be read): not measured, never zero. windows has a 7-day and a 28-day window ending on lastReportedDate, the last day the store reported (whatever days is), each with daysReported, total and sources[] per platform and sourceType (search = App Store search, browse = App Store browse, app_referrer = another app such as Instagram or Facebook, web_referrer, other): impressions, pageViews, uniquePageViews (a sum of daily unique counts), firstDownloads, pageToDownloadRate (firstDownloads ÷ pageViews) and impressionToPageRate (pageViews ÷ impressions, search and browse only; null on total). Each rate is summed only over the days that reported both of its numbers; pageToDownloadDays and impressionToPageDays say how many, and pageToDownloadPartial / impressionToPagePartial are true when that is fewer than daysReported. A count the store did not report is null, not zero. Apple drops small cells, so every count is a lower bound and rates on low volumes are biased low. tooFewToJudge is true when the page views behind pageToDownloadRate are below minPageViews (30); such rates are shown but not judged. stale is true when lastReportedDate is more than 3 days before the ledger's end: the numbers are old (stale since lastReportedDate) and no rate is put on rows. In search and browse people can download from the results without opening the page, so pageToDownloadRate there, and on total, can be above 1. On a row whose bottleneck is store, rows[].storePage gives the measured page → download rate for the source that path arrives from (Meta: app_referrer, Apple Ads: search; iOS), from the 7-day window when days is 7 or less and the 28-day window otherwise, with pageToDownloadDays, pageToDownloadPartial and tooFewToJudge. scope source_type means it is the rate of all store traffic of that source, not the campaign's own (an Apple Ads campaign is only part of search, and Meta clicks also include Android), so it is context, not a verdict on the path. rows[].storePage is null on other rows, paths without a matching source, and when storePage is stale. 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. Loop does not change the ads from these verdicts without an approval, and never raises a budget from them.
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_revenue_diagnosis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Window in days ending today (UTC). Defaults to 28. |