Skip to main content

Unique discount codes on Magento

Give each visitor their own single-use discount or free shipping code on your Magento store. Alia creates the codes in Magento for you.

Written by Rob D

A unique code gives each visitor their own discount code that works once. Alia creates the codes in your Magento store for you, so there's nothing to set up in Magento first. Alia works with both Magento Open Source and Adobe Commerce.

Your store needs to be connected to Alia first.

What you can offer

  • A discount: a percentage off (such as 15% off) or a fixed amount off (such as $10 off). Both come off the whole order.

  • Free shipping.

For either one, you can set a minimum subtotal the cart must reach before the code works.

Create a unique code

  1. In the Alia sidebar, select Rewards under Config, then select Create.

  2. Select Unique code.

    Selecting Unique code when creating a reward

  3. Under Type, choose Discount or Free shipping, then select Next.

  4. For a discount, enter the percentage or amount under Customer gets.

  5. To require a minimum order, turn on the minimum subtotal and enter the amount.

  6. Under Code format, set a prefix and how many random characters follow it. Magento codes need at least 8 random characters.

  7. Save the reward, then add it to your popup.

How it works in your Magento admin

Alia creates one cart price rule for each reward, named Alia: followed by your reward's name, and generates the codes under it. You'll find it in Marketing > Cart Price Rules.

  • Each code works once.

  • Codes work for all customer groups, including guests.

  • Codes only work on the Magento website connected to that Alia store. If you run several websites, create the reward in each website's Alia store.

💡Note: Make changes in Alia, not in Magento. When you edit the reward in Alia, Alia updates the cart price rule, and the change applies to codes visitors already received. If the rule is deleted in Magento, Alia stops giving out codes and shows an error on the reward. Save the reward in Alia again to create a new rule.

If you see a single-use warning

On some Magento versions, each code only works once while your store's queue workers (cron consumers) are running. If your store runs one of these versions, Alia shows a warning when you create or edit the reward. Ask your developer to make sure queue workers are running.

On Adobe Commerce cloud, queue workers are off by default, so your developer needs to turn them on.

How it differs from Shopify

On Magento stores, these settings aren't available:

  • Limiting the code to specific products or categories

  • Grouping codes, customer segments, and Contact info must match at checkout

  • Combines with. Magento Open Source only allows one coupon code per order.

  • A real expiration. You can turn on Expiration to show a countdown timer, but the code keeps working after the timer ends.

  • Smart rewards

Codes aren't applied automatically. On Magento stores, Apply to checkout and Apply code immediately aren't available. Your popup shows the code, and shoppers enter it at checkout. Make sure your popup copy tells them to.

💡Tip: When you ask Lia for a discount or free shipping on a Magento store, she creates a unique code. If you give her a code you already made in Magento, she uses it as a static code. See Getting started with Lia.

FAQ

Can I use a static code instead?

Yes. Create the coupon in your Magento admin, then select Static code in Alia and type it in exactly as you created it. Static codes keep the settings you gave them in Magento, such as an end date or product limits.

A shopper's code isn't working at checkout. What should I check?

  1. Check that the cart meets the minimum subtotal, if you set one.

  2. Check whether the shopper already has another coupon code applied.

  3. Check that they're shopping on the website connected to that Alia store.

  4. Check that the reward's cart price rule still exists and is active in Marketing > Cart Price Rules.

  5. If the code was already used, check for a single-use warning on the reward.

For the full list of reward types and settings, see How to set up rewards and discounts in Alia.

Still have questions?

Start a chat from inside the Alia app, or use the chat in our Help Center.

Did this answer your question?