Agent context
Amazon MWS models
6 SQL models that turn the raw Amazon MWS tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 5Raw tables
- 6Core
- 6Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- Monthly Sales Performance ReportsExtracts monthly sales performance reports for Amazon integration. It calculates the total sales amount, number of orders, and total items sold for each month. Additionally, it calculates the average order value by dividing the total sales amount by the number of orders. The results are ordered in descending order by month.1 raw table
- Monthly Inventory ReportsExtracts monthly inventory reports for Amazon integration. It retrieves data from the Amazon Selling API to calculate various metrics such as total items listed, total fulfillable quantity, total damaged items, expired items, total unfulfillable quantity, items in transit, and items receiving. The results are ordered by month in descending order.1 raw table
- Monthly Financial Analysis Generates a monthly financial analysis for Amazon integration. It calculates the gross revenue, refunds, net revenue, average item price, average promotion discount, average shipping price, and average shipping tax. The analysis is based on data from the settlement report and orders by last updated date report. The results are sorted in descending order by month.2 raw tables
- Monthly Shipping and Delivery ReportsGenerates a monthly shipping and delivery report for Amazon integration. It calculates various metrics such as the number of orders, total items shipped and unshipped, average days to ship, and the count of premium and regular orders. It also includes information on different shipping service levels and the number of orders for each level. The final result is sorted by month and shipping service level.1 raw table
- Monthly Returns AnalysisExtracts a monthly returns analysis for Amazon integration. It calculates various metrics such as total returns, total refunded amount, in-policy returns, out-of-policy returns, prime returns, and non-prime returns. Additionally, it provides information on return reasons and their respective counts. The results are sorted by month and reason count in descending order.1 raw table
- Monthly Order Update Tracking Report Extracts a monthly order update tracking report for Amazon integration. It retrieves data from the "orders_by_last_updated_date_report" table and calculates various metrics such as total orders updated, total updates, average price updated, status breakdown, and channel breakdown. The results are sorted by month, status count, and channel count in descending order.grain: month x order status x order channel, by last-updated date · 1 raw table
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against Amazon MWS's own reports first. Each model's notes say what the synced data can and can't support.
Connect Amazon MWS.
Your agents start with context.
Sync Amazon MWS to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.