
Shopify Admin Discount Roi Calculator
- 2 installs
- 173 repo stars
- Updated June 26, 2026
- 40rty-ai/shopify-admin-skills
shopify-admin-discount-roi-calculator is a read-only Claude Code skill that calculates the ROI of each Shopify discount by comparing incremental revenue against discount cost.
About
This Claude Code skill evaluates the return on investment of each Shopify discount code and automatic discount by comparing attributed revenue against discount cost, and reports AOV lift versus a non-discount baseline, new-customer share, and cannibalization risk. A marketer or analyst runs it to answer whether a discount was worth it. It is read-only and exports a per-discount ROI report.
- Calculates true ROI per discount by comparing revenue against discount cost
- Flags cannibalization risk and reports new-customer share and AOV lift
- Read-only, exporting a per-discount ROI report
Shopify Admin Discount Roi Calculator by the numbers
- 2 all-time installs (skills.sh)
- Ranked #1,759 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Aug 1, 2026 (Skillselion catalog sync)
shopify-admin-discount-roi-calculator capabilities & compatibility
Free skill; requires an authenticated Shopify store session with read_orders and read_discounts
- Capabilities
- discount roi analysis · cannibalization detection · promotion analytics · aov analysis
- Use cases
- data analysis · marketing
- Runs
- Runs locally
- Pricing
- Free
What shopify-admin-discount-roi-calculator says it does
Evaluates the true return on investment for each discount code and automatic discount by measuring revenue generated, number of orders, average order value with vs. without discount
npx skills add https://github.com/40rty-ai/shopify-admin-skills --skill shopify-admin-discount-roi-calculatorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 173 |
| Last updated | June 26, 2026 |
| Repository | 40rty-ai/shopify-admin-skills ↗ |
What it does
Calculate per-discount ROI, AOV lift, and cannibalization risk for Shopify promotions.
Who is it for?
Analysts judging whether each discount was worth it, with AOV and cannibalization context
Skip if: Finding broken or unused codes, which discount-hygiene-cleanup covers
When should I use this skill?
You need to know the ROI and cannibalization risk of your discounts
What you get
Per-discount ROI, revenue, cost, new-customer share, and cannibalization flags.
- discount_roi_<date>.csv with per-discount ROI metrics
By the numbers
- days_back defaults to 90
- min_uses defaults to 3
- 2 GraphQL operations (discountNodes, orders)
Files
Purpose
Evaluates the true return on investment for each discount code and automatic discount by measuring revenue generated, number of orders, average order value with vs. without discount, customer acquisition attributed to discounts, and whether discounted orders cannibalized full-price sales. Goes beyond discount-hygiene-cleanup (which finds broken/unused codes) to answer "was this discount worth it?" Read-only — no mutations.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_orders,read_discounts - API scopes:
read_orders,read_discounts
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain |
| days_back | integer | no | 90 | Lookback window |
| min_uses | integer | no | 3 | Minimum uses for a discount to be analyzed |
| 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: discountNodes — query Inputs: first: 250, select discount details (title, code, type, value, usageCount, startsAt, endsAt), pagination cursor Expected output: All discount codes and automatic discounts
2. Filter to discounts with usageCount >= min_uses and active within lookback window
3. OPERATION: orders — query Inputs: query: "created_at:>='<NOW - days_back days>' discount_code:<code>", first: 250 for each active discount code, select totalPriceSet, totalDiscountsSet, subtotalPriceSet, customer { id, numberOfOrders }, pagination cursor Expected output: All orders using each discount
4. Also query orders WITHOUT any discount in same period for baseline AOV comparison
5. For each discount, calculate:
- Total Discount Cost = Σ(totalDiscountsSet for orders with this code)
- Revenue Generated = Σ(totalPriceSet for orders with this code)
- Discounted AOV = revenue / orders
- Baseline AOV = AOV of non-discounted orders in same period
- AOV Lift/Drop = discounted AOV - baseline AOV
- New Customer % = orders where customer.numberOfOrders == 1 / total
- Gross ROI = (revenue - discount_cost) / discount_cost × 100
- Cannibalization Risk = high if discount AOV < baseline AOV and new customer % < 20%
GraphQL Operations
# discountNodes:query — validated against api_version 2025-01
query AllDiscounts($after: String) {
discountNodes(first: 250, after: $after) {
edges {
node {
id
discount {
... on DiscountCodeBasic {
title
codes(first: 1) { edges { node { code } } }
usageLimit
asyncUsageCount
startsAt
endsAt
customerGets {
value {
... on DiscountPercentage { percentage }
... on DiscountAmount { amount { amount currencyCode } }
}
}
}
... on DiscountCodeFreeShipping {
title
codes(first: 1) { edges { node { code } } }
asyncUsageCount
startsAt
endsAt
}
... on DiscountAutomaticBasic {
title
asyncUsageCount
startsAt
endsAt
customerGets {
value {
... on DiscountPercentage { percentage }
... on DiscountAmount { amount { amount currencyCode } }
}
}
}
}
}
}
pageInfo { hasNextPage endCursor }
}
}# orders:query — validated against api_version 2025-01
query OrdersByDiscount($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
id
name
createdAt
totalPriceSet { shopMoney { amount currencyCode } }
totalDiscountsSet { shopMoney { amount currencyCode } }
subtotalPriceSet { shopMoney { amount currencyCode } }
customer {
id
numberOfOrders
}
discountCodes
}
}
pageInfo { hasNextPage endCursor }
}
}Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Discount ROI Calculator ║
║ 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):
══════════════════════════════════════════════
DISCOUNT ROI REPORT (<days_back> days)
Discounts analyzed: <n>
Total discount spend: $<amount>
Total attributed rev: $<amount>
─────────────────────────────
TOP PERFORMERS (by ROI):
"<code>" ROI: <n>% Revenue: $<n> Cost: $<n> New customers: <pct>%
UNDERPERFORMERS:
"<code>" ROI: <n>% Revenue: $<n> Cost: $<n> ⚠️ Cannibalization risk
BASELINE COMPARISON:
Non-discount AOV: $<n> | Avg discount AOV: $<n> | Δ: $<n>
Output: discount_roi_<date>.csv
══════════════════════════════════════════════Output Format
CSV file discount_roi_<YYYY-MM-DD>.csv with columns: discount_id, code_or_title, type, uses, revenue, discount_cost, roi_pct, aov, baseline_aov, aov_delta, new_customer_pct, cannibalization_risk
Error Handling
| Error | Cause | Recovery |
|---|---|---|
THROTTLED | API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
| Automatic discounts | No code to query by | Match via order discount data |
| Stacked discounts | Multiple codes per order | Attribute proportionally or flag as "multi-discount" |
Best Practices
- Discounts with ROI < 100% cost more than they generate — consider retiring them.
- High new-customer % with positive ROI = great acquisition tool — keep running.
- Low new-customer % with negative AOV lift = cannibalization — customers would have bought anyway.
- Cross-reference with
discount-ab-analysisfor split-test insights. - Use with
discount-hygiene-cleanupto find and remove underperforming codes.
Related skills
FAQ
How is gross ROI computed?
Gross ROI = (revenue - discount_cost) / discount_cost x 100, using orders attributed to each discount.
How is cannibalization flagged?
As high risk when the discounted AOV is below the baseline AOV and new-customer share is under 20%.