Decompose product margin change
Decompose product operating-profit and margin change across volume, price, variable unit cost, and fixed cost using an order-invariant exact Shapley bridge.
What it's for
Explains whether product-margin movement came from price, volume, unit economics, or fixed-cost absorption without letting spreadsheet bridge order decide the story.
What you give it
Every tool is a pure function: it computes from what you pass it and reads nothing on its own. Inputs split into evidence you supply from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| material_adverse_margin_change | number ≥ 0, ≤ 1 | Your calibration | Optional |
| max_detail_rows | integer ≥ 1, ≤ 500 | Numerical control | Optional |
| products | array of objects (9 fields) | Evidence | Yes |
Each products
record
| Field | Type | Required |
|---|---|---|
| baseline_fixed_cost | number (≥ 0) | Yes |
| baseline_price | number (≥ 0) | Yes |
| baseline_variable_unit_cost | number (≥ 0) | Yes |
| baseline_volume | number (≥ 0) | Yes |
| current_fixed_cost | number (≥ 0) | Yes |
| current_price | number (≥ 0) | Yes |
| current_variable_unit_cost | number (≥ 0) | Yes |
| current_volume | number (≥ 0) | Yes |
| id | string (non-empty) | Yes |
{
"material_adverse_margin_change": 0.02,
"products": [
{
"baseline_fixed_cost": 2000,
"baseline_price": 10,
"baseline_variable_unit_cost": 3,
"baseline_volume": 1000,
"current_fixed_cost": 2300,
"current_price": 11,
"current_variable_unit_cost": 4,
"current_volume": 1200,
"id": "platform"
}
]
} What you get back
This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.
{
"assumptions": [
"Baseline and current periods use one product boundary, currency, accounting policy, revenue recognition, and fully loaded fixed/variable cost classification.",
"The Shapley bridge averages all driver orders and reconciles arithmetic change; it does not establish causal responsibility for price, volume, or cost movements.",
"Portfolio mix enters through product-level aggregation; new, retired, or zero-revenue products require an explicit comparable-boundary policy."
],
"configuration": {
"bridge_orderings_averaged": 24,
"material_adverse_margin_change": 0.02
},
"decision": "product_margin_deterioration_material",
"method": "order_invariant_product_margin_shapley_bridge_v1",
"product_diagnostics": [
{
"baseline_operating_margin_rate": 0.5,
"baseline_operating_profit": 5000,
"baseline_revenue": 10000,
"current_operating_margin_rate": 0.4621,
"current_operating_profit": 6100,
"current_revenue": 13200,
"operating_profit_change": 1100,
"product_id": "platform",
"reconciliation_error": 0,
"shapley_attribution": {
"fixed_cost": -300,
"price": 1100,
"variable_unit_cost": -1100,
"volume": 1400
}
}
],
"summary": {
"baseline_operating_margin_rate": 0.5,
"baseline_operating_profit": 5000,
"baseline_revenue": 10000,
"current_operating_margin_rate": 0.4621,
"current_operating_profit": 6100,
"current_revenue": 13200,
"operating_margin_rate_change": -0.0379,
"operating_profit_change": 1100,
"product_count": 1,
"reconciliation_error": 0,
"shapley_attribution": {
"fixed_cost": -300, Truncated for display — the full payload is 51 lines.
How it works
Statistical audit & measurement — Check whether a number is fit to decide on: coverage, timing, reconciliation, and the gaps a dashboard hides.
- 1 Freeze comparable baseline/current periods, product boundaries, currency, revenue recognition, and fully loaded variable/fixed cost classification.
- 2 Revalue each product across all 24 possible driver-switch orders and average marginal contributions so price-volume and cost interactions are not assigned by an arbitrary bridge order.
- 3 Reconcile driver attribution to operating-profit change, aggregate portfolio margin rates, and investigate boundary, mix, accounting, or data changes before interpreting drivers.
Before you trust it
Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.
Assumptions & guardrails
- Metric definitions, weights, aggregate grain, sampling, missingness, dependence, and comparison windows correspond to the management claim being audited.
- Baseline and current fields are comparable, exhaustive for the declared margin boundary, and handle added, retired, bundled, subsidized, or zero-revenue products explicitly.
- Association, instability, or measurement quality is not a causal effect and must not be converted directly into an individual employment decision.
- Shapley bridging removes order dependence but remains accounting attribution, not causal responsibility or evidence about a team or individual.
Minimum evidence
- products: required and organization-defined
How to validate it
Validate on future periods or held-out aggregate units, compare with a simple baseline, and require stability across plausible metric definitions and decision thresholds.
Calibrating it to your org
Same for everyone
The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.
Specific to you
- one comparable baseline/current wide row per finance-governed product boundary
- product boundary, comparison periods, currency, revenue recognition, refunds/credits, variable/fixed classification, allocation policy, entry/exit policy, and material margin threshold
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
- 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
- 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.
Call it from your AI
You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 20 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.
gitrevio_capabilities_search
{ "q": "decompose product operatingprofit and margin change" }
→ finds "decompose_product_margin_change"
gitrevio_capability_describe
{ "capability_id": "decompose_product_margin_change" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "decompose_product_margin_change", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.