F12 Labs
EN
Contact
DiscountlyInstall on Shopify
Documentation

Discountly documentation / Create discounts

Logic blocks

How logic blocks work in a Discountly discount. When to use several blocks in one discount instead of several discounts, what happens when two blocks match the same item, what belongs to a block and what to the whole discount, pausing and removing blocks, previewing matches and exporting them to CSV, with a worked example.

Every Discountly discount holds its offer in one or more logic blocks. A block pairs an offer (tiers, a percentage, a reward) with the products it applies to. One block is enough for most discounts. Several blocks let one discount give different offers on different products: 10% off hoodies and 15% off T-shirts, or staff pricing that's 30% off apparel but 10% off electronics.

This page covers how blocks behave together. Creating a discount shows where they sit in the editor.

What a block holds, and what the discount holds

A block is opened with Add logic (or Edit on an existing one), in a window called Logic 1, Logic 2 and so on. It has two sides:

Everything else belongs to the discount as a whole and applies to every block: the title, discount code or automatic, the schedule, Items already on sale, the shipping add-on, Minimum purchase requirements, Eligibility, Combinations, and Advanced settings.

So blocks are for offers that share all of that. If two offers need a different schedule, a different group of customers or a different minimum, make them two discounts.

When two blocks match the same item

The editor says it under Discount logic: "Each block is checked on its own, so a cart can match several. Where two blocks discount the same item, the larger discount wins, so the order below doesn't matter."

What that means for each type:

Type With several blocks
Volume pricing Each block counts its own products toward its own tiers. If an item is in two blocks that both reach a tier, it gets the larger discount, not both
Product discount Each item gets the larger discount of the blocks that include it. Comparing a percentage with an amount, the one that takes more money off the item wins
Order discount Each block whose products are in the cart is a candidate, and the one that takes the most off the order applies
Buy X get Y and Free gift Each block adds its own reward when the cart earns it
Shipping discount The blocks only widen the products that unlock it. A cart with an item from any block qualifies

The number on a block (Logic 1, Logic 2) is a label, not a priority.

Worked example: staff pricing by department

Staff get 30% off apparel and 10% off electronics, and gift cards are full price. Their accounts are tagged staff.

  1. Create a Product discount titled "Staff pricing".
  2. Click Add logic. In The offer, choose % off, 30. In Who it applies to, choose Specific products and add Collection is in any of "Apparel". Click Save.
  3. Click Add more logic. In Logic 2, choose % off, 10, and Collection is in any of "Electronics". Click Save.
  4. Under Eligibility, choose Customers with tags and enter staff.
  5. Click Save rule.

A smartwatch that's in both collections gets 30% off: the larger discount wins. Gift cards aren't in either collection, so they get nothing.

The same idea works for volume pricing with different tiers per range ("5% off 3+ socks" and "10% off 3+ jackets" in one "Bulk savings" discount), and for free gifts with two gifts at the same minimum.

The block header

Each block shows a summary of its offer and products, with buttons on the right:

Button What it does
Pause / resume Leaves the block out of the discount without deleting it. See Pausing a block
Eye (Preview matching products) Opens the products the block applies to. See Previewing matches
Edit / Save Opens the block, or checks it and closes it
Remove (bin) Deletes the block. Shown when the discount has more than one

Save on a block checks it the same way a live discount is checked, and shows the first problem in a message, such as "Enter a discount value". It doesn't save the discount: click Save rule or Save as draft at the top for that. Removing a block also only takes effect when you save the discount.

Pausing a block

Pausing takes a block out of the discount and keeps its settings, for an offer you run some weeks and not others, or one you're not ready to put live.

  • Click the pause button on the block. It's greyed out and marked Paused. Then click Save rule.
  • A paused block isn't sent to Shopify. Customers don't get it, product page blocks don't show it, and it doesn't count toward the discount's configuration size or its minimum quantity.
  • A paused block doesn't have to be complete. You can save a live discount with an unfinished paused block.
  • Its matching products are still kept up to date, so resuming it doesn't wait for a sync.
  • The last live block can't be paused ("Can't pause the only active logic"). To stop the whole discount, use Deactivate rule instead.

To resume, click the button again (it shows a play icon) and save. Pausing and resuming show in the discount's Audit trail, on the right of the editor, as a change to that block.

Previewing matches

Click the eye icon on a block to open Matching products: the variants the block applies to, with a search box, Refresh and Export CSV. The CSV lists each product, variant and SKU, to check against a spreadsheet or send to someone who knows the catalog.

For a free gift, the preview shows the products that count toward the minimum. With All products it says the logic applies to every product instead of listing them. A new block can be previewed once the discount is saved.

See Previewing matches for details.

Several blocks or several discounts

Use several blocks when Use several discounts when
The offers share a title, schedule, customers, minimum and combinations Any of those differ
Only the best offer per item should apply The offers should add up on the same order
You want one line in the Discounts list and one plan slot You want to switch each on and off separately

Every live discount counts toward your plan's limit, so blocks also save plan slots: "Staff pricing" with three departments is one live discount, not three.

Troubleshooting

An item got the smaller of two offers. Check both blocks include it: open each block's preview and search for the item. If the larger block has a minimum the cart doesn't reach, the smaller one applies.

I can't pause a block. It's the only live block in the discount. Add another block, or deactivate the discount.

A change to a block didn't apply. Clicking Save on a block only closes it. Click Save rule at the top to put the change live.

Two offers should add up but only one applies. Blocks in one discount never stack on the same item. Split them into two discounts and check Combinations.