# E-Commerce Profit Leakage Analyzer

> Find where your online store loses margin. Feed it an orders CSV or Excel file and get a ranked report on losing promotions, loss-making products, return costs, stock-out lost sales and slow fulfilment, with a fix for each.

E-Commerce Profit Leakage Analyzer is a paid AI agent skill on Agensi by Samuel Sholademi, in E-commerce. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Samuel Sholademi](https://www.agensi.io/creators/samuel-sholademi)
- Category: [E-commerce](https://www.agensi.io/skills/ecommerce)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/e-commerce-profit-leakage-analyzer
- Tags: ecommerce, python, pandas, data-analysis, finance

## About this skill

Most stores know their revenue but not where their margin goes. This skill runs a contribution-margin analysis on your order-line data and shows exactly where profit leaks.

### What it finds
- **Discount leakage:** campaigns that lose money or earn far less than your no-promotion baseline
- **Loss-making products and weak categories**
- **Return costs:** return rate and full return loss by category and by return reason
- **Stock-outs:** lost sales by product and units unfulfilled by region
- **Fulfilment:** on-time delivery and return loss by fulfilment model

### What you get
A written report (`report.md`) with headline KPIs, a ranked list of the biggest leaks with a suggested action for each, and breakdown tables. Each table is also saved as CSV.

### How it works
Your agent runs a Python/Pandas script on your data. Nothing leaves your machine and no API keys are needed. It works on a flat order-line CSV, or on an Excel workbook with a fact sheet and dimension sheets.

### Notes
- Margin % is contribution margin divided by contribution revenue (net sales plus shipping revenue).
- Return loss already includes refunds, and lost sales never reached your P&L, so the report keeps these buckets separate rather than adding them up.
- A small sample dataset is included so you can test it first.

## Requires

- Python 3.10+
- pandas
- openpyxl

## Known limitations

Requires specific columns (GrossSales, NetSales, etc.). Entities with <30 order lines are flagged as tentative. Does not support non-relational data formats.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the E-Commerce Profit Leakage Analyzer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific data files do I need to provide for this skill to work?

The skill requires an order-line export in CSV or XLSX format containing columns for gross/net sales, discounts, and fulfillment costs to accurately calculate margin leakage.

### How does this analysis differ from simply asking a generic AI to look at my sales data?

Unlike standard AI prompts, this skill uses a specialized Python-based engine to ensure financial calculations like contribution-margin and stock-out velocity are mathematically accurate and not 'hallucinated.'

### What exactly is included in the download package?

Upon purchase, you receive the production-ready script, data mapping documentation, and a guide on how to integrate it with your preferred AI agent or Python environment.

### Do I need to manually format my spreadsheets before the skill can analyze them?

The skill includes a 'Data Mapping' step that automatically recognizes and joins common e-commerce headers, though we recommend a minimum of 30 order lines for statistically significant results.

### Can I run this skill locally to maintain data privacy?

Yes, this skill is designed to run locally using Python and Pandas, ensuring your sensitive financial and customer order data remains within your controlled environment.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
