# Multi-Currency Sales Audit & FX Dashboard

> Automated sales data pipeline that transforms messy spreadsheets into a validated SQL warehouse and HTML dashboard.

Multi-Currency Sales Audit & FX Dashboard is a paid AI agent skill on Agensi by nwafor lawrence, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [nwafor lawrence](https://www.agensi.io/creators/nwafor-lawrence)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-12-03
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/multi-currency-sales-audit-fx-dashboard
- Tags: database, automation, python, etl, sql, pandas, finance

## About this skill

Ingesting messy sales data shouldn't require manual cleaning or custom ETL scripts. This skill automates the transformation of raw multi-currency spreadsheets into a validated, SQL-ready warehouse and a stakeholder-ready interactive dashboard.

### What it does
- **Data Normalization** transforms inconsistent CSV or Excel headers into a standard `snake_case` schema and parses currency strings and mixed date formats.
- **Automated Auditing** quarantines duplicate `order_id` records and invalid/suspicious transactions into `error_log.csv` with severity tags and failure reasons.
- **Multi-currency Conversion** converts revenue across 13 currencies (`USD`, `EUR`, `GBP`, `CAD`, `AUD`, `CHF`, `JPY`, `CNY`, `INR`, `NGN`, `KES`, `ZAR`, `GHS`) into USD using built-in FX rates.
- **Financial Computation** calculates `profit_usd` and `margin_pct` for completed orders, plus `is_loss_making`, `is_high_margin`, and `is_anomaly` flags.
- **Dashboard Generation** exports a self-contained offline HTML dashboard featuring KPI cards, trend charts, regional breakdowns, margin quartiles, and a filterable Order Audit CSV export.
- **Database Loading** populates an indexed `orders` table in SQLite or PostgreSQL for downstream business intelligence.

### How it works
1. **Pre-flight Validation** verifies the input headers against required fields (`order_id`, `amount`, `currency`, `order_date`, `order_status`) with `--validate-only`.
2. **Pipeline Execution** runs the ETL engine to clean, convert currencies, audit rules, and enrich transactions.
3. **Artifact Generation** writes `validated_data.csv`, `error_log.csv`, `validation_report.json`, `revenue_warehouse.db`, and `revenue_dashboard.html` to the output directory.
4. **API Deployment** optionally launches `server/server.py` to query the resulting SQL database over local HTTP.

## Requires

- Python 3.10+
- pandas
- numpy
- openpyxl
- SQLAlchemy
- Optional: psycopg2-binary

Runs 100% locally with zero API keys required. Uses local SQLite by default and writes validated_data.csv, error_log.csv, validation_report.json, revenue_warehouse.db, and revenue_dashboard.html to your folder.

## Known limitations

Fixed static FX conversion table for 13 currencies (USD, EUR, GBP, CAD, AUD, CHF, JPY, CNY, INR, NGN, KES, ZAR, GHS). Profit and margin calculations run on COMPLETED orders only; rows with missing required fields, duplicate order IDs, non-positive amounts, or unsupported currencies are quarantined to error_log.csv.

## 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 Multi-Currency Sales Audit & FX Dashboard 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 format does my spreadsheet need to be in for the pipeline to work?

The skill requires a spreadsheet containing basic transaction data, specifically an amount and an order date. It supports the 13 major ISO currency codes (including USD, EUR, GBP, and JPY) for automatic revenue normalization.

### How does this skill differ from simply asking an AI to clean my data?

Unlike a standard prompt, this skill uses a deterministic engine that ensures 1:1 data integrity. It provides a formal audit trail for rejected rows and generates a standalone, interactive HTML dashboard that text-only AI responses cannot produce.

### What is included in the purchase of the Revenue Analytics Pipeline?

You will receive the complete Python-based execution engine, including the data normalization logic, the SQL schema generator, and the interactive HTML dashboard template, ready to run in your local environment.

### Which AI agents or development environments are compatible with this skill?

The skill is designed to work with any AI agent capable of executing Python scripts or interacting with a local file system. It uses standard libraries like pandas and SQLAlchemy for maximum compatibility across different developer environments.

### Can this skill help me identify specific errors or duplicates in my sales records?

Yes, the pipeline automatically identifies and quarantines duplicate order IDs and invalid transactions into a separate error log. This allows you to review and fix problematic entries without halting the entire data migration process.

### What spreadsheet formats and column headers does it accept?

It accepts both .csv and Excel (.xlsx / .xls) files, and you can target a specific Excel tab with --sheet. Column headers are automatically normalized to snake_case and regional aliases are standardized. At minimum, your file must map to order_id, amount, currency, order_date, and order_status; any extra columns are preserved alongside the enriched profit and margin fields.

### Which currencies are supported and how are profit and margins calculated?

It converts 13 currencies into normalized USD using built-in FX rates: USD, EUR, GBP, CAD, AUD, CHF, JPY, CNY, INR, NGN, KES, ZAR, and GHS. Profit (profit_usd) and margin percentages (margin_pct) are computed on COMPLETED orders against the cost mapping (customizable via --cost-map), and loss-making or unusually high-margin anomalies are automatically flagged.

### Can I load results into PostgreSQL or query the warehouse via an API?

Yes. By default, the pipeline writes an indexed orders table (with idx_order_date) to a local SQLite database. To write to PostgreSQL instead, set the DATABASE_URL environment variable (SQLAlchemy handles both). You can also launch the bundled local HTTP semantic server (--port 8787) to query the SQL warehouse over HTTP.

### Does it require external API keys, and can I validate a file before loading it?

No external API keys or paid cloud services are required—everything runs locally in Python using pandas, NumPy, openpyxl, and SQLAlchemy. You can run a pre-flight check with --validate-only to inspect schema coverage, quarantined records (CRITICAL/SUSPICIOUS flags), and the quality score in validation_report.json before generating the full database and HTML dashboard.

---

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.
