Regios Discounts logic flowchart for this discount

The request: “From this collection, 40% off calculated on the compare-at price.” Stores that keep products permanently “on sale” with a compare-at price ask for this before every big promotion.

The logic below is the real discount a merchant saved from our AI Discount Generator. Only the collection has been replaced.

Why native Shopify discounts can’t do this

Shopify discounts are always calculated from the current price, never the compare-at price. Here’s what that does to a 40% off promotion:

Compare-at price:   $100
Current price:       $80
Customer expects:    $100 x 0.60 = $60
Shopify charges:     $80 x 0.60 = $48 (52% off in total)

Our full explainer on compare-at pricing covers why Shopify’s pricing and discounting systems don’t share this information.

How the logic works

The logic is simple on purpose:

  1. The item is in the eligible collection.
  2. It gets 40% off.

The compare-at behavior comes from a discount setting. With Calculate discount based on compare at price, Regios Discounts works out the price the customer should pay ($60 in the example) and applies only the difference from the current price ($20 off $80).

Build it with the AI Discount Generator

The fastest way. On the Regios Discounts home page, click Create discount and paste this prompt into the AI box, swapping in your own collection, product, and brand names:

40% off the Spring collection, calculated from the compare-at price.

We ran this exact prompt through the generator, and it builds the same logic as the JSON below. The generator also turned on the compare-at setting for you. Review the steps it creates, link your own products or collections, and save.

Build it from scratch in the app

Step 1. Install Regios Discounts and open it. On the home page, click Create discount.

Step 2. Under Prefer not to use AI?, click Start from scratch.

Step 3. Choose Amount off product.

Step 4. Under How will customers get this discount?, choose Automatically. Give it a title, such as “Spring 40% off”.

Step 5. Scroll to Discount steps and click Review discount steps. In the dialog, pick Start from scratch and click Next. You’ll see a Discount type box with a Then button.

Step 6. Click Then, choose Check if, add a Collection criteria for your collection, and save it.

Step 7. On the check, click Then, choose Apply discount, and enter 40 percent.

Step 8. Click Done. Under Advanced options, set How to handle items already on sale to Calculate discount based on compare at price.

Step 9. Click Save.

Or import the logic

Prefer to skip the clicking? Create the discount as in steps 1 to 4 above, then click Logic at the top of the discount form, choose Import, and use the JSON below. The JSON import guide walks through each screen. Link eligible-collection to your collection.

Important: the compare-at setting isn’t part of the JSON. Set How to handle items already on sale to Calculate discount based on compare at price after importing.

Install now

Ready-to-import discount logic

Copy the JSON below into Regios Discounts using the import flow, or download this file. Step-by-step: how to import discounts from JSON files (home screen, Logic > Import, choosing discount type, linking missing resources, and saving).

Want to describe what you need in plain language instead? Our AI Discount Generator covers prompts, iterating on results, linking products/collections when the app asks, and using or exporting the logic.

{
  "id": "<root>",
  "type": "ROOT",
  "entryPoint": {
    "id": "check-if-collection",
    "then": {
      "id": "apply-discount-0",
      "type": "APPLY_DISCOUNT",
      "title": "40% off this collection",
      "value": {
        "type": "PERCENTAGE",
        "percentage": "40"
      }
    },
    "type": "CHECK_IF",
    "matchType": "AND",
    "otherwise": null,
    "conditions": [
      {
        "type": "PRODUCT_ELIGIBILITY",
        "eligibility": {
          "type": "SPECIFIC_COLLECTIONS",
          "asListOfIds": "eligible-collection",
          "selectedCollections": []
        },
        "includeOrExclude": "INCLUDE"
      }
    ]
  }
}

Frequently asked questions

Is the compare-at setting in the JSON file?

No. The JSON holds the discount logic only. After importing, set How to handle items already on sale to Calculate discount based on compare at price in the discount form.

What happens to items without a compare-at price?

They’re discounted from their regular price, the same as any other discount.

What if the sale price is already lower than the target?

The customer pays the lower of the two. The discount never raises a price above the current sale price.

Can I do this with a discount code?

Yes. This version is automatic, but the same logic and setting work on a code discount.