with one click
shopify-admin-discount-roi-calculator
// Read-only: calculates the true ROI of each discount code and automatic discount by comparing incremental revenue against discount cost.
// Read-only: calculates the true ROI of each discount code and automatic discount by comparing incremental revenue against discount cost.
Master skill collection for Shopify store operators. Provides access to all merchandising, marketing, support, and operations capabilities.
Read-only: identifies products with high single-purchase rates that could benefit from cross-sell pairing based on category and price affinity.
Read-only: mines order history to find product pairs and triplets frequently purchased together, generating cross-sell and bundle recommendations.
Read-only: extracts gift messages, gift recipients, and gift flags from order custom attributes and notes for fulfillment teams to print on packing slips.
Read-only: identifies orders 7ā14 days post-fulfillment that are eligible for a post-purchase survey campaign, excluding refunded or cancelled orders.
Identifies customers with disputed or charged-back orders and tags their customer record for proactive review on future orders.
| name | shopify-admin-discount-roi-calculator |
| role | conversion-optimization |
| description | Read-only: calculates the true ROI of each discount code and automatic discount by comparing incremental revenue against discount cost. |
| toolkit | shopify-admin, shopify-admin-execution |
| api_version | 2025-01 |
| graphql_operations | ["discountNodes:query","orders:query"] |
| status | stable |
| compatibility | Claude Code, Cursor, Codex, Gemini CLI |
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.
shopify store auth --store <domain> --scopes read_orders,read_discountsread_orders, read_discounts| 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 |
ā¹ļø Read-only skill ā no mutations are executed. Safe to run at any time.
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
Filter to discounts with usageCount >= min_uses and active within lookback window
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
Also query orders WITHOUT any discount in same period for baseline AOV comparison
For each discount, calculate:
# 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 }
}
}
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
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
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 | 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" |
discount-ab-analysis for split-test insights.discount-hygiene-cleanup to find and remove underperforming codes.