Discount Devil Coming soon

Coupons your customers collect.

Coming soon

Documentation

Reference material for Discount Devil. If you are setting the app up for the first time, start with the tutorial instead: it gets you to a coupon in a wallet, and this page assumes you have done that.

The coupon lifecycle

Every coupon, however it was earned, is one record in the app and one discount code in your store. It moves through these states:

  • Pending. The app has recorded the coupon and is creating the discount in Shopify. This usually lasts a moment. If Shopify is slow to answer, the coupon stays pending and the app retries in the background, checking first whether the code already exists so a retry never creates two.
  • Available. The code exists and the customer can see it in their wallet.
  • Redeemed. The customer used it on an order.
  • Expired. Its end date passed unused.
  • Revoked. You withdrew it from Coupons with Revoke.

Pending coupons never appear in the wallet, and a code is only shown while the coupon is available. Redeemed and expired coupons fold into the wallet’s history.

When a coupon expires or is revoked, the app deletes its discount code from Shopify, so your discount list holds only codes that can still be used.

An hourly sweep does the background work: it expires coupons whose date has passed, retries pending ones, and records redemptions it has not yet seen. The wallet also checks a customer’s recent coupons for redemption when they open it, so what they see is current.

Codes

Codes take the form PREFIX-XXXXXXXX, with your Code prefix from Settings (2 to 6 letters or digits, DD by default) and eight random characters. Each code is created with a customer restriction to the one customer it was issued to and a usage limit of one.

Expiry

A coupon without its own validity uses the Default expiry (days) from Settings, 90 days unless you change it. A campaign’s reward can set its own validity.

Stamp cards

A collectible campaign is a stamp card. Each stamp a customer earns moves them one step along; when the stamps reach the number the card requires, the reward coupon is issued automatically.

A card that is not repeatable is done once it is full: further stamps for that customer are refused. A repeatable card starts a new cycle instead, and the customer can fill it again. Each cycle issues its own reward, exactly once, however many times a stamp request is retried.

Stamps come from four places: by hand on the campaign page, from a claim link, from a purchase trigger, and from another Ioun app you have connected. All four count towards the same card.

A campaign can also carry a maximum number of rewards. Once it has issued that many, further claims and completed cards are told so instead of receiving a coupon.

A claim link is one URL that gives each person who opens it their own reward. It exists because Shopify Email sends the same message to everyone, and a shared code in that message would be a shared code.

The link lives on your store’s own domain, under /apps/discount-devil/claim/, followed by a random token. When a customer opens it:

  1. Signed out: a page in your theme asks them to sign in to claim the reward, and returns them to the link afterwards.
  2. Signed in: the reward is granted to that customer, and the page shows it: the reward, the code with a copy button, Apply at checkout, and a link to the wallet. For a stamp card it shows the card’s progress instead, or the reward code if this stamp completed the card.
  3. Already claimed: the same page again, noting that the reward was already claimed. One customer can claim from a given campaign once.

The customer’s identity comes from Shopify’s signed-in session, never from anything in the link, so forwarding a claim link only lets the next person claim their own reward, if they have an account with you.

If Shopify is slow to create the code, the page says the reward is on its way and to check the account shortly; the background retry finishes the job.

Untick Enable claim link to stop the link working. Regenerate link replaces the token: the old URL stops working at once, including in emails already sent, so regenerate only when you mean that. Pausing or ending the campaign also stops its link. A link that no longer works shows a polite “no longer active” page, never an error.

Who can claim

The Who can claim setting on the campaign page decides who a claim link works for:

  • Open: anyone with the link who signs in. Set a total limit on the campaign if a forwarded link should not be able to drain it.
  • Invite list: only customers whose account email is on a list you paste in. The app stores one-way hashes of the addresses, never the addresses, so it cannot show the list back to you; saving a new list replaces the old one.
  • Unique links: the shared link stops working and each recipient gets their own link instead. Claims per link sets how many customers can use each one: Personal (1), Share with a friend (2), a custom number, or unlimited. Paste email addresses to make one link each, or ask for a number of anonymous links. Click Download CSV right away: links are not stored in readable form, so the download is the only copy.

Purchase triggers

On a collectible campaign, Add a stamp for every paid order stamps the customer’s card each time Shopify reports one of their orders paid. With a Minimum order subtotal, only orders at or above it count.

Each order can stamp a given card once, so a repeated notification from Shopify never adds a second stamp. Guest checkouts have no customer to stamp and are skipped.

Sending reward emails

Where email sending is available, the campaign page has an Email customers card. Write a subject, a short plain-text message and the button label, then:

  • Send a test to your own address first.
  • Email all subscribed customers sends the campaign’s claim link to every customer marked as subscribed to email marketing in Shopify. It needs the claim link enabled and Who can claim set to Open or Invite list.
  • Mint and email (Unique links mode) gives each pasted address its own link and emails it.

Every email carries an unsubscribe link. Unsubscribes, bounces and spam complaints are recorded and those addresses are skipped from then on. Each store can send up to its daily limit (2,000 by default) per UTC day.

Emails come from a shared sending domain by default, under your store name. To send from your own domain, open Settings, Email sending, enter a domain such as mail.yourstore.com, add the DNS records shown at your domain host, and click Verify. Use shared domain switches back at any time.

Tags and email automations

Discount Devil can also tag the customer whenever a reward is granted, and Shopify’s own marketing automations send the email, keeping sending, unsubscribes and branding in Shopify Email.

1. Turn on tagging

  1. Open Discount Devil, then Settings.
  2. In Reward language & notifications, tick Tag customers when a reward is granted.
  3. Check the Customer tag (default dd-reward; lowercase letters, digits, - and _, up to 40 characters) and save.

While you are there, set the Reward noun (for example reward, coupon or boon). It is the word customers see on the claim page and in their wallet.

2. Build the automation in Shopify

  1. In your Shopify admin open Marketing, then Automations, choose Create automation, then Create custom automation.
  2. Trigger: Customer tag added.
  3. Condition: the added tag equals your tag from step 1.
  4. Action: Send marketing email. Something like “A new reward is waiting in your account”, with a button to your store’s /account page or to a campaign’s claim link.
  5. Turn the automation on.

Things to know

  • Tags are added, never removed. A customer who already carries the tag will not trigger “Customer tag added” again. If you want an email for every reward, add a step to the automation, or a Shopify Flow workflow, that removes the tag after the email is sent.
  • The coupon comes first. If tagging fails, the coupon is still issued.
  • Every path tags. Manual coupons, claim links, stamp-card rewards, purchase triggers and coupons from other Ioun apps all tag the customer when the setting is on.

Combining with other discounts

Under Settings, New coupons combine with sets whether the codes the app creates can be used alongside Order discounts, Product discounts and Shipping discounts. The defaults allow product and shipping discounts and refuse other order discounts, so a wallet coupon does not stack with a store-wide sale code.

The setting applies to coupons created after you change it. Codes already issued keep the combination they were created with.

Coupons from other Ioun apps

Other Ioun apps can put coupons and stamps into the same wallet, so a customer has one place for every reward from your store. Birthday Barbarian can issue a birthday coupon, and Bundles Monk can issue a reward; each coupon is bound to one customer and single-use like any other.

Nothing is connected by default. Each app has its own entry under Settings, in Sibling apps, and can issue coupons for your store only once you enable it there. Each also has a Daily cap on how many coupons it may issue per day. Coupons an app issued can be revoked by that app or by you; an app cannot see or revoke coupons it did not issue.