/shopify-admin-revenue-by-location-report
Read-only: breaks down revenue by fulfillment location for multi-warehouse P&L and location performance.
$ npx -y skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-revenue-by-location-report --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/shopify-admin-revenue-by-location-report
Context preview
The summary Claude sees to decide when to auto-load this skill.
Read-only: breaks down revenue by fulfillment location for multi-warehouse P&L and location performance.
SKILL.md
shopify-admin-revenue-by-location-report.SKILL.mdname: shopify-admin-revenue-by-location-report
role: finance
description: "Read-only: breaks down revenue by fulfillment location for multi-warehouse P&L and location performance."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- orders:query
- fulfillmentOrders:query
- locations:query
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLI
Purpose
Attributes order revenue to the fulfillment location that shipped the order. Produces a revenue breakdown by warehouse or fulfillment center, useful for multi-location P&L, location staffing decisions, and understanding where demand is being fulfilled from. Read-only — no mutations.
Prerequisites
- Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_orders`
- API scopes: `read_orders`
Parameters
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | | days_back | integer | no | 30 | Lookback window | | format | string | no | human | Output format: `human` or `json` |
Safety
> ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.
Workflow Steps
1. **OPERATION:** `locations` — query **Inputs:** `first: 50`, active only **Expected output:** Location IDs and names for enrichment
2. **OPERATION:** `orders` — query **Inputs:** `query: "fulfillment_status:shipped created_at:>='<NOW - days_back days>'"`, `first: 250`, select `fulfillments { assignedLocation }`, `totalPriceSet`, pagination cursor **Expected output:** Fulfilled orders with location attribution
3. **OPERATION:** `fulfillmentOrders` — query (for open orders attribution) **Inputs:** Per location, `status: CLOSED`, `first: 250` **Expected output:** Closed fulfillment orders for revenue attribution
4. Aggregate revenue by location; orders without location data attributed to "Unknown"
GraphQL Operations
# locations:query — validated against api_version 2025-01
query LocationsList {
locations(first: 50, includeInactive: false) {
edges {
node {
id
name
}
}
}
}# orders:query — validated against api_version 2025-01
query RevenueByLocation($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
id
name
createdAt
totalPriceSet {
shopMoney {
amount
currencyCode
}
}
fulfillments {
assignedLocation {
location {
id
name
}
}
status
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}# fulfillmentOrders:query — validated against api_version 2025-01
query ClosedFulfillmentOrders($locationId: ID!, $after: String) {
fulfillmentOrders(
assignedLocationId: $locationId
first: 250
after: $after
query: "status:closed"
) {
edges {
node {
id
order {
id
name
totalPriceSet {
shopMoney {
amount
currencyCode
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}Session Tracking
**Claude MUST emit the following output at each stage. This is mandatory.**
**On start**, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Revenue by Location Report ║
║ Store: <store domain> ║
║ Started: <YYYY-MM-DD HH:MM UTC> ║
╚══════════════════════════════════════════════╝
**After each step**, emit:
[N/TOTAL] <QUERY|MUTATION> <OperationName>
→ Params: <brief summary of key inputs>
→ Result: <count or outcome>**On completion**, emit:
For `format: human` (default):
══════════════════════════════════════════════
REVENUE BY LOCATION (<days_back> days)
Total revenue: $<amount>
Orders included: <n>
Location Orders Revenue Share
─────────────────────────────────────────────────
Warehouse A <n> $<n> <pct>%
Warehouse B <n> $<n> <pct>%
Output: revenue_by_location_<date>.csv
══════════════════════════════════════════════
For `format: json`, emit:
{
"skill": "revenue-by-location-report",
"store": "<domain>",
"period_days": 30,
"total_revenue": 0,
"currency": "USD",
"by_location": [],
"output_file": "revenue_by_location_<date>.csv"
}Output Format
CSV file `revenue_by_location_<YYYY-MM-DD>.csv` with columns: `location_id`, `location_name`, `order_count`, `total_revenue`, `currency`, `share_pct`
Error Handling
| Error | Cause | Recovery | |-------|-------|----------| | `THROTTLED` | API rate limit exceeded | Wait 2 seconds, retry up to 3 times | | Order with no fulfillment location | Unfulfilled or POS order | Attribute to "Unassigned" | | Single-location store | All revenue from one location | Report still valid, shows full total |
Best Practices
- For multi-3PL operations, this report helps identify if one 3PL is handling a disproportionate share and may need capacity relief.
- Revenue attribution here is based on fulfillment assignment, not customer shipping address — it reflects operational throughput per location, not geographic demand.
- Pair with the inventory valuation report to calculate inventory turns per location (revenue / inventory value).
Read more
name: shopify-admin-revenue-by-location-report role: finance description: "Read-only: breaks down revenue by fulfillment location for multi-warehouse P&L and location performance." toolkit: shopify-admin, shopify-admin-execution api_version: "2025-01" graphql_operations: - orders:query - fulfillmentOrders:query - locations:query status: stable compatibility: Claude Code, Cursor, Codex, Gemini CLI
Purpose
Attributes order revenue to the fulfillment location that shipped the order. Produces a revenue breakdown by warehouse or fulfillment center, useful for multi-location P&L, location staffing decisions, and understanding where demand is being fulfilled from. Read-only — no mutations.
Prerequisites
- Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_orders`
- API scopes: `read_orders`
Parameters
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | | days_back | integer | no | 30 | Lookback window | | format | string | no | human | Output format: `human` or `json` |
Safety
> ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.
Workflow Steps
1. **OPERATION:** `locations` — query **Inputs:** `first: 50`, active only **Expected output:** Location IDs and names for enrichment
2. **OPERATION:** `orders` — query **Inputs:** `query: "fulfillment_status:shipped created_at:>='<NOW - days_back days>'"`, `first: 250`, select `fulfillments { assignedLocation }`, `totalPriceSet`, pagination cursor **Expected output:** Fulfilled orders with location attribution
3. **OPERATION:** `fulfillmentOrders` — query (for open orders attribution) **Inputs:** Per location, `status: CLOSED`, `first: 250` **Expected output:** Closed fulfillment orders for revenue attribution
4. Aggregate revenue by location; orders without location data attributed to "Unknown"
GraphQL Operations
# locations:query — validated against api_version 2025-01
query LocationsList {
locations(first: 50, includeInactive: false) {
edges {
node {
id
name
}
}
}
}# orders:query — validated against api_version 2025-01
query RevenueByLocation($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
id
name
createdAt
totalPriceSet {
shopMoney {
amount
currencyCode
}
}
fulfillments {
assignedLocation {
location {
id
name
}
}
status
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}# fulfillmentOrders:query — validated against api_version 2025-01
query ClosedFulfillmentOrders($locationId: ID!, $after: String) {
fulfillmentOrders(
assignedLocationId: $locationId
first: 250
after: $after
query: "status:closed"
) {
edges {
node {
id
order {
id
name
totalPriceSet {
shopMoney {
amount
currencyCode
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}Session Tracking
**Claude MUST emit the following output at each stage. This is mandatory.**
**On start**, emit:
╔══════════════════════════════════════════════╗ ║ SKILL: Revenue by Location Report ║ ║ Store: <store domain> ║ ║ Started: <YYYY-MM-DD HH:MM UTC> ║ ╚══════════════════════════════════════════════╝
**After each step**, emit:
[N/TOTAL] <QUERY|MUTATION> <OperationName>
→ Params: <brief summary of key inputs>
→ Result: <count or outcome>**On completion**, emit:
For `format: human` (default):
══════════════════════════════════════════════ REVENUE BY LOCATION (<days_back> days) Total revenue: $<amount> Orders included: <n> Location Orders Revenue Share ───────────────────────────────────────────────── Warehouse A <n> $<n> <pct>% Warehouse B <n> $<n> <pct>% Output: revenue_by_location_<date>.csv ══════════════════════════════════════════════
For `format: json`, emit:
{
"skill": "revenue-by-location-report",
"store": "<domain>",
"period_days": 30,
"total_revenue": 0,
"currency": "USD",
"by_location": [],
"output_file": "revenue_by_location_<date>.csv"
}Output Format
CSV file `revenue_by_location_<YYYY-MM-DD>.csv` with columns: `location_id`, `location_name`, `order_count`, `total_revenue`, `currency`, `share_pct`
Error Handling
| Error | Cause | Recovery | |-------|-------|----------| | `THROTTLED` | API rate limit exceeded | Wait 2 seconds, retry up to 3 times | | Order with no fulfillment location | Unfulfilled or POS order | Attribute to "Unassigned" | | Single-location store | All revenue from one location | Report still valid, shows full total |
Best Practices
- For multi-3PL operations, this report helps identify if one 3PL is handling a disproportionate share and may need capacity relief.
- Revenue attribution here is based on fulfillment assignment, not customer shipping address — it reflects operational throughput per location, not geographic demand.
- Pair with the inventory valuation report to calculate inventory turns per location (revenue / inventory value).
Community-maintained AI agent skills for operating Shopify stores — workflows, optimization, reports and more
Other skills on shopify-admin-skills.
- /shopify-admin-agentic-crawler-access
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Amazonbot) so AI assistants are permitted to read the catalog.
Open skill - /shopify-admin-agentic-description-enrichment
Rewrite thin product descriptions into structured, fact-rich copy (materials, fit, use-cases, the words shoppers actually type) so AI agents have something concrete to quote and match.
Open skill - /shopify-admin-agentic-image-alt-text
Generate and set descriptive alt text on product images so AI agents (which can't 'see' pixels) can understand and recommend what each product looks like.
Open skill - /shopify-admin-agentic-llms-txt
Generate and publish an /llms.txt guide (brand summary, flagship products, key policies, contact) via a theme template so AI assistants get a curated, machine-readable map of the store.
Open skill - /shopify-admin-agentic-metafields-setup
Define and populate agentic-commerce metafields (material, attributes, key features, specs, sizing) so AI agents can filter and match products to specific shopper requirements.
Open skill - /shopify-admin-agentic-organization-schema
Inject an Organization JSON-LD block (name, logo, sameAs social links, contactPoint) into the theme so AI agents can verify the store is a real, trusted brand and link it to its public identity.
Open skill

