AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Shopify Admin Discount Roi Calculator

skill-40rty-ai-shopify-admin-skills-shopify-admin-discount-roi-calculator · by 40RTY-ai

Read-only: calculates the true ROI of each discount code and automatic discount by comparing incremental revenue against discount cost.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-40rty-ai-shopify-admin-skills-shopify-admin-discount-roi-calculator

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-40rty-ai-shopify-admin-skills-shopify-admin-discount-roi-calculator)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Shopify Admin Discount Roi Calculator? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 --scopes read_orders,read_discounts
  • API scopes: read_orders, read_discounts

Parameters

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain | | daysback | integer | no | 90 | Lookback window | | minuses | 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

  1. Filter to discounts with usageCount >= min_uses and active within lookback window
  1. OPERATION: orders — query

Inputs: query: "created_at:>='' discount_code:", first: 250 for each active discount code, select totalPriceSet, totalDiscountsSet, subtotalPriceSet, customer { id, numberOfOrders }, pagination cursor Expected output: All orders using each discount

  1. Also query orders WITHOUT any discount in same period for baseline AOV comparison
  1. 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 - discountcost) / discountcost × 100
  • Cannibalization Risk = high if discount AOV ║

║ Started: ║ ╚══════════════════════════════════════════════╝


**After each step**, emit:

[N/TOTAL] → Params: → Result:


**On completion**, emit:

For `format: human` (default):

══════════════════════════════════════════════ DISCOUNT ROI REPORT ( days) Discounts analyzed: Total discount spend: $ Total attributed rev: $ ───────────────────────────── TOP PERFORMERS (by ROI): "" ROI: % Revenue: $ Cost: $ New customers: %

UNDERPERFORMERS: "" ROI: % Revenue: $ Cost: $ ⚠️ Cannibalization risk

BASELINE COMPARISON: Non-discount AOV: $ | Avg discount AOV: $ | Δ: $

Output: discountroi.csv ══════════════════════════════════════════════


## Output Format
CSV file `discount_roi_.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-analysis` for split-test insights.
- Use with `discount-hygiene-cleanup` to find and remove underperforming codes.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [40RTY-ai](https://github.com/40RTY-ai)
- **Source:** [40RTY-ai/shopify-admin-skills](https://github.com/40RTY-ai/shopify-admin-skills)
- **License:** MIT
- **Homepage:** http://skills.40rty.ai

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.