Cloud COGS and gross margin by product line
Allocate infrastructure to product lines and combine it with revenue from a sheet or warehouse table to track COGS and margin.
Runs in
Claude · Dashboard · Email
First optimization recommendation
The next day
ROI
Pays for itself with the first recommendation you act on

Playbook
What the agent does
From what Costory notices to what you decide. Costory suggests the next step in conversation, and you decide whether to go ahead.
Costory notices
Monthly close, or when COGS share moves.
Costory investigates
01
Allocate to products
A virtual dimension maps services and shared costs to product lines.
02
Bring revenue
Monthly revenue per product from Google Sheets or BigQuery.
03
Formula
Cloud cost as a percentage of revenue.
04
Report
A monthly margin report for finance.
Where you see it
Claude
You decide
Finance and product decide on pricing or optimization priorities.
Why it matters
Investors and boards ask for gross margin by product. Cloud COGS is usually the least reliable input.
Who it’s for
CFOs, finance, CTOs
Where it runs
Claude · Dashboard · Email
What you get
What lands in front of your team
Reliable COGS
Allocated, not estimated.
Margin trend
By product, month by month.
Board-ready
A number finance can defend.
Sources and assistants
What it connects
Data sources
Example prompts
Or drive it yourself
Build
Show cloud COGS as a percentage of revenue by product line for the last 6 months, using our revenue sheet.
FAQ
Questions about this playbook
Where do business metrics come from?
From Amplitude, BigQuery, Snowflake, Google Sheets, S3, Datadog, CloudWatch or metrics you push to Costory's API.
How long does this playbook take to set up?
Connecting your billing data and the Costory MCP takes under 30 minutes with Terraform or CloudFormation. The playbook itself takes minutes: pick the scope, the trigger and the Slack channel. The first billing data lands the next day, and the agent starts from there.
Can we adjust what the agent does?
Yes. You choose the trigger, the scope (team, service, environment), the channel and the format, and you can pause or change it at any time.
Does Costory change anything in our cloud accounts?
No. Costory reads billing exports and the metrics you connect, and has no write access to your cloud. Actions it takes create Costory objects only: alerts, reports, dashboards and events. Your team stays in control of every change.
Step-by-step guide in the Costory docs
Related playbooks
Run these alongside it
Costory notices
Monthly, or when a unit cost drifts beyond your threshold.
Track cost per customer, per request or per active user
Combine allocated cloud cost with your business and usage metrics to build unit costs that leadership can track over time.
See the playbook
Costory notices
Quarter end, or before a board meeting.
A board and exec cost pack in minutes
Total spend trend, top drivers, budget progress, unit costs and month-over-month comparison in one executive view.
See the playbook
Costory notices
The 11th of every month, after month n-1 is frozen.
Monthly chargeback pack by cost center, ready for finance
A monthly, frozen view of allocated cost per cost center, exported to BigQuery or shared as a PDF for finance.
See the playbook

Put this playbook on call
Included in every plan, from €250/month. 30-day free trial: connect in under 30 minutes, get your first optimization recommendation the next day.
First optimization recommendation
The next day
ROI
Pays for itself with the first recommendation you act on
Setup
About 30 minutes
Data residency
EU
Access
Read-only on your cloud
