AI Blocks › Run your online store
Discount payoff calculator
Run it on your discounts. Get the real return of each code: extra revenue against what the discount cost.
Discount payoff calculator is a free AI skill for the job "Run your online store". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · MIT licence · Made by 40rty AI
Made by 40rty AI. See the original on GitHub; we copied it as it is, with its licence.
What it does
The true return on every discount you run: the revenue it brought in set against what the discount cost you. Some codes pay for themselves, and others only give margin away. The skill reads all your discount codes and automatic discounts in your Shopify store, then keeps those used at least a minimum number of times in your chosen window (90 days by default). For each one, it pulls the orders and works out revenue, order count, average order size and money given away. It only reads data, so it is safe to run anytime. It needs a signed-in Shopify CLI with read access to orders and discounts. Output comes as a table or JSON.
You give it
- Your Shopify store domain
- How many days back to look
- The minimum number of uses to count a discount (optional)
- A signed-in Shopify CLI with read access
You get
- Revenue and order count per discount
- Average order value per discount
- The cost of each discount
- A ranking of which ones paid off
Use it when
- You run many codes and do not know which ones are worth it.
- Your margins feel thin and you suspect discounts are the cause.
- You want to retire the codes that cost more than they earn.
- You need numbers for a talk with your team about promotions.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can access your Shopify admin.