hermosodocs

revenue_by_source

Revenue by source (posts, ads, emails) read-only

Area: REVENUE ATTRIBUTION · Ad campaign management. Generated from the running MCP server, like the rest of the tool reference.

Description

Which posts, ads and emails led to actual sales: the brand's payments (Shopify orders and Stripe charges, whichever is connected) matched back to what Hermoso published or sent, with revenue, payments and customers per channel, campaign, single post/ad/email (groupBy item) or match method. Each payment is matched ONCE, strongest first, and says how: utm (a Hermoso tracking id on the visit), reference (a Hermoso id on a Stripe checkout), code (a discount code Hermoso created, or one you name in codes), ad_utm (the UTM tags Hermoso puts on ads it builds), tag (Hermoso's tags without an id) — these LED TO the sale; email (the buyer is someone Hermoso emailed or who replied, within emailWindowDays before paying) and referrer (the visit came from a social platform the brand posts to) are looser matches, never causation. The unattributed remainder is stated plainly. GA4's own attribution of purchases to Hermoso's tags and the ad platforms' own reported conversions (Meta, Google Ads) are shown APART, never added in: they can describe the same sales again. Money is per currency, never summed across currencies. A source that could not be read is said as such, never as zero sales. Default: the last 30 days (Shopify lets apps read its last 60). Read-only, free. Links carry Hermoso's ids only when tracking links are on (set_tracking_links).

Parameters

ParameterTypeDescription
sincestringstart date, YYYY-MM-DD; default 30 days before until
untilstringend date, YYYY-MM-DD; default today
daysnumberthe last N days, instead of since
groupBy"channel" | "campaign" | "item" | "method"channel (default), campaign, item (one row per post, ad, email or code) or method
sources"shopify" | "stripe" | "ga4" | "email" | "ads"[]which to read; default all that are connected
codesstring[]more discount or promotion codes to count as Hermoso’s
emailWindowDaysnumberhow many days after an email a payment still matches the person; default 30, at most 90
includeTestbooleantrue to count Shopify test orders
ga4Propertystringwhich shared GA4 property, e.g. properties/123; default the first shared one
googleAdsCustomerIdstringwhich Google Ads account for platform-reported conversions
platformReportedbooleanfalse to skip the ad platforms’ own reported conversions

Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/revenue_by_source.

MCP (tools/call)

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"revenue_by_source","arguments":{}}}

CLI

hermoso call revenue_by_source --json '{}'

Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.

All 759 Ad campaign management tools · tools.json